From e4384dcadbb156a90dc52f7fa0c798aef544b3d0 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Fri, 10 Jun 2005 19:11:31 +0000 Subject: [PATCH] gtk/gtk.symbols new function to get an action's accel_closure (Fixes 2005-06-10 Michael Natterer * gtk/gtk.symbols * gtk/gtkaction.[ch] (gtk_action_get_accel_closure): new function to get an action's accel_closure (Fixes #141750 and #148106). --- ChangeLog | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ gtk/gtk.symbols | 1 + gtk/gtkaction.c | 19 +++++++++++++++++++ gtk/gtkaction.h | 1 + 6 files changed, 39 insertions(+) diff --git a/ChangeLog b/ChangeLog index 65786e3586..f65ea02c01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-06-10 Michael Natterer + + * gtk/gtk.symbols + * gtk/gtkaction.[ch] (gtk_action_get_accel_closure): new function + to get an action's accel_closure (Fixes #141750 and #148106). + 2005-06-10 Matthias Clasen * gdk/gen-keyname-table.pl: Generate N_() calls for diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 65786e3586..f65ea02c01 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2005-06-10 Michael Natterer + + * gtk/gtk.symbols + * gtk/gtkaction.[ch] (gtk_action_get_accel_closure): new function + to get an action's accel_closure (Fixes #141750 and #148106). + 2005-06-10 Matthias Clasen * gdk/gen-keyname-table.pl: Generate N_() calls for diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 65786e3586..f65ea02c01 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2005-06-10 Michael Natterer + + * gtk/gtk.symbols + * gtk/gtkaction.[ch] (gtk_action_get_accel_closure): new function + to get an action's accel_closure (Fixes #141750 and #148106). + 2005-06-10 Matthias Clasen * gdk/gen-keyname-table.pl: Generate N_() calls for diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols index 2ae64fa07c..3ef52afe8e 100644 --- a/gtk/gtk.symbols +++ b/gtk/gtk.symbols @@ -138,6 +138,7 @@ gtk_action_create_menu_item gtk_action_create_tool_item gtk_action_disconnect_accelerator gtk_action_disconnect_proxy +gtk_action_get_accel_closure gtk_action_get_accel_path gtk_action_get_name gtk_action_get_proxies diff --git a/gtk/gtkaction.c b/gtk/gtkaction.c index 51bfa2c38f..ed893edaca 100644 --- a/gtk/gtkaction.c +++ b/gtk/gtkaction.c @@ -1491,6 +1491,25 @@ gtk_action_get_accel_path (GtkAction *action) return NULL; } +/** + * gtk_action_get_accel_closure: + * @action: the action object + * + * Returns the accel closure for this action. + * + * Since: 2.8 + * + * Returns: the accel closure for this action. The returned closure is + * owned by GTK+ must and not be unrefed or modified. + */ +GClosure * +gtk_action_get_accel_closure (GtkAction *action) +{ + g_return_val_if_fail (GTK_IS_ACTION (action), NULL); + + return action->private_data->accel_closure; +} + /** * gtk_action_set_accel_group: diff --git a/gtk/gtkaction.h b/gtk/gtkaction.h index ddf3c3c42e..c7e9f9d383 100644 --- a/gtk/gtkaction.h +++ b/gtk/gtkaction.h @@ -107,6 +107,7 @@ GSList* gtk_action_get_proxies (GtkAction *action); void gtk_action_connect_accelerator (GtkAction *action); void gtk_action_disconnect_accelerator (GtkAction *action); G_CONST_RETURN gchar *gtk_action_get_accel_path (GtkAction *action); +GClosure *gtk_action_get_accel_closure (GtkAction *action); /* protected ... for use by child actions */ void gtk_action_block_activate_from (GtkAction *action,