apps-menu: Handle .desktop files from non-standard directories

.desktop files in non-standard locations are not handled by GIO,
so looking up apps for entries for such locations (e.g. a
directory added via the AppsDir directive) will fail. We can
still handle this case in the menu by creating the app directly
from the entry's AppInfo.

https://bugzilla.gnome.org/show_bug.cgi?id=762206
This commit is contained in:
Florian Müllner
2016-07-06 20:41:25 +02:00
parent 7f44a3647c
commit a35336d3c2
+2
View File
@@ -404,6 +404,8 @@ const ApplicationsButton = new Lang.Class({
continue;
}
let app = appSys.lookup_app(id);
if (!app)
app = new Shell.App({ app_info: entry.get_app_info() });
if (app.get_app_info().should_show())
this.applicationsByCategory[categoryId].push(app);
} else if (nextType == GMenu.TreeItemType.DIRECTORY) {