mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-04 18:26:19 +01:00
parent
888a52034b
commit
45818762d3
@ -41,7 +41,6 @@ get_interface (const gchar *name)
|
|||||||
{
|
{
|
||||||
static GDBusInterfaceInfo *org_gtk_Application;
|
static GDBusInterfaceInfo *org_gtk_Application;
|
||||||
static GDBusInterfaceInfo *org_gtk_private_CommandLine;
|
static GDBusInterfaceInfo *org_gtk_private_CommandLine;
|
||||||
static GDBusInterfaceInfo *org_gtk_Actions;
|
|
||||||
|
|
||||||
if (org_gtk_Application == NULL)
|
if (org_gtk_Application == NULL)
|
||||||
{
|
{
|
||||||
@ -74,21 +73,6 @@ get_interface (const gchar *name)
|
|||||||
" <arg type='s' name='message' direction='in'/>"
|
" <arg type='s' name='message' direction='in'/>"
|
||||||
" </method>"
|
" </method>"
|
||||||
" </interface>"
|
" </interface>"
|
||||||
" <interface name='org.gtk.Actions'>"
|
|
||||||
" <method name='DescribeAll'>"
|
|
||||||
" <arg type='a(savbav)' name='list' direction='out'/>"
|
|
||||||
" </method>"
|
|
||||||
" <method name='SetState'>"
|
|
||||||
" <arg type='s' name='action_name' direction='in'/>"
|
|
||||||
" <arg type='v' name='value' direction='in'/>"
|
|
||||||
" <arg type='a{sv}' name='platform_data' direction='in'/>"
|
|
||||||
" </method>"
|
|
||||||
" <method name='Activate'>"
|
|
||||||
" <arg type='s' name='action_name' direction='in'/>"
|
|
||||||
" <arg type='av' name='parameter' direction='in'/>"
|
|
||||||
" <arg type='a{sv}' name='platform_data' direction='in'/>"
|
|
||||||
" </method>"
|
|
||||||
" </interface>"
|
|
||||||
"</node>", &error);
|
"</node>", &error);
|
||||||
|
|
||||||
if (info == NULL)
|
if (info == NULL)
|
||||||
@ -102,19 +86,13 @@ get_interface (const gchar *name)
|
|||||||
g_assert (org_gtk_private_CommandLine != NULL);
|
g_assert (org_gtk_private_CommandLine != NULL);
|
||||||
g_dbus_interface_info_ref (org_gtk_private_CommandLine);
|
g_dbus_interface_info_ref (org_gtk_private_CommandLine);
|
||||||
|
|
||||||
org_gtk_Actions = g_dbus_node_info_lookup_interface (info, "org.gtk.Actions");
|
|
||||||
g_assert (org_gtk_Actions != NULL);
|
|
||||||
g_dbus_interface_info_ref (org_gtk_Actions);
|
|
||||||
|
|
||||||
g_dbus_node_info_unref (info);
|
g_dbus_node_info_unref (info);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp (name, "org.gtk.Application") == 0)
|
if (strcmp (name, "org.gtk.Application") == 0)
|
||||||
return org_gtk_Application;
|
return org_gtk_Application;
|
||||||
else if (strcmp (name, "org.gtk.private.CommandLine") == 0)
|
|
||||||
return org_gtk_private_CommandLine;
|
|
||||||
else
|
else
|
||||||
return org_gtk_Actions;
|
return org_gtk_private_CommandLine;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* GApplication implementation {{{1 */
|
/* GApplication implementation {{{1 */
|
||||||
@ -606,7 +584,8 @@ g_application_impl_register (GApplication *application,
|
|||||||
impl->action_id =
|
impl->action_id =
|
||||||
g_dbus_connection_register_object (impl->session_bus,
|
g_dbus_connection_register_object (impl->session_bus,
|
||||||
impl->object_path,
|
impl->object_path,
|
||||||
get_interface ("org.gtk.Actions"),
|
(GDBusInterfaceInfo *)
|
||||||
|
&org_gtk_Actions,
|
||||||
&actions_vtable,
|
&actions_vtable,
|
||||||
impl, NULL, error);
|
impl, NULL, error);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user