X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aaa6d89a0d0810b001a9217df913b9b74b883c8d..bdf895fdd93d3f33a4b12a2c4a8568b64badc1d3:/src/motif/listbox.cpp?ds=sidebyside diff --git a/src/motif/listbox.cpp b/src/motif/listbox.cpp index d0cd48fdec..07670065d8 100644 --- a/src/motif/listbox.cpp +++ b/src/motif/listbox.cpp @@ -209,33 +209,18 @@ void wxListBox::DoSetFirstItem( int N ) void wxListBox::Delete(unsigned int n) { - wxSizeKeeper sk( this ); Widget listBox = (Widget) m_mainWidget; - bool managed = XtIsManaged(listBox); - - if (managed) - XtUnmanageChild (listBox); - XmListDeletePos (listBox, n + 1); - if (managed) - XtManageChild (listBox); - - sk.Restore(); m_clientDataDict.Delete(n, HasClientObjectData()); m_noItems --; } int wxListBox::DoAppend(const wxString& item) { - wxSizeKeeper sk( this ); Widget listBox = (Widget) m_mainWidget; - bool managed = XtIsManaged(listBox); - - if (managed) - XtUnmanageChild (listBox); int n; XtVaGetValues (listBox, XmNitemCount, &n, NULL); wxXmString text( item ); @@ -246,10 +231,6 @@ int wxListBox::DoAppend(const wxString& item) // selection policy!! SetSelectionPolicy(); - if (managed) - XtManageChild (listBox); - - sk.Restore(); m_noItems ++; return GetCount() - 1; @@ -257,16 +238,11 @@ int wxListBox::DoAppend(const wxString& item) void wxListBox::DoSetItems(const wxArrayString& items, void** clientData) { - wxSizeKeeper sk( this ); Widget listBox = (Widget) m_mainWidget; if( HasClientObjectData() ) m_clientDataDict.DestroyData(); - bool managed = XtIsManaged(listBox); - - if (managed) - XtUnmanageChild (listBox); XmString *text = new XmString[items.GetCount()]; unsigned int i; for (i = 0; i < items.GetCount(); ++i) @@ -285,11 +261,6 @@ void wxListBox::DoSetItems(const wxArrayString& items, void** clientData) // selection policy!! SetSelectionPolicy(); - if (managed) - XtManageChild (listBox); - - sk.Restore(); - m_noItems = items.GetCount(); } @@ -487,14 +458,8 @@ wxString wxListBox::GetString(unsigned int n) const void wxListBox::DoInsertItems(const wxArrayString& items, unsigned int pos) { - wxSizeKeeper sk( this ); Widget listBox = (Widget) m_mainWidget; - bool managed = XtIsManaged(listBox); - - if (managed) - XtUnmanageChild(listBox); - XmString *text = new XmString[items.GetCount()]; unsigned int i; // Steve Hammes: Motif 1.1 compatibility @@ -520,11 +485,6 @@ void wxListBox::DoInsertItems(const wxArrayString& items, unsigned int pos) // selection policy!! SetSelectionPolicy(); - if (managed) - XtManageChild(listBox); - - sk.Restore(); - m_noItems += items.GetCount(); }