Fix syntax error in previous patch

Also some style/logic cleanups pointed out by Marina.
This commit is contained in:
Colin Walters 2009-05-26 12:56:38 -04:00
parent 5416f53351
commit 36775c9a58

View File

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