[the-board] [ui] Pressing Escape unselects all things on Page



commit 8e10c8646636b53391a726657f9887f45cd9c240
Author: Lucas Rocha <lucasr gnome org>
Date:   Fri Jan 14 01:31:12 2011 +0000

    [ui] Pressing Escape unselects all things on Page

 src/js/ui/mainWindow.js |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/js/ui/mainWindow.js b/src/js/ui/mainWindow.js
index a0fd3bb..a42b480 100644
--- a/src/js/ui/mainWindow.js
+++ b/src/js/ui/mainWindow.js
@@ -721,7 +721,11 @@ MainWindow.prototype = {
         } else if (isControl && text == 'a') {
             this._currentPage.selectAllThings();
         } else if (key == Clutter.Escape) {
-            this._hideGtkWindow();
+            if (this._currentPage.selectedThings.length > 0) {
+                this._currentPage.unselectAllThings();
+            } else {
+                this._hideGtkWindow();
+            }
         } else if (text == 't') {
             this._currentPage.addThingFromState({ id: 'note' });
             return true;



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