[glib] GApplication: send platform data for actions again
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] GApplication: send platform data for actions again
- Date: Sat, 17 Dec 2011 03:24:52 +0000 (UTC)
commit ee9f104432ee1ed0bf1e7461cf3264d0f0f1d297
Author: Ryan Lortie <desrt desrt ca>
Date: Fri Dec 16 22:24:03 2011 -0500
GApplication: send platform data for actions again
Use the _full variants of the GDBusActionGroup API to send platform data
for action invocations once again.
gio/gapplication.c | 16 +++++++---------
gio/gapplicationimpl-dbus.c | 20 ++++++++++++++++++++
gio/gapplicationimpl.h | 12 ++++++++++++
3 files changed, 39 insertions(+), 9 deletions(-)
---
diff --git a/gio/gapplication.c b/gio/gapplication.c
index 02a0cf6..1cf1223 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 3d15f52..da0465a 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 0072c54..c00bbf7 100644
--- a/gio/gapplicationimpl.h
+++ b/gio/gapplicationimpl.h
@@ -34,6 +34,18 @@ void g_application_impl_open (GApplic
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,
GVariant *platform_data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]