]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/radiobox.cpp
made static box only a frame region in all calculations (otherwise the background...
[wxWidgets.git] / src / gtk1 / radiobox.cpp
index 26240cc004c1ea26eef9137095fbe341f758c23a..5bc55111c2674038e1b9941dfc5c1c166602580b 100644 (file)
@@ -418,7 +418,7 @@ bool wxRadioBox::Show( bool show )
     return TRUE;
 }
 
-int wxRadioBox::FindString( const wxString &s ) const
+int wxRadioBox::FindString( const wxString &find ) const
 {
     wxCHECK_MSG( m_widget != NULL, -1, wxT("invalid radiobox") );
 
@@ -428,7 +428,12 @@ int wxRadioBox::FindString( const wxString &s ) const
     while (node)
     {
         GtkLabel *label = GTK_LABEL( BUTTON_CHILD(node->Data()) );
-        if (s == label->label)
+#ifdef __WXGTK20__
+        wxString str( wxGTK_CONV_BACK( gtk_label_get_text(label) ) );
+#else
+        wxString str( label->label );
+#endif
+        if (find == str)
             return count;
 
         count++;
@@ -505,7 +510,13 @@ wxString wxRadioBox::GetString( int n ) const
 
     GtkLabel *label = GTK_LABEL( BUTTON_CHILD(node->Data()) );
 
-    return wxString( label->label );
+#ifdef __WXGTK20__
+    wxString str( wxGTK_CONV_BACK( gtk_label_get_text(label) ) );
+#else
+    wxString str( label->label );
+#endif
+
+    return str;
 }
 
 void wxRadioBox::SetLabel( const wxString& label )
@@ -592,7 +603,12 @@ wxString wxRadioBox::GetStringSelection() const
         {
             GtkLabel *label = GTK_LABEL( BUTTON_CHILD(node->Data()) );
 
-            return label->label;
+#ifdef __WXGTK20__
+            wxString str( wxGTK_CONV_BACK( gtk_label_get_text(label) ) );
+#else
+            wxString str( label->label );
+#endif
+            return str;
         }
         node = node->Next();
     }