From cedab080189857c0697d318a0e1ccc401eb23c1b Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 25 Nov 2008 23:50:00 +0000 Subject: [PATCH] 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 --- js/ui/appdisplay.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/js/ui/appdisplay.js b/js/ui/appdisplay.js index 649a905c8..07a6af4c6 100644 --- a/js/ui/appdisplay.js +++ b/js/ui/appdisplay.js @@ -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; },