[gnome-shell] [dash] Avoid infinite recursion in keynav



commit 4394bc3e4039566cce543e416ae027281c1d7557
Author: Colin Walters <walters verbum org>
Date:   Fri Dec 18 10:39:02 2009 -0500

    [dash] Avoid infinite recursion in keynav

 js/ui/dash.js |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/js/ui/dash.js b/js/ui/dash.js
index 3fe7e95..f70be4d 100644
--- a/js/ui/dash.js
+++ b/js/ui/dash.js
@@ -514,7 +514,7 @@ SearchResults.prototype = {
             meta.count.set_text(""+providerResults.length);
         }
 
-        this.selectDown();
+        this.selectDown(false);
 
         return true;
     },
@@ -535,7 +535,7 @@ SearchResults.prototype = {
         return resultDisplay.selectIndex(index);
     },
 
-    selectUp: function() {
+    selectUp: function(recursing) {
         for (let i = this._selectedProvider; i >= 0; i--) {
             let meta = this._providerMeta[i];
             if (!meta.actor.visible)
@@ -546,13 +546,13 @@ SearchResults.prototype = {
                 return;
             }
         }
-        if (this._providerMeta.length > 0) {
+        if (this._providerMeta.length > 0 && !recursing) {
             this._selectedProvider = this._providerMeta.length - 1;
-            this.selectUp();
+            this.selectUp(true);
         }
     },
 
-    selectDown: function() {
+    selectDown: function(recursing) {
         let current = this._selectedProvider;
         if (current == -1)
             current = 0;
@@ -566,9 +566,9 @@ SearchResults.prototype = {
                 return;
             }
         }
-        if (this._providerMeta.length > 0) {
+        if (this._providerMeta.length > 0 && !recursing) {
             this._selectedProvider = 0;
-            this.selectDown();
+            this.selectDown(true);
         }
     },
 
@@ -834,14 +834,14 @@ Dash.prototype = {
             } else if (symbol == Clutter.Up) {
                 if (!this._searchActive)
                     return true;
-                this.searchResults.selectUp();
+                this.searchResults.selectUp(false);
 
                 return true;
             } else if (symbol == Clutter.Down) {
                 if (!this._searchActive)
                     return true;
 
-                this.searchResults.selectDown();
+                this.searchResults.selectDown(false);
                 return true;
             }
             return false;



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