]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/combobox_native.cpp
don't throw away the first three stack frames in the assert stack dump (fix needed...
[wxWidgets.git] / src / motif / combobox_native.cpp
index e6672c200a5696214f2047f7f091fef1b2bfa614..fa3204e23873661306c68227b326ec1298795f2f 100644 (file)
@@ -12,8 +12,6 @@
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
-#include "wx/setup.h"
-
 #if wxUSE_COMBOBOX
 
 #include "wx/combobox.h"
@@ -115,8 +113,8 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
                    (XtPointer) this);
 
     wxSize best = GetBestSize();
-    if( size.x != -1 ) best.x = size.x;
-    if( size.y != -1 ) best.y = size.y;
+    if( size.x != wxDefaultCoord ) best.x = size.x;
+    if( size.y != wxDefaultCoord ) best.y = size.y;
 
     AttachWidget (parent, m_mainWidget, (WXWidget) NULL,
                   pos.x, pos.y, best.x, best.y);
@@ -218,9 +216,9 @@ int wxComboBox::DoAppend(const wxString& item)
 int wxComboBox::DoInsert(const wxString& item, int pos)
 {
     wxCHECK_MSG(!(GetWindowStyle() & wxCB_SORT), -1, wxT("can't insert into sorted list"));
-    wxCHECK_MSG((pos>=0) && (pos<=GetCount()), -1, wxT("invalid index"));
+    wxCHECK_MSG(IsValidInsert(pos), -1, wxT("invalid index"));
 
-    if (pos == GetCount())
+    if ((size_t)pos == GetCount())
         return DoAppend(item);
 
     wxXmString str( item.c_str() );