[gtk+/wip/gmenu: 36/87] GtkApplicationWindow: wire up action activations
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/gmenu: 36/87] GtkApplicationWindow: wire up action activations
- Date: Sat, 3 Dec 2011 23:51:10 +0000 (UTC)
commit 67669bdee7173563917a6eaeba98571dcfe664fb
Author: Ryan Lortie <desrt desrt ca>
Date: Wed Nov 30 12:06:40 2011 -0500
GtkApplicationWindow: wire up action activations
Wire the 'activate_action' and 'change_action_state' vfuncs through to
the GSimpleActionGroup.
gtk/gtkapplicationwindow.c | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkapplicationwindow.c b/gtk/gtkapplicationwindow.c
index 251eece..4258f73 100644
--- a/gtk/gtkapplicationwindow.c
+++ b/gtk/gtkapplicationwindow.c
@@ -59,6 +59,26 @@ gtk_application_window_query_action (GActionGroup *group,
action_name, enabled, parameter_type, state_type, state_hint, state);
}
+static void
+gtk_application_window_activate_action (GActionGroup *group,
+ const gchar *action_name,
+ GVariant *parameter)
+{
+ GtkApplicationWindow *window = GTK_APPLICATION_WINDOW (group);
+
+ return g_action_group_activate_action (G_ACTION_GROUP (window->priv->actions), action_name, parameter);
+}
+
+static void
+gtk_application_window_change_action_state (GActionGroup *group,
+ const gchar *action_name,
+ GVariant *state)
+{
+ GtkApplicationWindow *window = GTK_APPLICATION_WINDOW (group);
+
+ return g_action_group_change_action_state (G_ACTION_GROUP (window->priv->actions), action_name, state);
+}
+
static GAction *
gtk_application_window_lookup_action (GActionMap *action_map,
const gchar *action_name)
@@ -91,6 +111,8 @@ gtk_application_window_group_iface_init (GActionGroupInterface *iface)
{
iface->list_actions = gtk_application_window_list_actions;
iface->query_action = gtk_application_window_query_action;
+ iface->activate_action = gtk_application_window_activate_action;
+ iface->change_action_state = gtk_application_window_change_action_state;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]