]> git.saurik.com Git - wxWidgets.git/commitdiff
no more \& in radio buttons labels
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 26 Jul 1999 11:01:58 +0000 (11:01 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 26 Jul 1999 11:01:58 +0000 (11:01 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/radiobox.cpp
src/gtk1/radiobox.cpp

index 1871c04a4acc12da0c49924fe5dd4ff9075bbeba..b85671aaa8c3e57585e758178a9b241b07fb3d4d 100644 (file)
@@ -97,12 +97,21 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
 
     GtkRadioButton *m_radio = (GtkRadioButton*) NULL;
 
+    wxString label;
     GSList *radio_button_group = (GSList *) NULL;
     for (int i = 0; i < n; i++)
     {
-        if (i) radio_button_group = gtk_radio_button_group( GTK_RADIO_BUTTON(m_radio) );
+        if ( i != 0 )
+            radio_button_group = gtk_radio_button_group( GTK_RADIO_BUTTON(m_radio) );
 
-        m_radio = GTK_RADIO_BUTTON( gtk_radio_button_new_with_label( radio_button_group, choices[i].mbc_str() ) );
+        label.Empty();
+        for ( const wxChar *pc = choices[i]; *pc; pc++ )
+        {
+            if ( *pc != _T('&') )
+                label += *pc;
+        }
+
+        m_radio = GTK_RADIO_BUTTON( gtk_radio_button_new_with_label( radio_button_group, label.mbc_str() ) );
 
         m_boxes.Append( (wxObject*) m_radio );
 
index 1871c04a4acc12da0c49924fe5dd4ff9075bbeba..b85671aaa8c3e57585e758178a9b241b07fb3d4d 100644 (file)
@@ -97,12 +97,21 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
 
     GtkRadioButton *m_radio = (GtkRadioButton*) NULL;
 
+    wxString label;
     GSList *radio_button_group = (GSList *) NULL;
     for (int i = 0; i < n; i++)
     {
-        if (i) radio_button_group = gtk_radio_button_group( GTK_RADIO_BUTTON(m_radio) );
+        if ( i != 0 )
+            radio_button_group = gtk_radio_button_group( GTK_RADIO_BUTTON(m_radio) );
 
-        m_radio = GTK_RADIO_BUTTON( gtk_radio_button_new_with_label( radio_button_group, choices[i].mbc_str() ) );
+        label.Empty();
+        for ( const wxChar *pc = choices[i]; *pc; pc++ )
+        {
+            if ( *pc != _T('&') )
+                label += *pc;
+        }
+
+        m_radio = GTK_RADIO_BUTTON( gtk_radio_button_new_with_label( radio_button_group, label.mbc_str() ) );
 
         m_boxes.Append( (wxObject*) m_radio );