X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e4db172a3b318df9aff178eb6c5da149d56e0859..4fe0156b18e2330be391b804da341e546164b85f:/src/motif/listbox.cpp diff --git a/src/motif/listbox.cpp b/src/motif/listbox.cpp index 1158c22fe0..07670065d8 100644 --- a/src/motif/listbox.cpp +++ b/src/motif/listbox.cpp @@ -19,6 +19,9 @@ #ifndef WX_PRECOMP #include "wx/dynarray.h" #include "wx/log.h" + #include "wx/utils.h" + #include "wx/settings.h" + #include "wx/arrstr.h" #endif #ifdef __VMS @@ -26,10 +29,6 @@ #define XtDisplay XTDISPLAY #endif -#include "wx/settings.h" -#include "wx/utils.h" -#include "wx/arrstr.h" - #ifdef __VMS__ #pragma message disable nosimpint #endif @@ -210,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 ); @@ -247,10 +231,6 @@ int wxListBox::DoAppend(const wxString& item) // selection policy!! SetSelectionPolicy(); - if (managed) - XtManageChild (listBox); - - sk.Restore(); m_noItems ++; return GetCount() - 1; @@ -258,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) @@ -286,11 +261,6 @@ void wxListBox::DoSetItems(const wxArrayString& items, void** clientData) // selection policy!! SetSelectionPolicy(); - if (managed) - XtManageChild (listBox); - - sk.Restore(); - m_noItems = items.GetCount(); } @@ -488,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 @@ -521,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(); }