[gnome-shell/wip/input-sources: 6/6] candidatePanel: Use the Lang.Class framework
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/input-sources: 6/6] candidatePanel: Use the Lang.Class framework
- Date: Thu, 3 May 2012 11:31:41 +0000 (UTC)
commit a8fa0b81461813fbb261c901c9e1fb33cb854651
Author: Rui Matos <tiagomatos gmail com>
Date: Thu May 3 13:11:45 2012 +0200
candidatePanel: Use the Lang.Class framework
js/ui/status/candidatePanel.js | 18 ++++++------------
1 files changed, 6 insertions(+), 12 deletions(-)
---
diff --git a/js/ui/status/candidatePanel.js b/js/ui/status/candidatePanel.js
index deb4ddd..fd95da2 100644
--- a/js/ui/status/candidatePanel.js
+++ b/js/ui/status/candidatePanel.js
@@ -34,11 +34,9 @@ const ORIENTATION_HORIZONTAL = 0;
const ORIENTATION_VERTICAL = 1;
const ORIENTATION_SYSTEM = 2;
-function StCandidateArea(orientation) {
- this._init(orientation);
-}
+const StCandidateArea = new Lang.Class({
+ Name: 'StCandidateArea',
-StCandidateArea.prototype = {
_init: function(orientation) {
this.actor = new St.BoxLayout({ style_class: 'candidate-area' });
this._orientation = orientation;
@@ -210,15 +208,12 @@ StCandidateArea.prototype = {
hideAll: function() {
this.actor.hide();
},
-};
-
+});
Signals.addSignalMethods(StCandidateArea.prototype);
-function CandidatePanel() {
- this._init();
-}
+const CandidatePanel = new Lang.Class({
+ Name: 'CandidatePanel',
-CandidatePanel.prototype = {
_init: function() {
this._orientation = ORIENTATION_VERTICAL;
this._currentOrientation = this._orientation;
@@ -585,6 +580,5 @@ CandidatePanel.prototype = {
move: function(x, y) {
this.actor.set_position(x, y);
}
-};
-
+});
Signals.addSignalMethods(CandidatePanel.prototype);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]