diff --git a/gio/gapplication.c b/gio/gapplication.c index 02a0cf61c..1cf12233c 100644 --- a/gio/gapplication.c +++ b/gio/gapplication.c @@ -1646,12 +1646,11 @@ g_application_change_action_state (GActionGroup *action_group, g_return_if_fail (application->priv->is_registered); if (application->priv->remote_actions) - return g_action_group_change_action_state (application->priv->remote_actions, - action_name, value); + g_application_impl_change_action_state (application->priv->impl, action_name, value, + get_platform_data (application)); else - g_action_group_change_action_state (application->priv->actions, - action_name, value); + g_action_group_change_action_state (application->priv->actions, action_name, value); } static void @@ -1665,13 +1664,12 @@ g_application_activate_action (GActionGroup *action_group, application->priv->actions != NULL); g_return_if_fail (application->priv->is_registered); - if (application->priv->remote_actions) - return g_action_group_activate_action (application->priv->remote_actions, - action_name, parameter); + if (application->priv->is_remote) + g_application_impl_activate_action (application->priv->impl, action_name, parameter, + get_platform_data (application)); else - g_action_group_activate_action (application->priv->actions, - action_name, parameter); + g_action_group_activate_action (application->priv->actions, action_name, parameter); } static GAction * diff --git a/gio/gapplicationimpl-dbus.c b/gio/gapplicationimpl-dbus.c index 3d15f5246..da0465ad7 100644 --- a/gio/gapplicationimpl-dbus.c +++ b/gio/gapplicationimpl-dbus.c @@ -86,6 +86,7 @@ static GDBusInterfaceInfo *org_gtk_private_CommandLine; struct _GApplicationImpl { GDBusConnection *session_bus; + GDBusActionGroup *remote_actions; const gchar *bus_name; gchar *object_path; @@ -543,6 +544,7 @@ g_application_impl_register (GApplication *application, } *remote_actions = G_ACTION_GROUP (actions); + impl->remote_actions = actions; return impl; } @@ -591,6 +593,24 @@ g_application_impl_open (GApplicationImpl *impl, NULL, 0, -1, NULL, NULL, NULL); } +void +g_application_impl_activate_action (GApplicationImpl *impl, + const gchar *action_name, + GVariant *parameter, + GVariant *platform_data) +{ + g_dbus_action_group_activate_action_full (impl->remote_actions, action_name, parameter, platform_data); +} + +void +g_application_impl_change_action_state (GApplicationImpl *impl, + const gchar *action_name, + GVariant *value, + GVariant *platform_data) +{ + g_dbus_action_group_change_action_state_full (impl->remote_actions, action_name, value, platform_data); +} + static void g_application_impl_cmdline_method_call (GDBusConnection *connection, const gchar *sender, diff --git a/gio/gapplicationimpl.h b/gio/gapplicationimpl.h index 0072c545d..c00bbf78c 100644 --- a/gio/gapplicationimpl.h +++ b/gio/gapplicationimpl.h @@ -33,6 +33,18 @@ void g_application_impl_open (GApplic const gchar *hint, GVariant *platform_data); +G_GNUC_INTERNAL +void g_application_impl_activate_action (GApplicationImpl *impl, + const gchar *action_name, + GVariant *parameter, + GVariant *platform_data); + +G_GNUC_INTERNAL +void g_application_impl_change_action_state (GApplicationImpl *impl, + const gchar *action_name, + GVariant *value, + GVariant *platform_data); + G_GNUC_INTERNAL int g_application_impl_command_line (GApplicationImpl *impl, gchar **arguments,