[the-board] [ui] Add active-changed signal and active getter to ToolBoxGroup
- From: Lucas Almeida Rocha <lucasr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [the-board] [ui] Add active-changed signal and active getter to ToolBoxGroup
- Date: Wed, 3 Nov 2010 22:59:24 +0000 (UTC)
commit 3cb1cbd4d2773ab5b4c8479c4b2a490e06253a14
Author: Lucas Rocha <lucasr gnome org>
Date: Wed Nov 3 22:29:47 2010 +0000
[ui] Add active-changed signal and active getter to ToolBoxGroup
src/js/ui/toolBoxGroup.js | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/js/ui/toolBoxGroup.js b/src/js/ui/toolBoxGroup.js
index ea05278..65e834d 100644
--- a/src/js/ui/toolBoxGroup.js
+++ b/src/js/ui/toolBoxGroup.js
@@ -1,5 +1,6 @@
// standard imports
const Lang = imports.lang;
+const Signals = imports.signals;
const Tweener = imports.tweener.tweener;
// gi imports
@@ -76,6 +77,8 @@ ToolBoxGroup.prototype = {
this._activeToolBox.setActive(true);
this._activeToolBox.actor.depth = _TOOLBOX_ACTIVE_DEPTH;
}
+
+ this.emit("active-changed");
},
_showToolBoxes : function() {
@@ -151,7 +154,13 @@ ToolBoxGroup.prototype = {
}
},
+ get active() {
+ return (this._activeToolBox !== null);
+ },
+
get actor() {
return this._mainBox;
}
}
+
+Signals.addSignalMethods(ToolBoxGroup.prototype);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]