[gnome-shell/wip/flashback: 2/4] ui/shellDBus.js: move key grabber to org.gnome.Shell.KeyGrabber



commit 657c5cb63b061633f59c6e53935bd7fdf13fde08
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sat Dec 13 23:15:18 2014 +0200

    ui/shellDBus.js: move key grabber to org.gnome.Shell.KeyGrabber

 js/ui/shellDBus.js |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/shellDBus.js b/js/ui/shellDBus.js
index 45a2054..e8f2788 100644
--- a/js/ui/shellDBus.js
+++ b/js/ui/shellDBus.js
@@ -29,6 +29,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"/> \
@@ -47,9 +55,6 @@ const GnomeShellIface = '<node> \
     <arg name="deviceid" type="u" /> \
     <arg name="timestamp" type="u" /> \
 </signal> \
-<property name="Mode" type="s" access="read" /> \
-<property name="OverviewActive" type="b" access="readwrite" /> \
-<property name="ShellVersion" type="s" access="read" /> \
 </interface> \
 </node>';
 
@@ -80,6 +85,9 @@ 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._extensionsService = new GnomeShellExtensions();
         this._screenshotService = new Screenshot.ScreenshotService();
 
@@ -194,10 +202,10 @@ 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();
         connection.emit_signal(destination,
-                               this._dbusImpl.get_object_path(),
+                               this._dbusKeyGrabberImpl.get_object_path(),
                                info ? info.name : null,
                                'AcceleratorActivated',
                                GLib.Variant.new('(uuu)', [action, deviceid, timestamp]));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]