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
This commit is contained in:
Owen W. Taylor 2015-04-07 10:44:55 -04:00
parent a0632e3e02
commit 92667e3b7f

View File

@ -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)
{
@ -435,6 +418,30 @@ get_platform_data (void)
return result;
}
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,