2 * GTK - The GIMP Toolkit
3 * Copyright (C) 1998, 1999 Red Hat, Inc.
6 * This Library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (at your option) any later version.
11 * This Library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with the Gnome Library; see the file COPYING.LIB. If not,
18 * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
23 * Author: James Henstridge <james@daa.com.au>
25 * Modified by the GTK+ Team and others 2003. See the AUTHORS
26 * file for a list of people on the GTK+ Team. See the ChangeLog
27 * files for a list of changes. These files are distributed with
28 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
33 #include "gtkactiongroup.h"
35 #include "gtktoggleaction.h"
36 #include "gtkradioaction.h"
37 #include "gtkaccelmap.h"
38 #include "gtkmarshalers.h"
41 #define GTK_ACTION_GROUP_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_ACTION_GROUP, GtkActionGroupPrivate))
43 struct _GtkActionGroupPrivate
50 GtkTranslateFunc translate_func;
51 gpointer translate_data;
52 GtkDestroyNotify translate_notify;
72 static void gtk_action_group_init (GtkActionGroup *self);
73 static void gtk_action_group_class_init (GtkActionGroupClass *class);
74 static void gtk_action_group_finalize (GObject *object);
75 static void gtk_action_group_set_property (GObject *object,
79 static void gtk_action_group_get_property (GObject *object,
83 static GtkAction *gtk_action_group_real_get_action (GtkActionGroup *self,
88 gtk_action_group_get_type (void)
90 static GType type = 0;
94 static const GTypeInfo type_info =
96 sizeof (GtkActionGroupClass),
98 NULL, /* base_finalize */
99 (GClassInitFunc) gtk_action_group_class_init,
100 NULL, /* class_finalize */
101 NULL, /* class_data */
102 sizeof (GtkActionGroup),
104 (GInstanceInitFunc) gtk_action_group_init,
107 type = g_type_register_static (G_TYPE_OBJECT, "GtkActionGroup",
114 static GObjectClass *parent_class = NULL;
115 static guint action_group_signals[LAST_SIGNAL] = { 0 };
118 gtk_action_group_class_init (GtkActionGroupClass *klass)
120 GObjectClass *gobject_class;
122 gobject_class = G_OBJECT_CLASS (klass);
123 parent_class = g_type_class_peek_parent (klass);
125 gobject_class->finalize = gtk_action_group_finalize;
126 gobject_class->set_property = gtk_action_group_set_property;
127 gobject_class->get_property = gtk_action_group_get_property;
128 klass->get_action = gtk_action_group_real_get_action;
130 g_object_class_install_property (gobject_class,
132 g_param_spec_string ("name",
134 P_("A name for the action group."),
137 G_PARAM_CONSTRUCT_ONLY));
138 g_object_class_install_property (gobject_class,
140 g_param_spec_boolean ("sensitive",
142 P_("Whether the action group is enabled."),
145 g_object_class_install_property (gobject_class,
147 g_param_spec_boolean ("visible",
149 P_("Whether the action group is visible."),
154 * GtkGroupAction::connect-proxy:
155 * @action_group: the group
156 * @action: the action
159 * The connect_proxy signal is emitted after connecting a proxy to
160 * an action in the group. Note that the proxy may have been connected
161 * to a different action before.
163 * This is intended for simple customizations for which a custom action
164 * class would be too clumsy, e.g. showing tooltips for menuitems in the
167 * #GtkUIManager proxies the signal and provides global notification
168 * just before any action is connected to a proxy, which is probably more
173 action_group_signals[CONNECT_PROXY] =
174 g_signal_new ("connect_proxy",
175 G_OBJECT_CLASS_TYPE (klass),
177 _gtk_marshal_VOID__OBJECT_OBJECT,
179 GTK_TYPE_ACTION, GTK_TYPE_WIDGET);
182 * GtkAction::disconnect-proxy:
183 * @action_group: the group
184 * @action: the action
187 * The disconnect_proxy signal is emitted after disconnecting a proxy
188 * from an action in the group.
190 * #GtkUIManager proxies the signal and provides global notification
191 * just before any action is connected to a proxy, which is probably more
196 action_group_signals[DISCONNECT_PROXY] =
197 g_signal_new ("disconnect_proxy",
198 G_OBJECT_CLASS_TYPE (klass),
200 _gtk_marshal_VOID__OBJECT_OBJECT,
202 GTK_TYPE_ACTION, GTK_TYPE_WIDGET);
205 * GtkActionGroup::pre_activate:
206 * @action_group: the group
207 * @action: the action
209 * The pre_activate signal is emitted just before the @action in the
210 * @action_group is activated
212 * This is intended for #GtkUIManager to proxy the signal and provide global
213 * notification just before any action is activated.
217 action_group_signals[PRE_ACTIVATE] =
218 g_signal_new ("pre_activate",
219 G_OBJECT_CLASS_TYPE (klass),
221 _gtk_marshal_VOID__OBJECT,
226 * GtkActionGroup::post_activate:
227 * @action_group: the group
228 * @action: the action
230 * The post_activate signal is emitted just after the @action in the
231 * @action_group is activated
233 * This is intended for #GtkUIManager to proxy the signal and provide global
234 * notification just after any action is activated.
238 action_group_signals[POST_ACTIVATE] =
239 g_signal_new ("post_activate",
240 G_OBJECT_CLASS_TYPE (klass),
242 _gtk_marshal_VOID__OBJECT,
246 g_type_class_add_private (gobject_class, sizeof (GtkActionGroupPrivate));
251 remove_action (GtkAction *action)
253 g_object_set (action, "action_group", NULL, NULL);
254 g_object_unref (action);
258 gtk_action_group_init (GtkActionGroup *self)
260 self->private_data = GTK_ACTION_GROUP_GET_PRIVATE (self);
261 self->private_data->name = NULL;
262 self->private_data->sensitive = TRUE;
263 self->private_data->visible = TRUE;
264 self->private_data->actions = g_hash_table_new_full (g_str_hash, g_str_equal,
265 (GDestroyNotify) g_free,
266 (GDestroyNotify) remove_action);
267 self->private_data->translate_func = NULL;
268 self->private_data->translate_data = NULL;
269 self->private_data->translate_notify = NULL;
273 * gtk_action_group_new:
274 * @name: the name of the action group.
276 * Creates a new #GtkActionGroup object. The name of the action group
277 * is used when associating <link linkend="Action-Accel">keybindings</link>
280 * Returns: the new #GtkActionGroup
285 gtk_action_group_new (const gchar *name)
287 GtkActionGroup *self;
289 self = g_object_new (GTK_TYPE_ACTION_GROUP, NULL);
290 self->private_data->name = g_strdup (name);
296 gtk_action_group_finalize (GObject *object)
298 GtkActionGroup *self;
300 self = GTK_ACTION_GROUP (object);
302 g_free (self->private_data->name);
303 self->private_data->name = NULL;
305 g_hash_table_destroy (self->private_data->actions);
306 self->private_data->actions = NULL;
308 if (self->private_data->translate_notify)
309 self->private_data->translate_notify (self->private_data->translate_data);
311 if (parent_class->finalize)
312 (* parent_class->finalize) (object);
316 gtk_action_group_set_property (GObject *object,
321 GtkActionGroup *self;
324 self = GTK_ACTION_GROUP (object);
329 tmp = self->private_data->name;
330 self->private_data->name = g_value_dup_string (value);
334 gtk_action_group_set_sensitive (self, g_value_get_boolean (value));
337 gtk_action_group_set_visible (self, g_value_get_boolean (value));
340 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
346 gtk_action_group_get_property (GObject *object,
351 GtkActionGroup *self;
353 self = GTK_ACTION_GROUP (object);
358 g_value_set_string (value, self->private_data->name);
361 g_value_set_boolean (value, self->private_data->sensitive);
364 g_value_set_boolean (value, self->private_data->visible);
367 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
373 gtk_action_group_real_get_action (GtkActionGroup *self,
374 const gchar *action_name)
376 return g_hash_table_lookup (self->private_data->actions, action_name);
380 * gtk_action_group_get_name:
381 * @action_group: the action group
383 * Gets the name of the action group.
385 * Returns: the name of the action group.
390 gtk_action_group_get_name (GtkActionGroup *action_group)
392 g_return_val_if_fail (GTK_IS_ACTION_GROUP (action_group), NULL);
394 return action_group->private_data->name;
398 * gtk_action_group_get_sensitive:
399 * @action_group: the action group
401 * Returns %TRUE if the group is sensitive. The constituent actions
402 * can only be logically sensitive (see gtk_action_is_sensitive()) if
403 * they are sensitive (see gtk_action_get_sensitive()) and their group
406 * Return value: %TRUE if the group is sensitive.
411 gtk_action_group_get_sensitive (GtkActionGroup *action_group)
413 g_return_val_if_fail (GTK_IS_ACTION_GROUP (action_group), FALSE);
415 return action_group->private_data->sensitive;
419 cb_set_action_sensitivity (const gchar *name, GtkAction *action)
421 /* Minor optimization, the action_groups state only effects actions that are
422 * themselves sensitive */
423 if (gtk_action_get_sensitive (action))
424 g_object_notify (G_OBJECT (action), "sensitive");
428 * gtk_action_group_set_sensitive:
429 * @action_group: the action group
430 * @sensitive: new sensitivity
432 * Changes the sensitivity of @action_group
437 gtk_action_group_set_sensitive (GtkActionGroup *action_group, gboolean sensitive)
439 g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
441 if (action_group->private_data->sensitive ^ sensitive)
443 action_group->private_data->sensitive = sensitive;
444 g_hash_table_foreach (action_group->private_data->actions,
445 (GHFunc) cb_set_action_sensitivity, NULL);
450 * gtk_action_group_get_visible:
451 * @action_group: the action group
453 * Returns %TRUE if the group is visible. The constituent actions
454 * can only be logically visible (see gtk_action_is_visible()) if
455 * they are visible (see gtk_action_get_visible()) and their group
458 * Return value: %TRUE if the group is sensitive.
463 gtk_action_group_get_visible (GtkActionGroup *action_group)
465 g_return_val_if_fail (GTK_IS_ACTION_GROUP (action_group), FALSE);
467 return action_group->private_data->visible;
471 cb_set_action_visiblity (const gchar *name, GtkAction *action)
473 /* Minor optimization, the action_groups state only effects actions that are
474 * themselves sensitive */
475 if (gtk_action_get_visible (action))
476 g_object_notify (G_OBJECT (action), "visible");
480 * gtk_action_group_set_visible:
481 * @action_group: the action group
482 * @visible: new visiblity
484 * Changes the visible of @action_group.
489 gtk_action_group_set_visible (GtkActionGroup *action_group, gboolean visible)
491 g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
493 if (action_group->private_data->visible ^ visible)
495 action_group->private_data->visible = visible;
496 g_hash_table_foreach (action_group->private_data->actions,
497 (GHFunc) cb_set_action_visiblity, NULL);
502 * gtk_action_group_get_action:
503 * @action_group: the action group
504 * @action_name: the name of the action
506 * Looks up an action in the action group by name.
508 * Returns: the action, or %NULL if no action by that name exists
513 gtk_action_group_get_action (GtkActionGroup *action_group,
514 const gchar *action_name)
516 g_return_val_if_fail (GTK_IS_ACTION_GROUP (action_group), NULL);
517 g_return_val_if_fail (GTK_ACTION_GROUP_GET_CLASS (action_group)->get_action != NULL, NULL);
519 return (* GTK_ACTION_GROUP_GET_CLASS (action_group)->get_action)
520 (action_group, action_name);
524 * gtk_action_group_add_action:
525 * @action_group: the action group
528 * Adds an action object to the action group.
533 gtk_action_group_add_action (GtkActionGroup *action_group,
536 g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
537 g_return_if_fail (GTK_IS_ACTION (action));
538 g_return_if_fail (gtk_action_get_name (action) != NULL);
540 g_hash_table_insert (action_group->private_data->actions,
541 g_strdup (gtk_action_get_name (action)),
542 g_object_ref (action));
543 g_object_set (G_OBJECT (action), "action_group", action_group, NULL);
547 * gtk_action_group_add_action_with_accel:
548 * @action_group: the action group
549 * @action: the action to add
550 * @accelerator: the accelerator for the action, in
551 * the format understood by gtk_accelerator_parse(), or %NULL to use the
554 * Adds an action object to the action group and sets up the accelerator.
556 * If @accelerator is %NULL, attempts to use the accelerator associated
557 * with the stock_id of the action.
559 * Accel paths are set to
560 * <literal><Actions>/<replaceable>group-name</replaceable>/<replaceable>action-name</replaceable></literal>.
565 gtk_action_group_add_action_with_accel (GtkActionGroup *action_group,
567 const gchar *accelerator)
571 GdkModifierType accel_mods;
572 GtkStockItem stock_item;
576 g_object_get (action, "name", &name, "stock_id", &stock_id, NULL);
578 accel_path = g_strconcat ("<Actions>/",
579 action_group->private_data->name, "/", name, NULL);
582 gtk_accelerator_parse (accelerator, &accel_key, &accel_mods);
583 else if (stock_id && gtk_stock_lookup (stock_id, &stock_item))
585 accel_key = stock_item.keyval;
586 accel_mods = stock_item.modifier;
590 gtk_accel_map_add_entry (accel_path, accel_key, accel_mods);
592 gtk_action_set_accel_path (action, accel_path);
593 gtk_action_group_add_action (action_group, action);
601 * gtk_action_group_remove_action:
602 * @action_group: the action group
605 * Removes an action object from the action group.
610 gtk_action_group_remove_action (GtkActionGroup *action_group,
613 g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
614 g_return_if_fail (GTK_IS_ACTION (action));
615 g_return_if_fail (gtk_action_get_name (action) != NULL);
617 /* extra protection to make sure action->name is valid */
618 g_object_ref (action);
619 g_hash_table_remove (action_group->private_data->actions, gtk_action_get_name (action));
620 g_object_unref (action);
624 add_single_action (gpointer key,
628 GList **list = user_data;
630 *list = g_list_prepend (*list, value);
634 * gtk_action_group_list_actions:
635 * @action_group: the action group
637 * Lists the actions in the action group.
639 * Returns: an allocated list of the action objects in the action group
644 gtk_action_group_list_actions (GtkActionGroup *action_group)
646 GList *actions = NULL;
647 g_return_val_if_fail (GTK_IS_ACTION_GROUP (action_group), NULL);
649 g_hash_table_foreach (action_group->private_data->actions, add_single_action, &actions);
651 return g_list_reverse (actions);
656 * gtk_action_group_add_actions:
657 * @action_group: the action group
658 * @entries: an array of action descriptions
659 * @n_entries: the number of entries
660 * @user_data: data to pass to the action callbacks
662 * This is a convenience function to create a number of actions and add them
663 * to the action group.
665 * The "activate" signals of the actions are connected to the callbacks and
666 * their accel paths are set to
667 * <literal><Actions>/<replaceable>group-name</replaceable>/<replaceable>action-name</replaceable></literal>.
672 gtk_action_group_add_actions (GtkActionGroup *action_group,
673 GtkActionEntry *entries,
677 gtk_action_group_add_actions_full (action_group,
684 * gtk_action_group_add_actions_full:
685 * @action_group: the action group
686 * @entries: an array of action descriptions
687 * @n_entries: the number of entries
688 * @user_data: data to pass to the action callbacks
689 * @destroy: destroy notification callback for @user_data
691 * This variant of gtk_action_group_add_actions() adds a #GDestroyNotify
692 * callback for @user_data.
697 gtk_action_group_add_actions_full (GtkActionGroup *action_group,
698 GtkActionEntry *entries,
701 GDestroyNotify destroy)
704 /* Keep this in sync with the other
705 * gtk_action_group_add_..._actions_full() functions.
708 GtkTranslateFunc translate_func;
709 gpointer translate_data;
711 g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
713 translate_func = action_group->private_data->translate_func;
714 translate_data = action_group->private_data->translate_data;
716 for (i = 0; i < n_entries; i++)
720 const gchar *tooltip;
724 label = translate_func (entries[i].label, translate_data);
725 tooltip = translate_func (entries[i].tooltip, translate_data);
729 label = entries[i].label;
730 tooltip = entries[i].tooltip;
733 action = gtk_action_new (entries[i].name,
736 entries[i].stock_id);
738 if (entries[i].callback)
739 g_signal_connect_data (action, "activate",
741 user_data, (GClosureNotify)destroy, 0);
743 gtk_action_group_add_action_with_accel (action_group,
745 entries[i].accelerator);
746 g_object_unref (action);
751 * gtk_action_group_add_toggle_actions:
752 * @action_group: the action group
753 * @entries: an array of toggle action descriptions
754 * @n_entries: the number of entries
755 * @user_data: data to pass to the action callbacks
757 * This is a convenience function to create a number of toggle actions and add them
758 * to the action group.
760 * The "activate" signals of the actions are connected to the callbacks and
761 * their accel paths are set to
762 * <literal><Actions>/<replaceable>group-name</replaceable>/<replaceable>action-name</replaceable></literal>.
767 gtk_action_group_add_toggle_actions (GtkActionGroup *action_group,
768 GtkToggleActionEntry *entries,
772 gtk_action_group_add_toggle_actions_full (action_group,
779 * gtk_action_group_add_toggle_actions_full:
780 * @action_group: the action group
781 * @entries: an array of toggle action descriptions
782 * @n_entries: the number of entries
783 * @user_data: data to pass to the action callbacks
784 * @destroy: destroy notification callback for @user_data
786 * This variant of gtk_action_group_add_toggle_actions() adds a
787 * #GDestroyNotify callback for @user_data.
792 gtk_action_group_add_toggle_actions_full (GtkActionGroup *action_group,
793 GtkToggleActionEntry *entries,
796 GDestroyNotify destroy)
798 /* Keep this in sync with the other
799 * gtk_action_group_add_..._actions_full() functions.
802 GtkTranslateFunc translate_func;
803 gpointer translate_data;
805 g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
807 translate_func = action_group->private_data->translate_func;
808 translate_data = action_group->private_data->translate_data;
810 for (i = 0; i < n_entries; i++)
812 GtkToggleAction *action;
814 const gchar *tooltip;
818 label = translate_func (entries[i].label, translate_data);
819 tooltip = translate_func (entries[i].tooltip, translate_data);
823 label = entries[i].label;
824 tooltip = entries[i].tooltip;
827 action = gtk_toggle_action_new (entries[i].name,
830 entries[i].stock_id);
832 gtk_toggle_action_set_active (action, entries[i].is_active);
834 if (entries[i].callback)
835 g_signal_connect_data (action, "activate",
837 user_data, (GClosureNotify)destroy, 0);
839 gtk_action_group_add_action_with_accel (action_group,
841 entries[i].accelerator);
842 g_object_unref (action);
847 * gtk_action_group_add_radio_actions:
848 * @action_group: the action group
849 * @entries: an array of radio action descriptions
850 * @n_entries: the number of entries
851 * @value: the value of the action to activate initially, or -1 if
852 * no action should be activated
853 * @on_change: the callback to connect to the changed signal
854 * @user_data: data to pass to the action callbacks
856 * This is a convenience routine to create a group of radio actions and
857 * add them to the action group.
859 * The "changed" signal of the first radio action is connected to the
860 * @on_change callback and the accel paths of the actions are set to
861 * <literal><Actions>/<replaceable>group-name</replaceable>/<replaceable>action-name</replaceable></literal>.
866 gtk_action_group_add_radio_actions (GtkActionGroup *action_group,
867 GtkRadioActionEntry *entries,
873 gtk_action_group_add_radio_actions_full (action_group,
876 on_change, user_data, NULL);
880 * gtk_action_group_add_radio_actions_full:
881 * @action_group: the action group
882 * @entries: an array of radio action descriptions
883 * @n_entries: the number of entries
884 * @value: the value of the action to activate initially, or -1 if
885 * no action should be activated
886 * @on_change: the callback to connect to the changed signal
887 * @user_data: data to pass to the action callbacks
888 * @destroy: destroy notification callback for @user_data
890 * This variant of gtk_action_group_add_radio_actions() adds a
891 * #GDestroyNotify callback for @user_data.
896 gtk_action_group_add_radio_actions_full (GtkActionGroup *action_group,
897 GtkRadioActionEntry *entries,
902 GDestroyNotify destroy)
904 /* Keep this in sync with the other
905 * gtk_action_group_add_..._actions_full() functions.
908 GtkTranslateFunc translate_func;
909 gpointer translate_data;
910 GSList *group = NULL;
911 GtkRadioAction *first_action = NULL;
913 g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
915 translate_func = action_group->private_data->translate_func;
916 translate_data = action_group->private_data->translate_data;
918 for (i = 0; i < n_entries; i++)
920 GtkRadioAction *action;
922 const gchar *tooltip;
926 label = translate_func (entries[i].label, translate_data);
927 tooltip = translate_func (entries[i].tooltip, translate_data);
931 label = entries[i].label;
932 tooltip = entries[i].tooltip;
935 action = gtk_radio_action_new (entries[i].name,
942 first_action = action;
944 gtk_radio_action_set_group (action, group);
945 group = gtk_radio_action_get_group (action);
947 if (value == entries[i].value)
948 gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), TRUE);
950 gtk_action_group_add_action_with_accel (action_group,
952 entries[i].accelerator);
953 g_object_unref (action);
956 if (on_change && first_action)
957 g_signal_connect_data (first_action, "changed",
958 on_change, user_data,
959 (GClosureNotify)destroy, 0);
963 * gtk_action_group_set_translate_func:
964 * @action_group: a #GtkActionGroup
965 * @func: a #GtkTranslateFunc
966 * @data: data to be passed to @func and @notify
967 * @notify: a #GtkDestroyNotify function to be called when @action_group is
968 * destroyed and when the translation function is changed again
970 * Sets a function to be used for translating the @label and @tooltip of
971 * #GtkActionGroupEntry<!-- -->s added by gtk_action_group_add_actions().
973 * If you're using gettext(), it is enough to set the translation domain
974 * with gtk_action_group_set_translation_domain().
979 gtk_action_group_set_translate_func (GtkActionGroup *action_group,
980 GtkTranslateFunc func,
982 GtkDestroyNotify notify)
984 g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
986 if (action_group->private_data->translate_notify)
987 action_group->private_data->translate_notify (action_group->private_data->translate_data);
989 action_group->private_data->translate_func = func;
990 action_group->private_data->translate_data = data;
991 action_group->private_data->translate_notify = notify;
995 dgettext_swapped (const gchar *msgid,
996 const gchar *domainname)
998 return dgettext (domainname, msgid);
1002 * gtk_action_group_set_translation_domain:
1003 * @action_group: a #GtkActionGroup
1004 * @domain: the translation domain to use for dgettext() calls
1006 * Sets the translation domain and uses dgettext() for translating the
1007 * @label and @tooltip of #GtkActionEntry<!-- -->s added by
1008 * gtk_action_group_add_actions().
1010 * If you're not using gettext() for localization, see
1011 * gtk_action_group_set_translate_func().
1016 gtk_action_group_set_translation_domain (GtkActionGroup *action_group,
1017 const gchar *domain)
1019 g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
1021 gtk_action_group_set_translate_func (action_group,
1022 (GtkTranslateFunc)dgettext_swapped,
1027 /* Protected for use by GtkAction */
1029 _gtk_action_group_emit_connect_proxy (GtkActionGroup *action_group,
1033 g_signal_emit (action_group, action_group_signals[CONNECT_PROXY], 0,
1038 _gtk_action_group_emit_disconnect_proxy (GtkActionGroup *action_group,
1042 g_signal_emit (action_group, action_group_signals[DISCONNECT_PROXY], 0,
1047 _gtk_action_group_emit_pre_activate (GtkActionGroup *action_group,
1050 g_signal_emit (action_group, action_group_signals[PRE_ACTIVATE], 0, action);
1054 _gtk_action_group_emit_post_activate (GtkActionGroup *action_group,
1057 g_signal_emit (action_group, action_group_signals[POST_ACTIVATE], 0, action);