Port to GDBus 2

The GDBus bindings in gjs have been updated to leverage metaclasses
and gobject inheritance, which should result in cleaner and more
maintainable code.
This commit is contained in:
Giovanni Campagna
2011-12-10 14:54:39 +01:00
parent aef9b733e5
commit a6b4d68a1d
20 changed files with 543 additions and 286 deletions

View File

@ -2,7 +2,6 @@
const Caribou = imports.gi.Caribou;
const Clutter = imports.gi.Clutter;
const DBus = imports.dbus;
const Gdk = imports.gi.Gdk;
const Gio = imports.gi.Gio;
const GLib = imports.gi.GLib;
@ -191,13 +190,14 @@ const Key = new Lang.Class({
}
});
const Keyboard = new Lang.Class({
const Keyboard = new Gio.DBusImplementerClass({
// HACK: we can't set Name, because it collides with Name dbus property
// Name: 'Keyboard',
Interface: CaribouKeyboardIface,
_init: function () {
this._impl = Gio.DBusExportedObject.wrapJSObject(CaribouKeyboardIface, this);
this._impl.export(Gio.DBus.session, '/org/gnome/Caribou/Keyboard');
this.parent();
this.export(Gio.DBus.session, '/org/gnome/Caribou/Keyboard');
this.actor = null;
this._focusInTray = false;