Compare commits

...

5 Commits

Author SHA1 Message Date
Florian Müllner
15080613bc Bump version to 3.18.4
Update NEWS.
2016-03-03 17:47:18 +01:00
Florian Müllner
2383462a60 apps-menu: Catch menu tree entries we can't resolve to an app
The default .menu file still contains a number of legacy directories that
have been deprecated for over 15 years, which GIO (and in extension the
shell's AppSystem) ignore. Encountering such an entry currently triggers
an exception and an entire category ends up empty, fix this by silently
skipping over the offending entry.

https://bugzilla.gnome.org/show_bug.cgi?id=759004
2016-03-03 17:42:24 +01:00
Florian Müllner
c0920301b4 Bump version to 3.18.3
Update NEWS.
2016-01-09 10:35:23 +01:00
Florian Müllner
5a46645948 apps-menu: Fix .desktop entries in subdirectories
GMenu's TreeEntries return an AppInfo that is created from the
.desktop filename, not from a desktop ID as expected by the
AppSystem. As a result, g_app_info_get_id() will simply return
the file's basename, which only matches the desktop ID if no
prefix-to-subdirectory mapping as described in the menu spec
is involved.
Fix this by basing the app lookup on the entry's desktop ID instead
of the AppInfo.

https://bugzilla.gnome.org/show_bug.cgi?id=759004
2016-01-09 10:29:57 +01:00
Florian Müllner
7c247e6b84 apps-menu: Remove unused variable
https://bugzilla.gnome.org/show_bug.cgi?id=759004
2016-01-09 10:29:54 +01:00
3 changed files with 11 additions and 6 deletions

8
NEWS
View File

@@ -1,3 +1,11 @@
3.18.4
======
* apps-menu: Ignore .desktop entries from legacy dirs
3.18.3
======
* apps-menu: Fix .desktop entries in subdirectories
3.18.2
======
* Fix classic style issues

View File

@@ -1,5 +1,5 @@
AC_PREREQ(2.63)
AC_INIT([gnome-shell-extensions],[3.18.2],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell&component=extensions])
AC_INIT([gnome-shell-extensions],[3.18.4],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell&component=extensions])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([config])

View File

@@ -397,18 +397,15 @@ const ApplicationsButton = new Lang.Class({
while ((nextType = iter.next()) != GMenu.TreeItemType.INVALID) {
if (nextType == GMenu.TreeItemType.ENTRY) {
let entry = iter.get_entry();
let appInfo = entry.get_app_info();
let id;
try {
id = appInfo.get_id(); // catch non-UTF8 filenames
id = entry.get_desktop_file_id(); // catch non-UTF8 filenames
} catch(e) {
continue;
}
let app = appSys.lookup_app(id);
if (appInfo.should_show()) {
let menu_id = dir.get_menu_id();
if (app && app.get_app_info().should_show())
this.applicationsByCategory[categoryId].push(app);
}
} else if (nextType == GMenu.TreeItemType.DIRECTORY) {
let subdir = iter.get_directory();
if (!subdir.get_is_nodisplay())