From 2633389890fb61b2ef5450f7118b7c62d2d10321 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 26 Jul 1999 11:01:58 +0000 Subject: [PATCH] no more \& in radio buttons labels git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/radiobox.cpp | 13 +++++++++++-- src/gtk1/radiobox.cpp | 13 +++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/gtk/radiobox.cpp b/src/gtk/radiobox.cpp index 1871c04a4a..b85671aaa8 100644 --- a/src/gtk/radiobox.cpp +++ b/src/gtk/radiobox.cpp @@ -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 ); diff --git a/src/gtk1/radiobox.cpp b/src/gtk1/radiobox.cpp index 1871c04a4a..b85671aaa8 100644 --- a/src/gtk1/radiobox.cpp +++ b/src/gtk1/radiobox.cpp @@ -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 ); -- 2.45.2