[gnome-shell] Fix syntax error in previous patch



commit 36775c9a58c9e5cf333bae2697d6df89f284543b
Author: Colin Walters <walters verbum org>
Date:   Tue May 26 12:56:38 2009 -0400

    Fix syntax error in previous patch
    
    Also some style/logic cleanups pointed out by Marina.
---
 js/ui/appDisplay.js |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 6b2279e..b4c6076 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -345,7 +345,7 @@ AppDisplay.prototype = {
         }
     },
 
-    addApp: function(appId) {
+    _addApp: function(appId) {
         let appInfo = Gio.DesktopAppInfo.new(appId);
         if (appInfo != null) {
             this._allItems[appId] = appInfo;
@@ -385,7 +385,7 @@ AppDisplay.prototype = {
         let settings = this._appSystem.get_all_settings();
         for (let i = 0; i < settings.length; i++) {
             let appId = settings[i];
-			this._addApp(appId);
+            this._addApp(appId);
         }
 
         this._appsStale = false;
@@ -477,12 +477,10 @@ AppDisplay.prototype = {
 
         // we expect this._appCategories.hasOwnProperty(itemInfo.get_id()) to always be true here
         let categories = this._appCategories[itemInfo.get_id()];
-        if (categories) {
-            for (let i = 0; i < categories.length; i++) {
-                let category = categories[i].toLowerCase();
-                if (category.indexOf(search) >= 0)
-                    return true;
-            }
+        for (let i = 0; i < categories.length; i++) {
+            let category = categories[i].toLowerCase();
+            if (category.indexOf(search) >= 0)
+                return true;
         }
        
         return false;



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