From: | "Alexandre Rostovtsev (tetromino)" <tetromino@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in gnome-base/gnome-menus/files: 10-xdg-menu-gnome-r1 gnome-menus-3.2.0.1-ignore-invalid-entries.patch |
Date: | Tue, 10 Jan 2012 05:42:10 |
Message-Id: | 20120110054158.4B7482004C@flycatcher.gentoo.org |
1 | tetromino 12/01/10 05:41:58 |
2 | |
3 | Added: 10-xdg-menu-gnome-r1 |
4 | gnome-menus-3.2.0.1-ignore-invalid-entries.patch |
5 | Log: |
6 | Add patch to not load invalid .desktop files that do not have Name or Exec keys (prevents crashes in gnome-shell and other applications that assume that all .desktop files follow freedesktop specs). Add support for cinnamon in 10-xdg-menu-gnome. |
7 | |
8 | (Portage version: 2.2.0_alpha84/cvs/Linux x86_64) |
9 | |
10 | Revision Changes Path |
11 | 1.1 gnome-base/gnome-menus/files/10-xdg-menu-gnome-r1 |
12 | |
13 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gnome-menus/files/10-xdg-menu-gnome-r1?rev=1.1&view=markup |
14 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gnome-menus/files/10-xdg-menu-gnome-r1?rev=1.1&content-type=text/plain |
15 | |
16 | Index: 10-xdg-menu-gnome-r1 |
17 | =================================================================== |
18 | #!/bin/sh |
19 | |
20 | if [ -z "$XDG_MENU_PREFIX" ] && { [ "$DESKTOP_SESSION" = "gnome" ] || [ "$DESKTOP_SESSION" = "cinnamon" ]; } |
21 | then |
22 | export XDG_MENU_PREFIX=gnome- |
23 | fi |
24 | |
25 | |
26 | |
27 | 1.1 gnome-base/gnome-menus/files/gnome-menus-3.2.0.1-ignore-invalid-entries.patch |
28 | |
29 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gnome-menus/files/gnome-menus-3.2.0.1-ignore-invalid-entries.patch?rev=1.1&view=markup |
30 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gnome-menus/files/gnome-menus-3.2.0.1-ignore-invalid-entries.patch?rev=1.1&content-type=text/plain |
31 | |
32 | Index: gnome-menus-3.2.0.1-ignore-invalid-entries.patch |
33 | =================================================================== |
34 | From a09c25177a5643f8596dc81d97b87ebce74c75f9 Mon Sep 17 00:00:00 2001 |
35 | From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@×××××.org> |
36 | Date: Fri, 21 Oct 2011 19:57:55 +0200 |
37 | Subject: [PATCH] libmenu: Ignore invalid desktop entries |
38 | |
39 | Both "Name" and "Exec" are mandatory keys according to the desktop |
40 | entry spec; some .desktop files missing one or the other have been |
41 | spotted in the while, so ignore them explicitly. |
42 | |
43 | https://bugzilla.gnome.org/show_bug.cgi?id=662409 |
44 | --- |
45 | libmenu/desktop-entries.c | 4 +++- |
46 | 1 files changed, 3 insertions(+), 1 deletions(-) |
47 | |
48 | diff --git a/libmenu/desktop-entries.c b/libmenu/desktop-entries.c |
49 | index bb6076d..a8c13d9 100644 |
50 | --- a/libmenu/desktop-entries.c |
51 | +++ b/libmenu/desktop-entries.c |
52 | @@ -256,7 +256,9 @@ desktop_entry_load (DesktopEntry *entry) |
53 | const char *categories_str; |
54 | |
55 | entry_desktop->appinfo = g_desktop_app_info_new_from_filename (entry->path); |
56 | - if (!entry_desktop->appinfo) |
57 | + if (!entry_desktop->appinfo || |
58 | + !g_app_info_get_name (G_APP_INFO (entry_desktop->appinfo)) || |
59 | + !g_app_info_get_executable (G_APP_INFO (entry_desktop->appinfo))) |
60 | { |
61 | menu_verbose ("Failed to load \"%s\"\n", entry->path); |
62 | return FALSE; |
63 | -- |
64 | 1.7.8.3 |