summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'gnome-base/gnome-menus/files/gnome-menus-2.30.2-XDG_MENU_PREFIX-fix.patch')
-rw-r--r--gnome-base/gnome-menus/files/gnome-menus-2.30.2-XDG_MENU_PREFIX-fix.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/gnome-base/gnome-menus/files/gnome-menus-2.30.2-XDG_MENU_PREFIX-fix.patch b/gnome-base/gnome-menus/files/gnome-menus-2.30.2-XDG_MENU_PREFIX-fix.patch
new file mode 100644
index 000000000000..01e5a48219de
--- /dev/null
+++ b/gnome-base/gnome-menus/files/gnome-menus-2.30.2-XDG_MENU_PREFIX-fix.patch
@@ -0,0 +1,27 @@
+From 2054996af842e6df1726e58d81a569f03e30d75f Mon Sep 17 00:00:00 2001
+From: Vincent Untz <vuntz@gnome.org>
+Date: Wed, 30 Jun 2010 10:36:26 +0000
+Subject: [editor] Better fix for XDG_MENU_PREFIX support in editor
+
+The previous fix was partly wrong, because the menu file referenced in
+the created user menu file was not using the prefix.
+
+So instead of letting the library handle XDG_MENU_PREFIX, we handle it
+ourselves everywhere.
+---
+diff --git a/simple-editor/GMenuSimpleEditor/menutreemodel.py b/simple-editor/GMenuSimpleEditor/menutreemodel.py
+index 5856d56..214319e 100644
+--- a/simple-editor/GMenuSimpleEditor/menutreemodel.py
++++ b/simple-editor/GMenuSimpleEditor/menutreemodel.py
+@@ -107,6 +107,9 @@ class MenuTreeModel (gtk.TreeStore):
+ menu_files = ["applications.menu", "settings.menu"]
+
+ for menu_file in menu_files:
++ if menu_file == "applications.menu" and os.environ.has_key ("XDG_MENU_PREFIX"):
++ menu_file = os.environ["XDG_MENU_PREFIX"] + menu_file
++
+ tree = gmenu.lookup_tree (menu_file, gmenu.FLAGS_INCLUDE_EXCLUDED)
+ tree.sort_key = gmenu.SORT_DISPLAY_NAME
+ self.__append_directory (tree.root, None, False, menu_file)
+--
+cgit v0.8.3.1