Port everything to class framework

The last patch in the sequence. Every place that was previously
setting prototype has been ported to Lang.Class, to make code more
concise and allow for better toString().

https://bugzilla.gnome.org/show_bug.cgi?id=664436
This commit is contained in:
Giovanni Campagna
2011-11-20 18:56:27 +01:00
parent 0996174b3d
commit 17c46c2452
48 changed files with 295 additions and 489 deletions

View File

@ -61,11 +61,9 @@ const CaribouKeyboardIface = <interface name='org.gnome.Caribou.Keyboard'>
<property name='Name' access='read' type='s' />
</interface>;
function Key() {
this._init.apply(this, arguments);
}
const Key = new Lang.Class({
Name: 'Key',
Key.prototype = {
_init : function(key) {
this._key = key;
@ -191,13 +189,12 @@ Key.prototype = {
this._boxPointer.hide(true);
}
}
};
});
function Keyboard() {
this._init.apply(this, arguments);
}
const Keyboard = new Lang.Class({
// HACK: we can't set Name, because it collides with Name dbus property
// Name: 'Keyboard',
Keyboard.prototype = {
_init: function () {
this._impl = Gio.DBusExportedObject.wrapJSObject(CaribouKeyboardIface, this);
this._impl.export(Gio.DBus.session, '/org/gnome/Caribou/Keyboard');
@ -532,7 +529,7 @@ Keyboard.prototype = {
get Name() {
return 'gnome-shell';
}
};
});
const KeyboardSource = new Lang.Class({
Name: 'KeyboardSource',