[gnome-shell-extensions] apps-menu: Handle .desktop files from non-standard directories
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions] apps-menu: Handle .desktop files from non-standard directories
- Date: Tue, 12 Jul 2016 23:29:13 +0000 (UTC)
commit a35336d3c2f73eda4ed71a58c25e99053170f71c
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Jul 6 20:41:25 2016 +0200
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
extensions/apps-menu/extension.js | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js
index 796d235..4792854 100644
--- a/extensions/apps-menu/extension.js
+++ b/extensions/apps-menu/extension.js
@@ -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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]