[gnome-shell] viewSelector: stop launching app from empty search



commit 8ca25aed8b3d0340393e5222239183d5650bc549
Author: Hashem Nasarat <hnasarat gmail com>
Date:   Sun Jan 27 14:00:59 2013 -0500

    viewSelector: stop launching app from empty search
    
    In the overview, when there is no text in the search entry, this._searchActive
    will be set to false. Moving the Clutter.Return code block ensures that
    pressing enter in the search field after deleting the characters of a search
    will no longer launch the #1 application for the previous search.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=692391

 js/ui/viewSelector.js |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index c45057c..06cd436 100644
--- a/js/ui/viewSelector.js
+++ b/js/ui/viewSelector.js
@@ -368,15 +368,6 @@ const ViewSelector = new Lang.Class({
                 this.reset();
                 return true;
             }
-        } else if (symbol == Clutter.Return || symbol == Clutter.KP_Enter) {
-            // We can't connect to 'activate' here because search providers
-            // might want to do something with the modifiers in activateDefault.
-            if (this._searchTimeoutId > 0) {
-                Mainloop.source_remove(this._searchTimeoutId);
-                this._doSearch();
-            }
-            this._searchResults.activateDefault();
-            return true;
         } else if (this._searchActive) {
             let arrowNext, nextDirection;
             if (entry.get_text_direction() == Clutter.TextDirection.RTL) {
@@ -401,6 +392,15 @@ const ViewSelector = new Lang.Class({
             } else if (symbol == arrowNext && this._text.position == -1) {
                 this._searchResults.navigateFocus(nextDirection);
                 return true;
+            } else if (symbol == Clutter.Return || symbol == Clutter.KP_Enter) {
+                // We can't connect to 'activate' here because search providers
+                // might want to do something with the modifiers in activateDefault.
+                if (this._searchTimeoutId > 0) {
+                    Mainloop.source_remove(this._searchTimeoutId);
+                    this._doSearch();
+                }
+                this._searchResults.activateDefault();
+                return true;
             }
         }
         return false;



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