openbsd-ports/x11/gnome/panel/patches/patch-gnome-panel_panel-menu-bar_c
2011-09-12 07:28:52 +00:00

34 lines
1.2 KiB
Plaintext

$OpenBSD: patch-gnome-panel_panel-menu-bar_c,v 1.2 2011/09/12 07:28:54 jasper Exp $
--- gnome-panel/panel-menu-bar.c.orig Wed May 18 11:12:53 2011
+++ gnome-panel/panel-menu-bar.c Wed May 18 11:14:30 2011
@@ -29,6 +29,7 @@
#include "panel-menu-bar.h"
#include <string.h>
+#include <stdlib.h>
#include <glib/gi18n.h>
#include <libpanel-util/panel-error.h>
@@ -125,11 +126,20 @@ panel_menu_bar_setup_tooltip (PanelMenuBar *menubar)
static void
panel_menu_bar_init (PanelMenuBar *menubar)
{
+ gchar *xdgMenuPrefix, *applicationsMenu;
+
menubar->priv = PANEL_MENU_BAR_GET_PRIVATE (menubar);
menubar->priv->info = NULL;
- menubar->priv->applications_menu = create_applications_menu ("applications.menu", NULL, TRUE);
+ /* Respect XDG_MENU_PREFIX */
+ setenv ("XDG_MENU_PREFIX", "gnome-", 0);
+
+ xdgMenuPrefix = getenv ("XDG_MENU_PREFIX");
+ applicationsMenu = g_strconcat (xdgMenuPrefix, "applications.menu", NULL);
+
+ menubar->priv->applications_menu = create_applications_menu (applicationsMenu, NULL, TRUE);
+ g_free (applicationsMenu);
menubar->priv->applications_item = panel_image_menu_item_new ();
gtk_menu_item_set_label (GTK_MENU_ITEM (menubar->priv->applications_item),