Commit a35336d3 authored by Florian Müllner's avatar Florian Müllner
Browse files

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.
parent 7f44a364
...@@ -404,6 +404,8 @@ const ApplicationsButton = new Lang.Class({ ...@@ -404,6 +404,8 @@ const ApplicationsButton = new Lang.Class({
continue; continue;
} }
let app = appSys.lookup_app(id); 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()) if (app.get_app_info().should_show())
this.applicationsByCategory[categoryId].push(app); this.applicationsByCategory[categoryId].push(app);
} else if (nextType == GMenu.TreeItemType.DIRECTORY) { } else if (nextType == GMenu.TreeItemType.DIRECTORY) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment