1 |
pacho 10/07/05 12:02:44 |
2 |
|
3 |
Added: gnome-menus-2.30.2-XDG_MENU_PREFIX-fix.patch |
4 |
Log: |
5 |
Upstream patch for #291279 |
6 |
(Portage version: 2.1.8.3/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 gnome-base/gnome-menus/files/gnome-menus-2.30.2-XDG_MENU_PREFIX-fix.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gnome-menus/files/gnome-menus-2.30.2-XDG_MENU_PREFIX-fix.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gnome-menus/files/gnome-menus-2.30.2-XDG_MENU_PREFIX-fix.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: gnome-menus-2.30.2-XDG_MENU_PREFIX-fix.patch |
15 |
=================================================================== |
16 |
From 2054996af842e6df1726e58d81a569f03e30d75f Mon Sep 17 00:00:00 2001 |
17 |
From: Vincent Untz <vuntz@×××××.org> |
18 |
Date: Wed, 30 Jun 2010 10:36:26 +0000 |
19 |
Subject: [editor] Better fix for XDG_MENU_PREFIX support in editor |
20 |
|
21 |
The previous fix was partly wrong, because the menu file referenced in |
22 |
the created user menu file was not using the prefix. |
23 |
|
24 |
So instead of letting the library handle XDG_MENU_PREFIX, we handle it |
25 |
ourselves everywhere. |
26 |
--- |
27 |
diff --git a/simple-editor/GMenuSimpleEditor/menutreemodel.py b/simple-editor/GMenuSimpleEditor/menutreemodel.py |
28 |
index 5856d56..214319e 100644 |
29 |
--- a/simple-editor/GMenuSimpleEditor/menutreemodel.py |
30 |
+++ b/simple-editor/GMenuSimpleEditor/menutreemodel.py |
31 |
@@ -107,6 +107,9 @@ class MenuTreeModel (gtk.TreeStore): |
32 |
menu_files = ["applications.menu", "settings.menu"] |
33 |
|
34 |
for menu_file in menu_files: |
35 |
+ if menu_file == "applications.menu" and os.environ.has_key ("XDG_MENU_PREFIX"): |
36 |
+ menu_file = os.environ["XDG_MENU_PREFIX"] + menu_file |
37 |
+ |
38 |
tree = gmenu.lookup_tree (menu_file, gmenu.FLAGS_INCLUDE_EXCLUDED) |
39 |
tree.sort_key = gmenu.SORT_DISPLAY_NAME |
40 |
self.__append_directory (tree.root, None, False, menu_file) |
41 |
-- |
42 |
cgit v0.8.3.1 |