Search executables as well

We want "gedit" to find GEdit, which doesn't contain its name in either
the name or description.

svn path=/trunk/; revision=85
This commit is contained in:
Colin Walters 2008-11-25 23:50:00 +00:00
parent 258834ed8f
commit cedab08018

View File

@ -203,12 +203,17 @@ AppDisplay.prototype = {
if (search == null || search == '')
return true;
let name = appinfo.get_name().toLowerCase();
let description = appinfo.get_description();
if (description) description = description.toLowerCase();
if (name.indexOf(search) >= 0)
return true;
if (description && description.indexOf(search) >= 0)
return true;
let description = appinfo.get_description();
if (description) {
description = description.toLowerCase();
if (description.indexOf(search) >= 0)
return true;
}
let exec = appinfo.get_executable().toLowerCase();
if (exec.indexOf(search) >= 0)
return true;
return false;
},