[the-board] [ui] Always set active when starting/stopping editing page title



commit 0e2b191849f686153188f8b97db8236b4ec2fc73
Author: Lucas Rocha <lucasr gnome org>
Date:   Wed Dec 8 01:19:52 2010 +0000

    [ui] Always set active when starting/stopping editing page title

 src/js/ui/toolBoxPages.js |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/js/ui/toolBoxPages.js b/src/js/ui/toolBoxPages.js
index cba55da..f3a1bea 100644
--- a/src/js/ui/toolBoxPages.js
+++ b/src/js/ui/toolBoxPages.js
@@ -278,6 +278,8 @@ ToolBoxPages.prototype = {
 
         this._updateActionButton();
         this._hidePagesList();
+
+        this.setActive(true);
     },
 
     _stopEditingTitle : function(commitChanges) {
@@ -296,6 +298,8 @@ ToolBoxPages.prototype = {
             this._pageLabel.text = this._pageModel.title ||
                                    Gettext.gettext("Untitled");
         }
+
+        this.setActive(false);
     },
 
     _findButtonByPageModel : function(pageModel) {
@@ -366,11 +370,9 @@ ToolBoxPages.prototype = {
         switch (key) {
         case Clutter.Return:
             this._stopEditingTitle(true /* commit changes */);
-            this.setActive(false);
             return true;
         case Clutter.Escape:
             this._stopEditingTitle(false /* cancel changes */);
-            this.setActive(false);
             return true;
         }
 
@@ -379,7 +381,6 @@ ToolBoxPages.prototype = {
 
     _onButtonBoxClicked : function() {
         this._startEditingTitle();
-        this.setActive(true);
     },
 
     _onPageManagerStateChanged : function() {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]