Compare commits

...

3 Commits

Author SHA1 Message Date
Alberts Muktupāvels
138f457949 ui/shellDBus.js: move ShowOSD to org.gnome.Shell.OSD 2015-04-02 23:43:38 +03:00
Alberts Muktupāvels
7a049499f6 ui/shellDBus.js: move key grabber to org.gnome.Shell.KeyGrabber 2015-04-02 23:43:38 +03:00
Alberts Muktupāvels
4cb4157802 acquire 5 more dbus names
org.gnome.Shell.KeyGrabber, org.gnome.Shell.OSD,
org.gnome.Shell.Screencast, org.gnome.Shell.Screenshot,
org.gnome.SessionManager.EndSessionDialog
2015-04-02 23:43:38 +03:00
2 changed files with 35 additions and 9 deletions

View File

@ -22,9 +22,6 @@ const GnomeShellIface = '<node> \
<arg type="s" direction="out" name="result" /> \
</method> \
<method name="FocusSearch"/> \
<method name="ShowOSD"> \
<arg type="a{sv}" direction="in" name="params"/> \
</method> \
<method name="ShowMonitorLabels"> \
<arg type="a{uv}" direction="in" name="params" /> \
</method> \
@ -33,6 +30,14 @@ const GnomeShellIface = '<node> \
<arg type="s" direction="in" name="id"/> \
</method> \
<method name="ShowApplications" /> \
<property name="Mode" type="s" access="read" /> \
<property name="OverviewActive" type="b" access="readwrite" /> \
<property name="ShellVersion" type="s" access="read" /> \
</interface> \
</node>';
const GnomeShellKeyGrabberIface = '<node> \
<interface name="org.gnome.Shell.KeyGrabber"> \
<method name="GrabAccelerator"> \
<arg type="s" direction="in" name="accelerator"/> \
<arg type="u" direction="in" name="flags"/> \
@ -50,9 +55,14 @@ const GnomeShellIface = '<node> \
<arg name="action" type="u" /> \
<arg name="parameters" type="a{sv}" /> \
</signal> \
<property name="Mode" type="s" access="read" /> \
<property name="OverviewActive" type="b" access="readwrite" /> \
<property name="ShellVersion" type="s" access="read" /> \
</interface> \
</node>';
const GnomeShellOSDIface = '<node> \
<interface name="org.gnome.Shell.OSD"> \
<method name="ShowOSD"> \
<arg type="a{sv}" direction="in" name="params"/> \
</method> \
</interface> \
</node>';
@ -83,6 +93,12 @@ const GnomeShell = new Lang.Class({
this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(GnomeShellIface, this);
this._dbusImpl.export(Gio.DBus.session, '/org/gnome/Shell');
this._dbusKeyGrabberImpl = Gio.DBusExportedObject.wrapJSObject(GnomeShellKeyGrabberIface, this);
this._dbusKeyGrabberImpl.export(Gio.DBus.session, '/org/gnome/Shell/KeyGrabber');
this._dbusOSDImpl = Gio.DBusExportedObject.wrapJSObject(GnomeShellOSDIface, this);
this._dbusOSDImpl.export(Gio.DBus.session, '/org/gnome/Shell/OSD');
this._extensionsService = new GnomeShellExtensions();
this._screenshotService = new Screenshot.ScreenshotService();
@ -197,13 +213,13 @@ const GnomeShell = new Lang.Class({
if (!destination)
return;
let connection = this._dbusImpl.get_connection();
let info = this._dbusImpl.get_info();
let connection = this._dbusKeyGrabberImpl.get_connection();
let info = this._dbusKeyGrabberImpl.get_info();
let params = { 'device-id': GLib.Variant.new('u', deviceid),
'timestamp': GLib.Variant.new('u', timestamp),
'action-mode': GLib.Variant.new('u', Main.actionMode) };
connection.emit_signal(destination,
this._dbusImpl.get_object_path(),
this._dbusKeyGrabberImpl.get_object_path(),
info ? info.name : null,
'AcceleratorActivated',
GLib.Variant.new('(ua{sv})', [action, params]));

View File

@ -31,7 +31,12 @@
extern GType gnome_shell_plugin_get_type (void);
#define END_SESSION_DIALOG_DBUS_SERVICE "org.gnome.SessionManager.EndSessionDialog"
#define SHELL_DBUS_SERVICE "org.gnome.Shell"
#define SHELL_KEY_GRABBER_DBUS_SERVICE "org.gnome.Shell.KeyGrabber"
#define SHELL_OSD_DBUS_SERVICE "org.gnome.Shell.OSD"
#define SHELL_SCREENCAST_DBUS_SERVICE "org.gnome.Shell.Screencast"
#define SHELL_SCREENSHOT_DBUS_SERVICE "org.gnome.Shell.Screenshot"
#define MAGNIFIER_DBUS_SERVICE "org.gnome.Magnifier"
#define OVERRIDES_SCHEMA "org.gnome.shell.overrides"
@ -159,6 +164,11 @@ shell_dbus_init (gboolean replace)
MAGNIFIER_DBUS_SERVICE, FALSE,
/* ...and the org.freedesktop.Notifications service. */
"org.freedesktop.Notifications", FALSE,
END_SESSION_DIALOG_DBUS_SERVICE, TRUE,
SHELL_KEY_GRABBER_DBUS_SERVICE, TRUE,
SHELL_OSD_DBUS_SERVICE, TRUE,
SHELL_SCREENCAST_DBUS_SERVICE, TRUE,
SHELL_SCREENSHOT_DBUS_SERVICE, TRUE,
NULL);
/* ...and the on-screen keyboard service */
shell_dbus_acquire_name (bus,