diff options
author | Matthias Clasen <maclas@gmx.de> | 2003-09-04 21:34:15 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2003-09-04 21:34:15 +0000 |
commit | 9ae676b06baf394d0cee706264210126c293bfc1 (patch) | |
tree | b4fed3ab3a5090c7a4497c2caa95b3791bcaba8d /gtk/gtktoggleaction.c | |
parent | 02a963e15b25415fc7ef0e133af58ccab5c7de32 (diff) | |
download | gdk-pixbuf-9ae676b06baf394d0cee706264210126c293bfc1.tar.gz |
Test buttons and toggle buttons as proxies.
2003-09-04 Matthias Clasen <maclas@gmx.de>
* tests/testmerge.c: Test buttons and toggle buttons as proxies.
* gtk/gtktoggleaction.c (connect_proxy):
(gtk_toggle_action_real_toggled): Support toggle buttons as proxies. Note
that a "draw_as_radio" property is needed for check buttons similar to
check menu items, in order to fully support button proxies for radio actions.
* gtk/gtkaction.c (connect_proxy): Allow buttons as proxies.
Diffstat (limited to 'gtk/gtktoggleaction.c')
-rw-r--r-- | gtk/gtktoggleaction.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gtk/gtktoggleaction.c b/gtk/gtktoggleaction.c index dd7ed2330..51f5113e5 100644 --- a/gtk/gtktoggleaction.c +++ b/gtk/gtktoggleaction.c @@ -33,6 +33,7 @@ #include "gtktoggleaction.h" #include "gtktoggleactionprivate.h" #include "gtktoggletoolbutton.h" +#include "gtktogglebutton.h" #include "gtkcheckmenuitem.h" enum @@ -152,6 +153,9 @@ gtk_toggle_action_real_toggled (GtkToggleAction *action) else if (GTK_IS_TOGGLE_TOOL_BUTTON (proxy)) gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (proxy), action->private_data->active); + else if (GTK_IS_TOGGLE_BUTTON (proxy)) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (proxy), + action->private_data->active); else { g_warning ("Don't know how to toggle `%s' widgets", G_OBJECT_TYPE_NAME (proxy)); @@ -175,6 +179,9 @@ connect_proxy (GtkAction *action, else if (GTK_IS_TOGGLE_TOOL_BUTTON (proxy)) gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (proxy), toggle_action->private_data->active); + else if (GTK_IS_TOGGLE_BUTTON (proxy)) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (proxy), + toggle_action->private_data->active); (* GTK_ACTION_CLASS (parent_class)->connect_proxy) (action, proxy); } |