diff options
author | Matthias Clasen <mclasen@redhat.com> | 2004-11-09 19:15:44 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2004-11-09 19:15:44 +0000 |
commit | 994f8216f1ff1fa75c05b11a6070cc132b35c39b (patch) | |
tree | d8bf28f1df49f1cd674f07bdb15a664587dd3de0 /gtk/gtkaction.c | |
parent | 4ad562fc0cdad6e6dc1d9cdd3eaf0a69d9960428 (diff) | |
download | gdk-pixbuf-994f8216f1ff1fa75c05b11a6070cc132b35c39b.tar.gz |
Make return types G_CONST_RETURN instead of const.
2004-11-09 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkaction.[hc]:
* gtk/gtkactiongroup.[hc]: Make return types G_CONST_RETURN
instead of const.
* gtk/gtk.symbols:
* gtk/gtkaction.h:
* gtk/gtkaction.c (gtk_action_get_accel_path): Add
a function to obtain the accel path of an action. (#148106,
Michael Natterer)
Diffstat (limited to 'gtk/gtkaction.c')
-rw-r--r-- | gtk/gtkaction.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/gtk/gtkaction.c b/gtk/gtkaction.c index abd1a718e..d77f5488c 100644 --- a/gtk/gtkaction.c +++ b/gtk/gtkaction.c @@ -1193,7 +1193,7 @@ gtk_action_get_proxies (GtkAction *action) * * Since: 2.4 **/ -const gchar * +G_CONST_RETURN gchar * gtk_action_get_name (GtkAction *action) { g_return_val_if_fail (GTK_IS_ACTION (action), NULL); @@ -1439,6 +1439,30 @@ gtk_action_set_accel_path (GtkAction *action, } /** + * gtk_action_get_accel_path: + * @action: the action object + * + * Returns the accel path for this action. + * + * Since: 2.6 + * + * Returns: the accel path for this action, or %NULL + * if none is set. The returned string is owned by GTK+ + * and must not be freed or modified. + */ +G_CONST_RETURN gchar * +gtk_action_get_accel_path (GtkAction *action) +{ + g_return_val_if_fail (GTK_IS_ACTION (action), NULL); + + if (action->private_data->accel_quark) + return g_quark_to_string (action->private_data->accel_quark); + else + return NULL; +} + + +/** * gtk_action_set_accel_group: * @action: the action object * @accel_group: a #GtkAccelGroup or %NULL |