X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a7bdad336c81b0a424d77fdb01ab4f3b73e6d1d5..3ab296d9eb6d351eb1d2238f3e6ff2f5e6123861:/src/motif/combobox.cpp diff --git a/src/motif/combobox.cpp b/src/motif/combobox.cpp index 0c157e39ba..de2b16e9b1 100644 --- a/src/motif/combobox.cpp +++ b/src/motif/combobox.cpp @@ -12,12 +12,13 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/setup.h" - #if wxUSE_COMBOBOX #include "wx/combobox.h" -#include "wx/arrstr.h" + +#ifndef WX_PRECOMP + #include "wx/arrstr.h" +#endif #ifdef __VMS__ #pragma message disable nosimpint @@ -146,7 +147,7 @@ void wxComboBox::SetValue(const wxString& value) m_inSetValue = false; } -void wxComboBox::SetString(int WXUNUSED(n), const wxString& WXUNUSED(s)) +void wxComboBox::SetString(unsigned int WXUNUSED(n), const wxString& WXUNUSED(s)) { wxFAIL_MSG( wxT("wxComboBox::SetString only implemented for Motif 2.0") ); } @@ -161,10 +162,10 @@ int wxComboBox::DoAppend(const wxString& item) return GetCount() - 1; } -int wxComboBox::DoInsert(const wxString& item, int pos) +int wxComboBox::DoInsert(const wxString& item, unsigned 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()) return DoAppend(item); @@ -178,7 +179,7 @@ int wxComboBox::DoInsert(const wxString& item, int pos) return pos; } -void wxComboBox::Delete(int n) +void wxComboBox::Delete(unsigned int n) { XmComboBoxDeletePos((Widget) m_mainWidget, n+1); wxStringList::Node *node = m_stringList.Item(n); @@ -215,7 +216,7 @@ int wxComboBox::GetSelection (void) const return sel - 1; } -wxString wxComboBox::GetString(int n) const +wxString wxComboBox::GetString(unsigned int n) const { wxStringList::Node *node = m_stringList.Item(n); if (node)