X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f03fc89fff2d6e823e7d4d14fbe14822ad6777b1..bb69661b050ad2c774985e225cce0e497a875143:/src/gtk1/choice.cpp diff --git a/src/gtk1/choice.cpp b/src/gtk1/choice.cpp index 66f2f19bd7..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" @@ -38,7 +40,7 @@ static void gtk_choice_clicked_callback( GtkWidget *WXUNUSED(widget), wxChoice * { if (g_isIdle) wxapp_install_idle_handler(); - if (!choice->HasVMT()) return; + if (!choice->m_hasVMT) return; if (g_blockEventsOnDrag) return; @@ -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