From 739b752912e935bfacf1d71ca040d0eb58f2351f Mon Sep 17 00:00:00 2001 From: David Surovell Date: Thu, 8 Dec 2005 21:44:46 +0000 Subject: [PATCH] applied patch 1376506 - remove unneeded member variable from GTK wxRadioButton git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/gtk/radiobut.h | 1 - include/wx/gtk1/radiobut.h | 1 - src/gtk/radiobut.cpp | 17 ++++------------- src/gtk1/radiobut.cpp | 17 ++++------------- 4 files changed, 8 insertions(+), 28 deletions(-) diff --git a/include/wx/gtk/radiobut.h b/include/wx/gtk/radiobut.h index a44f13ed82..9a54dffa62 100644 --- a/include/wx/gtk/radiobut.h +++ b/include/wx/gtk/radiobut.h @@ -51,7 +51,6 @@ public: virtual bool IsRadioButton() const { return TRUE; } - GSList *m_radioButtonGroup; void DoApplyWidgetStyle(GtkRcStyle *style); bool IsOwnGtkWindow( GdkWindow *window ); void OnInternalIdle(); diff --git a/include/wx/gtk1/radiobut.h b/include/wx/gtk1/radiobut.h index a44f13ed82..9a54dffa62 100644 --- a/include/wx/gtk1/radiobut.h +++ b/include/wx/gtk1/radiobut.h @@ -51,7 +51,6 @@ public: virtual bool IsRadioButton() const { return TRUE; } - GSList *m_radioButtonGroup; void DoApplyWidgetStyle(GtkRcStyle *style); bool IsOwnGtkWindow( GdkWindow *window ); void OnInternalIdle(); diff --git a/src/gtk/radiobut.cpp b/src/gtk/radiobut.cpp index d6440f577a..9d0f498fae 100644 --- a/src/gtk/radiobut.cpp +++ b/src/gtk/radiobut.cpp @@ -83,12 +83,8 @@ bool wxRadioButton::Create( wxWindow *parent, return FALSE; } - if (HasFlag(wxRB_GROUP)) - { - // start a new group - m_radioButtonGroup = (GSList*) NULL; - } - else + GSList* radioButtonGroup = NULL; + if (!HasFlag(wxRB_GROUP)) { // search backward for last group start wxRadioButton *chief = (wxRadioButton*) NULL; @@ -107,16 +103,11 @@ bool wxRadioButton::Create( wxWindow *parent, if (chief) { // we are part of the group started by chief - m_radioButtonGroup = gtk_radio_button_group( GTK_RADIO_BUTTON(chief->m_widget) ); - } - else - { - // start a new group - m_radioButtonGroup = (GSList*) NULL; + radioButtonGroup = gtk_radio_button_group( GTK_RADIO_BUTTON(chief->m_widget) ); } } - m_widget = gtk_radio_button_new_with_label( m_radioButtonGroup, wxGTK_CONV( label ) ); + m_widget = gtk_radio_button_new_with_label( radioButtonGroup, wxGTK_CONV( label ) ); SetLabel(label); diff --git a/src/gtk1/radiobut.cpp b/src/gtk1/radiobut.cpp index d6440f577a..9d0f498fae 100644 --- a/src/gtk1/radiobut.cpp +++ b/src/gtk1/radiobut.cpp @@ -83,12 +83,8 @@ bool wxRadioButton::Create( wxWindow *parent, return FALSE; } - if (HasFlag(wxRB_GROUP)) - { - // start a new group - m_radioButtonGroup = (GSList*) NULL; - } - else + GSList* radioButtonGroup = NULL; + if (!HasFlag(wxRB_GROUP)) { // search backward for last group start wxRadioButton *chief = (wxRadioButton*) NULL; @@ -107,16 +103,11 @@ bool wxRadioButton::Create( wxWindow *parent, if (chief) { // we are part of the group started by chief - m_radioButtonGroup = gtk_radio_button_group( GTK_RADIO_BUTTON(chief->m_widget) ); - } - else - { - // start a new group - m_radioButtonGroup = (GSList*) NULL; + radioButtonGroup = gtk_radio_button_group( GTK_RADIO_BUTTON(chief->m_widget) ); } } - m_widget = gtk_radio_button_new_with_label( m_radioButtonGroup, wxGTK_CONV( label ) ); + m_widget = gtk_radio_button_new_with_label( radioButtonGroup, wxGTK_CONV( label ) ); SetLabel(label);