candidatePanel: Use the Lang.Class framework

This commit is contained in:
Rui Matos 2012-05-03 13:11:45 +02:00
parent cf0bb62f40
commit a8fa0b8146

View File

@ -34,11 +34,9 @@ const ORIENTATION_HORIZONTAL = 0;
const ORIENTATION_VERTICAL = 1; const ORIENTATION_VERTICAL = 1;
const ORIENTATION_SYSTEM = 2; const ORIENTATION_SYSTEM = 2;
function StCandidateArea(orientation) { const StCandidateArea = new Lang.Class({
this._init(orientation); Name: 'StCandidateArea',
}
StCandidateArea.prototype = {
_init: function(orientation) { _init: function(orientation) {
this.actor = new St.BoxLayout({ style_class: 'candidate-area' }); this.actor = new St.BoxLayout({ style_class: 'candidate-area' });
this._orientation = orientation; this._orientation = orientation;
@ -210,15 +208,12 @@ StCandidateArea.prototype = {
hideAll: function() { hideAll: function() {
this.actor.hide(); this.actor.hide();
}, },
}; });
Signals.addSignalMethods(StCandidateArea.prototype); Signals.addSignalMethods(StCandidateArea.prototype);
function CandidatePanel() { const CandidatePanel = new Lang.Class({
this._init(); Name: 'CandidatePanel',
}
CandidatePanel.prototype = {
_init: function() { _init: function() {
this._orientation = ORIENTATION_VERTICAL; this._orientation = ORIENTATION_VERTICAL;
this._currentOrientation = this._orientation; this._currentOrientation = this._orientation;
@ -585,6 +580,5 @@ CandidatePanel.prototype = {
move: function(x, y) { move: function(x, y) {
this.actor.set_position(x, y); this.actor.set_position(x, y);
} }
}; });
Signals.addSignalMethods(CandidatePanel.prototype); Signals.addSignalMethods(CandidatePanel.prototype);