X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d760f23e7634a953bb6e1ced0de69f7016c12884..44ba8f0ea92f65d9893ce0780971745a5d8e80ea:/src/gtk1/listbox.cpp?ds=sidebyside diff --git a/src/gtk1/listbox.cpp b/src/gtk1/listbox.cpp index c63ba920e3..b81275e629 100644 --- a/src/gtk1/listbox.cpp +++ b/src/gtk1/listbox.cpp @@ -21,6 +21,7 @@ #include "wx/intl.h" #include "wx/checklst.h" #include "wx/settings.h" +#include "wx/gtk/private.h" #if wxUSE_TOOLTIPS #include "wx/tooltip.h" @@ -537,7 +538,7 @@ void wxListBox::GtkAddItem( const wxString &item, int pos ) } #endif // wxUSE_CHECKLISTBOX - list_item = gtk_list_item_new_with_label( label.mbc_str() ); + list_item = gtk_list_item_new_with_label( wxGTK_CONV( label ) ); GList *gitem_list = g_list_alloc (); gitem_list->data = list_item; @@ -737,7 +738,7 @@ void wxListBox::SetString( int n, const wxString &string ) #endif // wxUSE_CHECKLISTBOX str += string; - gtk_label_set( label, str.mbc_str() ); + gtk_label_set( label, wxGTK_CONV( str ) ); } else { @@ -755,7 +756,11 @@ wxString wxListBox::GetString( int n ) const GtkBin *bin = GTK_BIN( child->data ); GtkLabel *label = GTK_LABEL( bin->child ); - wxString str = wxString(GET_REAL_LABEL(label->label),*wxConvCurrent); +#ifdef __WXGTK20__ + wxString str = wxGTK_CONV_BACK( gtk_label_get_text( label ) ); +#else + wxString str = wxString( label->label ); +#endif return str; } @@ -784,7 +789,11 @@ int wxListBox::FindString( const wxString &item ) const GtkBin *bin = GTK_BIN( child->data ); GtkLabel *label = GTK_LABEL( bin->child ); - wxString str = wxString(GET_REAL_LABEL(label->label),*wxConvCurrent); +#ifdef __WXGTK20__ + wxString str = wxGTK_CONV_BACK( gtk_label_get_text( label ) ); +#else + wxString str = wxString( label->label ); +#endif if (str == item) return count;