From 3f224a716513f3bc12112931abc95eca940e9dac Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 13 May 2014 20:28:44 -0400 Subject: [PATCH] Add private GtkWidget api for action groups Similar to the just-added action muxer api for enumerating action prefixes and for getting the action group for a prefix. https://bugzilla.gnome.org/show_bug.cgi?id=730095 --- gtk/gtkwidget.c | 17 +++++++++++++++++ gtk/gtkwidgetprivate.h | 3 +++ 2 files changed, 20 insertions(+) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 3528e40f78..a7a94d934b 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -16252,3 +16252,20 @@ gtk_widget_get_template_child (GtkWidget *widget, return ret; } + +gchar ** +_gtk_widget_list_action_prefixes (GtkWidget *widget) +{ + if (widget->priv->muxer) + return gtk_action_muxer_list_prefixes (widget->priv->muxer); + return NULL; +} + +GActionGroup * +_gtk_widget_get_action_group (GtkWidget *widget, + const gchar *prefix) +{ + if (widget->priv->muxer) + return gtk_action_muxer_lookup (widget->priv->muxer, prefix); + return NULL; +} diff --git a/gtk/gtkwidgetprivate.h b/gtk/gtkwidgetprivate.h index 7cf15f8e55..6e8bb477d4 100644 --- a/gtk/gtkwidgetprivate.h +++ b/gtk/gtkwidgetprivate.h @@ -148,6 +148,9 @@ void _gtk_widget_style_context_invalidated (GtkWidget *widget void _gtk_widget_update_parent_muxer (GtkWidget *widget); GtkActionMuxer * _gtk_widget_get_action_muxer (GtkWidget *widget); +gchar ** _gtk_widget_list_action_prefixes (GtkWidget *widget); +GActionGroup * _gtk_widget_get_action_group (GtkWidget *widget, + const gchar *prefix); G_END_DECLS