зеркало из https://github.com/mozilla/gecko-dev.git
Changed the array of widget to be of type "Widget" instead of "long"
This commit is contained in:
Родитель
137154bd27
Коммит
34d246ef41
|
@ -42,7 +42,7 @@ nsComboBox::nsComboBox(nsISupports *aOuter) : nsWindow(aOuter)
|
|||
mBackground = NS_RGB(124, 124, 124);
|
||||
|
||||
mMaxNumItems = INITIAL_MAX_ITEMS;
|
||||
mItems = new long[INITIAL_MAX_ITEMS];
|
||||
mItems = (Widget *)new long[INITIAL_MAX_ITEMS];
|
||||
mNumItems = 0;
|
||||
}
|
||||
|
||||
|
@ -194,7 +194,7 @@ void nsComboBox::GetSelectedItem(nsString& aItem)
|
|||
XtVaGetValues(mWidget, XmNmenuHistory, &w, NULL);
|
||||
int i;
|
||||
for (i=0;i<mNumItems;i++) {
|
||||
if (((Widget)mItems[i]) == w) {
|
||||
if (mItems[i] == w) {
|
||||
GetItemAt(aItem, i);
|
||||
}
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ PRInt32 nsComboBox::GetSelectedIndex()
|
|||
XtVaGetValues(mWidget, XmNmenuHistory, &w, NULL);
|
||||
int i;
|
||||
for (i=0;i<mNumItems;i++) {
|
||||
if (((Widget)mItems[i]) == w) {
|
||||
if (mItems[i] == w) {
|
||||
return (PRInt32)i;
|
||||
}
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ void nsComboBox::SelectItem(PRInt32 aPosition)
|
|||
if (!mMultiSelect) {
|
||||
if (aPosition >= 0 && aPosition < mNumItems) {
|
||||
XtVaSetValues(mWidget,
|
||||
XmNmenuHistory, (Widget)mItems[aPosition],
|
||||
XmNmenuHistory, mItems[aPosition],
|
||||
NULL);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -74,7 +74,7 @@ protected:
|
|||
Widget mOptionMenu;
|
||||
PRBool mMultiSelect;
|
||||
|
||||
long * mItems; // an array of Widgets
|
||||
Widget * mItems; // an array of Widgets
|
||||
int mMaxNumItems;
|
||||
int mNumItems;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче