Skip to content

Commit

Permalink
Revert "Menu applet search: don't use app id for pattern matching"
Browse files Browse the repository at this point in the history
This reverts commit 06ec39f.
  • Loading branch information
clefebvre committed Oct 20, 2012
1 parent 1aa294b commit 868b4ce
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions files/usr/share/cinnamon/applets/menu@cinnamon.org/applet.js
Expand Up @@ -1643,14 +1643,12 @@ MyApplet.prototype = {
applist = "all";
}
let res;
if (pattern) {
pattern = pattern.toLowerCase();
if (pattern){
res = new Array();
for (var i in this._applicationsButtons) {
let app = this._applicationsButtons[i].app;
if (app.get_name().toLowerCase().indexOf(pattern)!=-1 || (app.get_description() && app.get_description().toLowerCase().indexOf(pattern)!=-1)) {
res.push(app.get_name());
}
if (app.get_name().toLowerCase().indexOf(pattern)!=-1 || (app.get_description() && app.get_description().toLowerCase().indexOf(pattern)!=-1) ||
(app.get_id() && app.get_id().slice(0, -8).toLowerCase().indexOf(pattern)!=-1)) res.push(app.get_name());
}
} else res = applist;
return res;
Expand Down

0 comments on commit 868b4ce

Please sign in to comment.