[gnome-shell] gtkactionmuxer.c: Pass the platform data when activating actions as well
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] gtkactionmuxer.c: Pass the platform data when activating actions as well
- Date: Tue, 7 Apr 2015 16:46:24 +0000 (UTC)
commit 92667e3b7ff8e809c6652105e2718a9f02abc2ef
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Tue Apr 7 10:44:55 2015 -0400
gtkactionmuxer.c: Pass the platform data when activating actions as well
The code from a6a2cea414 only passed a timestamp when changing an action
state, but the timestamp also to be passed when activating actions.
https://bugzilla.gnome.org/show_bug.cgi?id=747323
src/gtkactionmuxer.c | 41 ++++++++++++++++++++++++-----------------
1 files changed, 24 insertions(+), 17 deletions(-)
---
diff --git a/src/gtkactionmuxer.c b/src/gtkactionmuxer.c
index 155e00b..9329a94 100644
--- a/src/gtkactionmuxer.c
+++ b/src/gtkactionmuxer.c
@@ -398,23 +398,6 @@ gtk_action_muxer_query_action (GActionGroup *action_group,
return FALSE;
}
-static void
-gtk_action_muxer_activate_action (GActionGroup *action_group,
- const gchar *action_name,
- GVariant *parameter)
-{
- GtkActionMuxer *muxer = GTK_ACTION_MUXER (action_group);
- Group *group;
- const gchar *unprefixed_name;
-
- group = gtk_action_muxer_find_group (muxer, action_name, &unprefixed_name);
-
- if (group)
- g_action_group_activate_action (group->group, unprefixed_name, parameter);
- else if (muxer->parent)
- g_action_group_activate_action (G_ACTION_GROUP (muxer->parent), action_name, parameter);
-}
-
static GVariant *
get_platform_data (void)
{
@@ -436,6 +419,30 @@ get_platform_data (void)
}
static void
+gtk_action_muxer_activate_action (GActionGroup *action_group,
+ const gchar *action_name,
+ GVariant *parameter)
+{
+ GtkActionMuxer *muxer = GTK_ACTION_MUXER (action_group);
+ Group *group;
+ const gchar *unprefixed_name;
+
+ group = gtk_action_muxer_find_group (muxer, action_name, &unprefixed_name);
+
+ if (group)
+ {
+ if (G_IS_REMOTE_ACTION_GROUP (group->group))
+ g_remote_action_group_activate_action_full (G_REMOTE_ACTION_GROUP (group->group),
+ unprefixed_name, parameter,
+ get_platform_data ());
+ else
+ g_action_group_activate_action (group->group, unprefixed_name, parameter);
+ }
+ else if (muxer->parent)
+ g_action_group_activate_action (G_ACTION_GROUP (muxer->parent), action_name, parameter);
+}
+
+static void
gtk_action_muxer_change_action_state (GActionGroup *action_group,
const gchar *action_name,
GVariant *state)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]