X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a2053b27b318fe81918a72c838944d1e8cd1524f..9b73db3c34aefd98080b425459322fa821ae271f:/src/gtk1/choice.cpp diff --git a/src/gtk1/choice.cpp b/src/gtk1/choice.cpp index f13d20eae3..bd63c5e3f8 100644 --- a/src/gtk1/choice.cpp +++ b/src/gtk1/choice.cpp @@ -14,6 +14,8 @@ #include "wx/choice.h" +#if wxUSE_CHOICE + #include "gdk/gdk.h" #include "gtk/gtk.h" @@ -71,7 +73,9 @@ bool wxChoice::Create( wxWindow *parent, wxWindowID id, PreCreation( parent, id, pos, size, style, name ); +#if wxUSE_VALIDATORS SetValidator( validator ); +#endif m_widget = gtk_option_menu_new(); @@ -251,7 +255,7 @@ int wxChoice::FindString( const wxString &string ) const wxASSERT_MSG( label != NULL , _T("wxChoice: invalid label") ); - if (string == label->label) + if (string == wxString(label->label,*wxConvCurrent)) return count; child = child->next; @@ -304,7 +308,7 @@ wxString wxChoice::GetString( int n ) const wxASSERT_MSG( label != NULL , _T("wxChoice: invalid label") ); - return label->label; + return wxString(label->label,*wxConvCurrent); } child = child->next; count++; @@ -312,7 +316,7 @@ wxString wxChoice::GetString( int n ) const wxFAIL_MSG( _T("wxChoice: invalid index in GetString()") ); - return ""; + return _T(""); } wxString wxChoice::GetStringSelection() const @@ -323,7 +327,7 @@ wxString wxChoice::GetStringSelection() const wxASSERT_MSG( label != NULL , _T("wxChoice: invalid label") ); - return label->label; + return wxString(label->label,*wxConvCurrent); } int wxChoice::Number() const @@ -388,3 +392,4 @@ void wxChoice::ApplyWidgetStyle() } } +#endif