X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e1aae5288576cd0066d2cbbf92935a969110bcea..4b1f929cc3421e43409f7d62260bf9ba0ffc75ab:/src/motif/combobox_native.cpp diff --git a/src/motif/combobox_native.cpp b/src/motif/combobox_native.cpp index aa8eac0f0d..498ce2565f 100644 --- a/src/motif/combobox_native.cpp +++ b/src/motif/combobox_native.cpp @@ -180,7 +180,7 @@ void wxComboBox::SetValue(const wxString& value) m_inSetValue = true; XtVaSetValues( GetXmText(this), - XmNvalue, (char *)value.c_str(), + XmNvalue, wxConstCast(value.c_str(), char), NULL); m_inSetValue = false; @@ -229,19 +229,18 @@ void wxComboBox::Clear() void wxComboBox::SetSelection (int n) { -#ifdef LESSTIF_VERSION +#if wxCHECK_LESSTIF() XmListSelectPos (GetXmList(this), n + 1, false); SetValue(GetString(n)); #else +#if 0 wxXmString str( GetString(n).c_str() ); XmComboBoxSelectItem((Widget) m_mainWidget, str()); -#if 0 - // does it work for Motif +#endif XtVaSetValues( (Widget)m_mainWidget, - XmNselectedPosition, n + 1, + XmNselectedPosition, n, NULL ); #endif -#endif } int wxComboBox::GetSelection (void) const @@ -304,7 +303,7 @@ long wxComboBox::GetLastPosition() const void wxComboBox::Replace(long from, long to, const wxString& value) { XmTextReplace( GetXmText(this), (XmTextPosition)from, (XmTextPosition)to, - (char*)value.c_str() ); + wxConstCast(value.c_str(), char) ); } void wxComboBox::Remove(long from, long to)