$OpenBSD: patch-gnome-panel_menu_c,v 1.4 2010/04/22 18:36:33 ajacoutot Exp $ --- gnome-panel/menu.c.orig Mon Mar 8 14:07:06 2010 +++ gnome-panel/menu.c Thu Apr 22 11:18:36 2010 @@ -25,6 +25,7 @@ #include "menu.h" #include +#include #include #include @@ -1786,8 +1787,16 @@ GtkWidget * create_main_menu (PanelWidget *panel) { GtkWidget *main_menu; + gchar *xdgMenuPrefix, *applicationsMenu; - main_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); + + main_menu = create_applications_menu (applicationsMenu, NULL, TRUE); + g_free (applicationsMenu); g_object_set_data (G_OBJECT (main_menu), "menu_panel", panel); /* FIXME need to update the panel on parent_set */