From edd01a446c63d684505733ba18e6d9d9a1ecdb3d Mon Sep 17 00:00:00 2001 From: ajacoutot Date: Wed, 28 Dec 2011 08:57:18 +0000 Subject: [PATCH] Our gnome-session already exports XDG_MENU_PREFIX in the environment, so no need to play with get/setenv. This will ease future updates. --- x11/gnome/menus/Makefile | 3 +- .../menus/patches/patch-libmenu_gmenu-tree_c | 66 ------------------- 2 files changed, 2 insertions(+), 67 deletions(-) delete mode 100644 x11/gnome/menus/patches/patch-libmenu_gmenu-tree_c diff --git a/x11/gnome/menus/Makefile b/x11/gnome/menus/Makefile index 1c09047c88a..98ab2da51fb 100644 --- a/x11/gnome/menus/Makefile +++ b/x11/gnome/menus/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.55 2011/09/28 09:47:47 jasper Exp $ +# $OpenBSD: Makefile,v 1.56 2011/12/28 08:57:18 ajacoutot Exp $ SHARED_ONLY= Yes @@ -6,6 +6,7 @@ COMMENT= implementation of the FreeDesktop Desktop Menu Spec GNOME_PROJECT= gnome-menus GNOME_VERSION= 3.2.0.1 +REVISION= 0 SHARED_LIBS += gnome-menu-3 0.0 # 0.0 diff --git a/x11/gnome/menus/patches/patch-libmenu_gmenu-tree_c b/x11/gnome/menus/patches/patch-libmenu_gmenu-tree_c deleted file mode 100644 index 99293cdd35c..00000000000 --- a/x11/gnome/menus/patches/patch-libmenu_gmenu-tree_c +++ /dev/null @@ -1,66 +0,0 @@ -$OpenBSD: patch-libmenu_gmenu-tree_c,v 1.4 2011/09/26 10:47:35 jasper Exp $ - -Set default menu to gnome-applications.menu if XDG_MENU_PREFIX is not set. - ---- libmenu/gmenu-tree.c.orig Mon Aug 29 08:42:34 2011 -+++ libmenu/gmenu-tree.c Mon Sep 26 11:19:16 2011 -@@ -23,6 +23,7 @@ - - #include - #include -+#include - - #include "menu-layout.h" - #include "menu-monitor.h" -@@ -411,16 +412,13 @@ gmenu_tree_canonicalize_path (GMenuTree *tree, - { - menu_file = tree->basename; - -- if (strcmp (tree->basename, "applications.menu") == 0 && -- g_getenv ("XDG_MENU_PREFIX")) -- { -- char *prefixed_basename; -- prefixed_basename = g_strdup_printf ("%s%s", -- g_getenv ("XDG_MENU_PREFIX"), -- tree->basename); -- canonicalize_basename (tree, prefixed_basename); -- g_free (prefixed_basename); -- } -+ setenv ("XDG_MENU_PREFIX", "gnome-", 0); -+ char *prefixed_basename; -+ prefixed_basename = g_strdup_printf ("%s%s", -+ g_getenv ("XDG_MENU_PREFIX"), -+ tree->basename); -+ canonicalize_basename (tree, prefixed_basename); -+ g_free (prefixed_basename); - - if (!tree->canonical) - canonicalize_basename (tree, tree->basename); -@@ -1875,18 +1873,15 @@ load_parent_merge_file (GMenuTree *tree, - found = FALSE; - menu_file = g_strconcat (menu_name, ".menu", NULL); - -- if (strcmp (menu_file, "applications.menu") == 0 && -- g_getenv ("XDG_MENU_PREFIX")) -- { -- char *prefixed_basename; -- prefixed_basename = g_strdup_printf ("%s%s", -- g_getenv ("XDG_MENU_PREFIX"), -- menu_file); -- found = load_parent_merge_file_from_basename (tree, loaded_menu_files, -- layout, prefixed_basename, -- canonical_basedir); -- g_free (prefixed_basename); -- } -+ setenv ("XDG_MENU_PREFIX", "gnome-", 0); -+ char *prefixed_basename; -+ prefixed_basename = g_strdup_printf ("%s%s", -+ g_getenv ("XDG_MENU_PREFIX"), -+ menu_file); -+ found = load_parent_merge_file_from_basename (tree, loaded_menu_files, -+ layout, prefixed_basename, -+ canonical_basedir); -+ g_free (prefixed_basename); - - if (!found) - {