summaryrefslogtreecommitdiff
path: root/gtk/gtkradioaction.c
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2010-07-13 20:40:42 +0200
committerJavier Jardón <jjardon@gnome.org>2010-07-14 01:17:28 +0200
commit3ce68cd5dea2f720f01f9e30dc7289a4a628a4f9 (patch)
tree768ea0d4b06e180c537f0ac5118b414f0150229a /gtk/gtkradioaction.c
parente69979f7b66c02ac34e80d62af76c2babdbdf854 (diff)
downloadgtk+-3ce68cd5dea2f720f01f9e30dc7289a4a628a4f9.tar.gz
Use accessor functions to access GtkToggleAction
Diffstat (limited to 'gtk/gtkradioaction.c')
-rw-r--r--gtk/gtkradioaction.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/gtk/gtkradioaction.c b/gtk/gtkradioaction.c
index 0f658a9039..fbc455761f 100644
--- a/gtk/gtkradioaction.c
+++ b/gtk/gtkradioaction.c
@@ -321,11 +321,13 @@ gtk_radio_action_activate (GtkAction *action)
GtkToggleAction *toggle_action;
GtkToggleAction *tmp_action;
GSList *tmp_list;
+ gboolean active;
radio_action = GTK_RADIO_ACTION (action);
toggle_action = GTK_TOGGLE_ACTION (action);
- if (toggle_action->private_data->active)
+ active = gtk_toggle_action_get_active (toggle_action);
+ if (active)
{
tmp_list = radio_action->private_data->group;
@@ -334,9 +336,10 @@ gtk_radio_action_activate (GtkAction *action)
tmp_action = tmp_list->data;
tmp_list = tmp_list->next;
- if (tmp_action->private_data->active && (tmp_action != toggle_action))
+ if (gtk_toggle_action_get_active (tmp_action) &&
+ (tmp_action != toggle_action))
{
- toggle_action->private_data->active = !toggle_action->private_data->active;
+ gtk_toggle_action_set_active (toggle_action, !active);
break;
}
@@ -345,7 +348,7 @@ gtk_radio_action_activate (GtkAction *action)
}
else
{
- toggle_action->private_data->active = !toggle_action->private_data->active;
+ gtk_toggle_action_set_active (toggle_action, !active);
g_object_notify (G_OBJECT (action), "active");
tmp_list = radio_action->private_data->group;
@@ -354,7 +357,8 @@ gtk_radio_action_activate (GtkAction *action)
tmp_action = tmp_list->data;
tmp_list = tmp_list->next;
- if (tmp_action->private_data->active && (tmp_action != toggle_action))
+ if (gtk_toggle_action_get_active (tmp_action) &&
+ (tmp_action != toggle_action))
{
_gtk_action_emit_activate (GTK_ACTION (tmp_action));
break;
@@ -546,7 +550,7 @@ gtk_radio_action_get_current_value (GtkRadioAction *action)
{
GtkToggleAction *toggle_action = slist->data;
- if (toggle_action->private_data->active)
+ if (gtk_toggle_action_get_active (toggle_action))
return GTK_RADIO_ACTION (toggle_action)->private_data->value;
}
}