Port GDM and Caribou to GDBus
During the mass port to GDBus, this classes were left out (probably because they didn't exist at the time). Now it's time to update them. https://bugzilla.gnome.org/show_bug.cgi?id=664436
This commit is contained in:
parent
d6b6f814d3
commit
0996174b3d
@ -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 = <interface name='org.freedesktop.ConsoleKit.Manager'>
|
||||
<method name='CanRestart'>
|
||||
<arg type='b' direction='out'/>
|
||||
</method>
|
||||
<method name='CanStop'>
|
||||
<arg type='b' direction='out'/>
|
||||
</method>
|
||||
<method name='Restart' />
|
||||
<method name='Stop' />
|
||||
</interface>;
|
||||
|
||||
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);
|
||||
|
@ -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 = <interface name='net.reactivated.Fprint.Manager'>
|
||||
<method name='GetDefaultDevice'>
|
||||
<arg type='o' direction='out' />
|
||||
</method>
|
||||
</interface>;
|
||||
|
||||
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);
|
||||
|
@ -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;
|
||||
|
@ -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 = <interface name='org.gnome.Caribou.Keyboard'>
|
||||
<method name='Show'>
|
||||
<arg type='u' direction='in' />
|
||||
</method>
|
||||
<method name='Hide'>
|
||||
<arg type='u' direction='in' />
|
||||
</method>
|
||||
<method name='SetCursorLocation'>
|
||||
<arg type='i' direction='in' />
|
||||
<arg type='i' direction='in' />
|
||||
<arg type='i' direction='in' />
|
||||
<arg type='i' direction='in' />
|
||||
</method>
|
||||
<method name='SetEntryLocation'>
|
||||
<arg type='i' direction='in' />
|
||||
<arg type='i' direction='in' />
|
||||
<arg type='i' direction='in' />
|
||||
<arg type='i' direction='in' />
|
||||
</method>
|
||||
<property name='Name' access='read' type='s' />
|
||||
</interface>;
|
||||
|
||||
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',
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user