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
This commit is contained in:
David Surovell 2005-12-08 21:44:46 +00:00
parent dc8fbc37b0
commit 739b752912
4 changed files with 8 additions and 28 deletions

View 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();

View 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();

View 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);

View 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);