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

@ -36,11 +36,9 @@ const CROSS_HAIRS_CLIP_KEY = 'cross-hairs-clip';
let magDBusService = null;
function Magnifier() {
this._init();
}
const Magnifier = new Lang.Class({
Name: 'Magnifier',
Magnifier.prototype = {
_init: function() {
// Magnifier is a manager of ZoomRegions.
this._zoomRegions = [];
@ -543,14 +541,12 @@ Magnifier.prototype = {
);
}
}
};
});
Signals.addSignalMethods(Magnifier.prototype);
function ZoomRegion(magnifier, mouseSourceActor) {
this._init(magnifier, mouseSourceActor);
}
const ZoomRegion = new Lang.Class({
Name: 'ZoomRegion',
ZoomRegion.prototype = {
_init: function(magnifier, mouseSourceActor) {
this._magnifier = magnifier;
@ -1150,13 +1146,11 @@ ZoomRegion.prototype = {
yMagMouse - groupHeight / 2);
}
}
};
});
function Crosshairs() {
this._init();
}
const Crosshairs = new Lang.Class({
Name: 'Crosshairs',
Crosshairs.prototype = {
_init: function() {
// Set the group containing the crosshairs to three times the desktop
@ -1412,4 +1406,4 @@ Crosshairs.prototype = {
this._vertTopHair.set_position((groupWidth - thickness) / 2, top);
this._vertBottomHair.set_position((groupWidth - thickness) / 2, bottom);
}
};
});