summaryrefslogtreecommitdiff
path: root/gtk/gtkradioaction.c
diff options
context:
space:
mode:
authorMatthias Clasen <maclas@gmx.de>2003-08-29 19:50:55 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2003-08-29 19:50:55 +0000
commite3e7b75557210b8672d1aace575b3477808f6692 (patch)
treeec37a634ba7101d832b25b5aa6df4396d06631f6 /gtk/gtkradioaction.c
parent7dbeafb6571ffd983978a36ef888ef27dd0d0eb4 (diff)
downloadgtk+-e3e7b75557210b8672d1aace575b3477808f6692.tar.gz
Set "draw_as_radio" on proxy menu items for radio actions.
2003-08-29 Matthias Clasen <maclas@gmx.de> * gtk/gtkradioaction.c (create_menu_item): Set "draw_as_radio" on proxy menu items for radio actions.
Diffstat (limited to 'gtk/gtkradioaction.c')
-rw-r--r--gtk/gtkradioaction.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk/gtkradioaction.c b/gtk/gtkradioaction.c
index 52a03d36a4..38959da49e 100644
--- a/gtk/gtkradioaction.c
+++ b/gtk/gtkradioaction.c
@@ -33,6 +33,7 @@
#include "gtkradioaction.h"
#include "gtkradiomenuitem.h"
#include "gtktoggleactionprivate.h"
+#include "gtktoggletoolbutton.h"
#include "gtkintl.h"
#define GTK_RADIO_ACTION_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_RADIO_ACTION, GtkRadioActionPrivate))
@@ -67,6 +68,7 @@ static void gtk_radio_action_get_property (GObject *object,
GValue *value,
GParamSpec *pspec);
static void gtk_radio_action_activate (GtkAction *action);
+static GtkWidget *create_menu_item (GtkAction *action);
GType
@@ -116,6 +118,8 @@ gtk_radio_action_class_init (GtkRadioActionClass *klass)
action_class->activate = gtk_radio_action_activate;
+ action_class->create_menu_item = create_menu_item;
+
/**
* GtkRadioAction:value:
*
@@ -290,6 +294,14 @@ gtk_radio_action_activate (GtkAction *action)
gtk_toggle_action_toggled (toggle_action);
}
+static GtkWidget *
+create_menu_item (GtkAction *action)
+{
+ return g_object_new (GTK_TYPE_CHECK_MENU_ITEM,
+ "draw_as_radio", TRUE,
+ NULL);
+}
+
/**
* gtk_radio_action_get_group:
* @action: the action object