From e23708f94570806457ab13d682989e23331fb951 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Wed, 6 Jul 2016 20:41:25 +0200
Subject: [PATCH] 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.
---
extensions/apps-menu/extension.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js
index 5221a41..5a41890 100644
--- a/extensions/apps-menu/extension.js
+++ b/extensions/apps-menu/extension.js
@@ -424,6 +424,8 @@ const ApplicationsButton = new Lang.Class({
let entry = iter.get_entry();
let appInfo = entry.get_app_info();
let app = appSys.lookup_app(entry.get_desktop_file_id());
+ if (!app)
+ app = new Shell.App({ app_info: appInfo });
if (appInfo.should_show()) {
let menu_id = dir.get_menu_id();
this.applicationsByCategory[categoryId].push(app);
--
2.7.4