зеркало из https://github.com/mozilla/pjs.git
Bug 2088 2099: Similar fixes for nsListBox (add PreCreateWidget to get mMultiSelect)
This commit is contained in:
Родитель
93ececeab4
Коммит
83f98faaee
|
@ -330,6 +330,20 @@ NS_METHOD nsListBox::Deselect()
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Set initial parameters
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
NS_METHOD nsListBox::PreCreateWidget(nsWidgetInitData *aInitData)
|
||||
{
|
||||
if (nsnull != aInitData) {
|
||||
nsListBoxInitData* data = (nsListBoxInitData *) aInitData;
|
||||
mMultiSelect = data->mMultiSelect;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Create the native widget
|
||||
|
@ -348,6 +362,7 @@ NS_METHOD nsListBox::CreateNative(GtkWidget *parentWindow)
|
|||
gtk_clist_column_titles_hide(GTK_CLIST(mCList));
|
||||
// Default (it may be changed)
|
||||
gtk_clist_set_selection_mode(GTK_CLIST(mCList), GTK_SELECTION_BROWSE);
|
||||
SetMultipleSelection(mMultiSelect);
|
||||
gtk_widget_show(mCList);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (mWidget), mCList);
|
||||
|
|
|
@ -47,6 +47,7 @@ public:
|
|||
|
||||
|
||||
// nsIListBox interface
|
||||
NS_IMETHOD PreCreateWidget(nsWidgetInitData *aInitData);
|
||||
NS_IMETHOD SetMultipleSelection(PRBool aMultipleSelections);
|
||||
NS_IMETHOD AddItemAt(nsString &aItem, PRInt32 aPosition);
|
||||
PRInt32 FindItem(nsString &aItem, PRInt32 aStartPos);
|
||||
|
|
Загрузка…
Ссылка в новой задаче