]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/radiobut.cpp
support for standard command IDs
[wxWidgets.git] / src / gtk / radiobut.cpp
index 9900eb7c898932804bd6ac5686bfdcf7a42d34c8..9d0f498faef74cdd913088b11d0c577a505a92de 100644 (file)
@@ -7,11 +7,6 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "radiobut.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -88,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;
@@ -112,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);