Remove the redundant name and stock_id parameters, adjust all callers.

Wed Jan  7 23:03:32 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkactiongroup.h:
	* gtk/gtkactiongroup.c (gtk_action_group_add_action_with_accel):
	Remove the redundant name and stock_id parameters, adjust all callers.
This commit is contained in:
Matthias Clasen
2004-01-07 22:02:02 +00:00
committed by Matthias Clasen
parent a11e45a1eb
commit bc3d9ffadf
7 changed files with 48 additions and 24 deletions

View File

@ -1,3 +1,9 @@
Wed Jan 7 23:03:32 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkactiongroup.h:
* gtk/gtkactiongroup.c (gtk_action_group_add_action_with_accel):
Remove the redundant name and stock_id parameters, adjust all callers.
Wed Jan 7 22:20:20 2004 Matthias Clasen <maclas@gmx.de> Wed Jan 7 22:20:20 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaction.h: * gtk/gtkaction.h:

View File

@ -1,3 +1,9 @@
Wed Jan 7 23:03:32 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkactiongroup.h:
* gtk/gtkactiongroup.c (gtk_action_group_add_action_with_accel):
Remove the redundant name and stock_id parameters, adjust all callers.
Wed Jan 7 22:20:20 2004 Matthias Clasen <maclas@gmx.de> Wed Jan 7 22:20:20 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaction.h: * gtk/gtkaction.h:

View File

@ -1,3 +1,9 @@
Wed Jan 7 23:03:32 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkactiongroup.h:
* gtk/gtkactiongroup.c (gtk_action_group_add_action_with_accel):
Remove the redundant name and stock_id parameters, adjust all callers.
Wed Jan 7 22:20:20 2004 Matthias Clasen <maclas@gmx.de> Wed Jan 7 22:20:20 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaction.h: * gtk/gtkaction.h:

View File

@ -1,3 +1,9 @@
Wed Jan 7 23:03:32 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkactiongroup.h:
* gtk/gtkactiongroup.c (gtk_action_group_add_action_with_accel):
Remove the redundant name and stock_id parameters, adjust all callers.
Wed Jan 7 22:20:20 2004 Matthias Clasen <maclas@gmx.de> Wed Jan 7 22:20:20 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaction.h: * gtk/gtkaction.h:

View File

@ -1,3 +1,9 @@
Wed Jan 7 23:03:32 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkactiongroup.h:
* gtk/gtkactiongroup.c (gtk_action_group_add_action_with_accel):
Remove the redundant name and stock_id parameters, adjust all callers.
Wed Jan 7 22:20:20 2004 Matthias Clasen <maclas@gmx.de> Wed Jan 7 22:20:20 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaction.h: * gtk/gtkaction.h:

View File

@ -295,17 +295,16 @@ gtk_action_group_add_action (GtkActionGroup *action_group,
/** /**
* gtk_action_group_add_action_with_accel: * gtk_action_group_add_action_with_accel:
* @action_group: the action group (#GtkActionGroup) * @action_group: the action group
* @action: the action to add (#GtkAction) * @action: the action to add
* @name: the name of the action to add
* @accelerator: the accelerator for the action, in * @accelerator: the accelerator for the action, in
* the format understood by gtk_accelerator_parse(). * the format understood by gtk_accelerator_parse(), or %NULL to use the
* @stock_id: the stock icon to display * stock accelerator
* *
* Adds an action object to the action group and sets up the accelerator. * Adds an action object to the action group and sets up the accelerator.
* *
* If @accelerator is %NULL, attempt to use the accelerator associated with * If @accelerator is %NULL, attempts to use the accelerator associated
* @stock_id. * with the stock_id of the action.
* *
* Accel paths are set to * Accel paths are set to
* <literal>&lt;Actions&gt;/<replaceable>group-name</replaceable>/<replaceable>action-name</replaceable></literal>. * <literal>&lt;Actions&gt;/<replaceable>group-name</replaceable>/<replaceable>action-name</replaceable></literal>.
@ -315,14 +314,16 @@ gtk_action_group_add_action (GtkActionGroup *action_group,
void void
gtk_action_group_add_action_with_accel (GtkActionGroup *action_group, gtk_action_group_add_action_with_accel (GtkActionGroup *action_group,
GtkAction *action, GtkAction *action,
const char *name, const gchar *accelerator)
const char *accelerator,
const char *stock_id)
{ {
gchar *accel_path; gchar *accel_path;
guint accel_key = 0; guint accel_key = 0;
GdkModifierType accel_mods; GdkModifierType accel_mods;
GtkStockItem stock_item; GtkStockItem stock_item;
const gchar *name;
const gchar *stock_id;
g_object_get (action, "name", &name, "stock_id", &stock_id, NULL);
accel_path = g_strconcat ("<Actions>/", accel_path = g_strconcat ("<Actions>/",
action_group->private_data->name, "/", name, NULL); action_group->private_data->name, "/", name, NULL);
@ -487,10 +488,9 @@ gtk_action_group_add_actions_full (GtkActionGroup *action_group,
entries[i].callback, entries[i].callback,
user_data, (GClosureNotify)destroy, 0); user_data, (GClosureNotify)destroy, 0);
gtk_action_group_add_action_with_accel (action_group, action, gtk_action_group_add_action_with_accel (action_group,
entries[i].name, action,
entries[i].accelerator, entries[i].accelerator);
entries[i].stock_id);
g_object_unref (action); g_object_unref (action);
} }
} }
@ -586,9 +586,7 @@ gtk_action_group_add_toggle_actions_full (GtkActionGroup *action_group,
gtk_action_group_add_action_with_accel (action_group, gtk_action_group_add_action_with_accel (action_group,
action, action,
entries[i].name, entries[i].accelerator);
entries[i].accelerator,
entries[i].stock_id);
g_object_unref (action); g_object_unref (action);
} }
} }
@ -699,9 +697,7 @@ gtk_action_group_add_radio_actions_full (GtkActionGroup *action_group,
gtk_action_group_add_action_with_accel (action_group, gtk_action_group_add_action_with_accel (action_group,
action, action,
entries[i].name, entries[i].accelerator);
entries[i].accelerator,
entries[i].stock_id);
g_object_unref (action); g_object_unref (action);
} }

View File

@ -113,9 +113,7 @@ void gtk_action_group_add_action (GtkActionGroup *
GtkAction *action); GtkAction *action);
void gtk_action_group_add_action_with_accel (GtkActionGroup *action_group, void gtk_action_group_add_action_with_accel (GtkActionGroup *action_group,
GtkAction *action, GtkAction *action,
const char *name, const gchar *accelerator);
const char *accelerator,
const char *stock_id);
void gtk_action_group_remove_action (GtkActionGroup *action_group, void gtk_action_group_remove_action (GtkActionGroup *action_group,
GtkAction *action); GtkAction *action);