diff --git a/js/gdm/consoleKit.js b/js/gdm/consoleKit.js index 99465cb76..6445a8c04 100644 --- a/js/gdm/consoleKit.js +++ b/js/gdm/consoleKit.js @@ -1,32 +1,22 @@ // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- -const DBus = imports.dbus; +const Gio = imports.gi.Gio; -const ConsoleKitManagerIface = { - name: 'org.freedesktop.ConsoleKit.Manager', - methods: [{ name: 'CanRestart', - inSignature: '', - outSignature: 'b' }, - { name: 'CanStop', - inSignature: '', - outSignature: 'b' }, - { name: 'Restart', - inSignature: '', - outSignature: '' }, - { name: 'Stop', - inSignature: '', - outSignature: '' }] -}; +const ConsoleKitManagerIface = + + + + + + + + +; + +const ConsoleKitProxy = Gio.DBusProxy.makeProxyWrapper(ConsoleKitManagerIface); function ConsoleKitManager() { - this._init(); + return new ConsoleKitProxy(Gio.DBus.system, + 'org.freedesktop.ConsoleKit', + '/org/freedesktop/ConsoleKit/Manager'); }; - -ConsoleKitManager.prototype = { - _init: function() { - DBus.system.proxifyObject(this, - 'org.freedesktop.ConsoleKit', - '/org/freedesktop/ConsoleKit/Manager'); - } -}; -DBus.proxifyPrototype(ConsoleKitManager.prototype, ConsoleKitManagerIface); diff --git a/js/gdm/fingerprint.js b/js/gdm/fingerprint.js index 9892ef8eb..9c090b08a 100644 --- a/js/gdm/fingerprint.js +++ b/js/gdm/fingerprint.js @@ -1,26 +1,20 @@ // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- -const DBus = imports.dbus; +const Gio = imports.gi.Gio; const Lang = imports.lang; const Shell = imports.gi.Shell; const Signals = imports.signals; -const FprintManagerIface = { - name: 'net.reactivated.Fprint.Manager', - methods: [{ name: 'GetDefaultDevice', - inSignature: '', - outSignature: 'o' }] -}; +const FprintManagerIface = + + + +; + +const FprintManagerProxy = Gio.DBusProxy.makeProxyWrapper(FprintManagerIface); function FprintManager() { - this._init(); + return new FprintManagerProxy(Gio.DBus.system, + 'net.reactivated.Fprint', + '/net/reactivated/Fprint/Manager'); }; - -FprintManager.prototype = { - _init: function() { - DBus.system.proxifyObject(this, - 'net.reactivated.Fprint', - '/net/reactivated/Fprint/Manager'); - } -}; -DBus.proxifyPrototype(FprintManager.prototype, FprintManagerIface); diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js index 810920617..0113dc8c9 100644 --- a/js/gdm/loginDialog.js +++ b/js/gdm/loginDialog.js @@ -33,7 +33,6 @@ const St = imports.gi.St; const GdmGreeter = imports.gi.GdmGreeter; const Batch = imports.gdm.batch; -const DBus = imports.dbus; const Fprint = imports.gdm.fingerprint; const Lightbox = imports.ui.lightbox; const Main = imports.ui.main; @@ -908,7 +907,7 @@ const LoginDialog = new Lang.Class({ if (!this._settings.get_boolean(_FINGERPRINT_AUTHENTICATION_KEY)) return; - this._fprintManager.GetDefaultDeviceRemote(DBus.CALL_FLAG_START, Lang.bind(this, + this._fprintManager.GetDefaultDeviceRemote(Gio.DBusCallFlags.NONE, Lang.bind(this, function(device, error) { if (!error && device) this._haveFingerprintReader = true; diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index 2bf7868c2..a427f17ba 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -39,28 +39,27 @@ const PRETTY_KEYS = { 'Alt_L': 'Alt' }; -const CaribouKeyboardIface = { - name: 'org.gnome.Caribou.Keyboard', - methods: [ { name: 'Show', - inSignature: 'u', - outSignature: '' - }, - { name: 'Hide', - inSignature: 'u', - outSignature: '' - }, - { name: 'SetCursorLocation', - inSignature: 'iiii', - outSignature: '' - }, - { name: 'SetEntryLocation', - inSignature: 'iiii', - outSignature: '' - } ], - properties: [ { name: 'Name', - signature: 's', - access: 'read' } ] -}; +const CaribouKeyboardIface = + + + + + + + + + + + + + + + + + + + +; function Key() { this._init.apply(this, arguments); @@ -200,7 +199,8 @@ function Keyboard() { Keyboard.prototype = { _init: function () { - DBus.session.exportObject('/org/gnome/Caribou/Keyboard', this); + this._impl = Gio.DBusExportedObject.wrapJSObject(CaribouKeyboardIface, this); + this._impl.export(Gio.DBus.session, '/org/gnome/Caribou/Keyboard'); this.actor = null; @@ -533,7 +533,6 @@ Keyboard.prototype = { return 'gnome-shell'; } }; -DBus.conformExport(Keyboard.prototype, CaribouKeyboardIface); const KeyboardSource = new Lang.Class({ Name: 'KeyboardSource', diff --git a/js/ui/status/accessibility.js b/js/ui/status/accessibility.js index 2804da3f1..4173c7353 100644 --- a/js/ui/status/accessibility.js +++ b/js/ui/status/accessibility.js @@ -1,6 +1,5 @@ // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- -const DBus = imports.dbus; const GDesktopEnums = imports.gi.GDesktopEnums; const Gio = imports.gi.Gio; const Gtk = imports.gi.Gtk;