]> git.saurik.com Git - wxWidgets.git/commitdiff
applied patch 1376506 - remove unneeded member variable from GTK wxRadioButton
authorDavid Surovell <davids@osafoundation.org>
Thu, 8 Dec 2005 21:44:46 +0000 (21:44 +0000)
committerDavid Surovell <davids@osafoundation.org>
Thu, 8 Dec 2005 21:44:46 +0000 (21:44 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/gtk/radiobut.h
include/wx/gtk1/radiobut.h
src/gtk/radiobut.cpp
src/gtk1/radiobut.cpp

index a44f13ed8269bebc836fd5c566e7338babf5a16c..9a54dffa626515468d1c0d45f255150b02916401 100644 (file)
@@ -51,7 +51,6 @@ public:
 
     virtual bool IsRadioButton() const { return TRUE; }
 
-    GSList *m_radioButtonGroup;
     void DoApplyWidgetStyle(GtkRcStyle *style);
     bool IsOwnGtkWindow( GdkWindow *window );
     void OnInternalIdle();
index a44f13ed8269bebc836fd5c566e7338babf5a16c..9a54dffa626515468d1c0d45f255150b02916401 100644 (file)
@@ -51,7 +51,6 @@ public:
 
     virtual bool IsRadioButton() const { return TRUE; }
 
-    GSList *m_radioButtonGroup;
     void DoApplyWidgetStyle(GtkRcStyle *style);
     bool IsOwnGtkWindow( GdkWindow *window );
     void OnInternalIdle();
index d6440f577a06ca8c03040aaa2d027e1a58448689..9d0f498faef74cdd913088b11d0c577a505a92de 100644 (file)
@@ -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);
 
index d6440f577a06ca8c03040aaa2d027e1a58448689..9d0f498faef74cdd913088b11d0c577a505a92de 100644 (file)
@@ -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);