After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 623221 - gnome-panel does not reflect the XDG_MENU_PREFIX env variable
gnome-panel does not reflect the XDG_MENU_PREFIX env variable
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: panel
2.28.x
Other Linux
: Normal normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-06-30 16:19 UTC by Fab
Modified: 2014-11-24 04:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
running grep '"applications.menu"' on gnome-panel source code (698 bytes, text/plain)
2010-06-30 16:19 UTC, Fab
  Details
patch-gnome-panel_menu_c.txt (955 bytes, patch)
2011-01-27 18:59 UTC, Pacho Ramos
none Details | Review
patch-gnome-panel_panel-menu-bar_c.txt (1.15 KB, patch)
2011-01-27 18:59 UTC, Pacho Ramos
none Details | Review
patch-gnome-panel_panel-menu-button_c.txt (515 bytes, text/plain)
2011-01-27 19:00 UTC, Pacho Ramos
  Details
screenshot (133.80 KB, image/png)
2011-02-01 10:11 UTC, Fab
  Details

Description Fab 2010-06-30 16:19:08 UTC
Created attachment 164973 [details]
running grep '"applications.menu"' on gnome-panel source code

Hi,

I'm running gnome-panel 2.28.0. I know that this behavior is present in 2.26.x, and I think 2.30.x is probably also affected. In my environment, XDG_MENU_PREFIX is set to "gnome-". gnome-panel seems to ignore this variable.

For example, when trying to add an entire submenu on the panel, it does not work.
Instead, I find in my ~/.xsession-errors a warning :

> ** (gnome-panel:10887): WARNING **: Failed to find menu scheme
> for gnome-applications.menu

Please see the attached text file : there must be other examples where something goes wrong. Thanks.
Comment 1 Fab 2010-10-31 20:29:07 UTC
Confirmed with gnome-panel-2.30.2 (and probably with 2.32.x).
Comment 2 Pacho Ramos 2011-01-27 18:59:12 UTC
Created attachment 179459 [details] [review]
patch-gnome-panel_menu_c.txt

OpenBSD patches to solve this
Comment 3 Pacho Ramos 2011-01-27 18:59:30 UTC
Created attachment 179460 [details] [review]
patch-gnome-panel_panel-menu-bar_c.txt
Comment 4 Pacho Ramos 2011-01-27 19:00:42 UTC
Created attachment 179461 [details]
patch-gnome-panel_panel-menu-button_c.txt

This is the only one that is hardcoding it instead of using XDG_* env variable, if you could help us on fixing this for not having to hardcode it... would be great :-)

Thanks
Comment 5 Vincent Untz 2011-02-01 00:37:25 UTC
That's wrong: the XDG_MENU_PREFIX expansion is done in gnome-menus itself, so this should not be needed. Can you check with the small utilities coming with gnome-menus if XDG_MENU_PREFIX is respected for you?
Comment 6 Pacho Ramos 2011-02-01 10:05:11 UTC
What util am I supposed to run?

I have tried the following:
cd ~/gnome-menus-2.30.5/util
./gnome-menu-spec-test

(looks to show categories for each desktop file)

$ XDG_MENU_PREFIX=/tmp ./gnome-menu-spec-test 

** (gnome-menu-spec-test:19122): WARNING **: Menu tree is empty

(that looks ok since it seems to follow XDG_MENU_PREFIX)

On the other hand, originally reported problem is still valid:

1 - Go to Applications menu, then a submenu.
2 - Right click on an icon, the context menu appear
3 - Go to 'all the menu', and click on 'add this as a menu on the panel'

Nothing is added and the following is shown in ~/.xsession-errors

** (gnome-panel:5275): WARNING **: Failed to find menu scheme for gnome-applications.menu

That looks to be "solved" by http://bugzilla-attachments.gnome.org/attachment.cgi?id=179461
Comment 7 Fab 2011-02-01 10:11:50 UTC
Created attachment 179777 [details]
screenshot

(In reply to comment #5)
> Can you check with the small utilities coming with
> gnome-menus if XDG_MENU_PREFIX is respected for you?

Which utilities are you talking about ? The gnome menu seems to work fine, and gmenu-simple-editor is also working as expected (after fixing it in bug #623197).

In case I was not clear, attached file is a screenshot on how I get this warning, which led me to the gnome-panel source code.
Comment 8 Vincent Untz 2011-02-01 13:03:20 UTC
(In reply to comment #6)
> What util am I supposed to run?

gnome-menu-spec-test, for example, yes.

> On the other hand, originally reported problem is still valid:
> 
> 1 - Go to Applications menu, then a submenu.
> 2 - Right click on an icon, the context menu appear
> 3 - Go to 'all the menu', and click on 'add this as a menu on the panel'

So the bug is localized only to this, and there's no issue in other parts of the code using menus. Is this right? The bug (and the patches) sounded much more generic.
Comment 9 Pacho Ramos 2011-02-01 17:51:05 UTC
I think it's because gnome-menus were also fixed a few months ago for this and original report downstream is older
Comment 10 Tobias Mueller 2011-03-20 12:23:57 UTC
So am I right presuming that this issue is OBSOLETE by now?
Comment 11 Pacho Ramos 2011-03-20 12:26:07 UTC
No, issue commented in c#6 is still valid, but I cannot move status away from NEEDINFO because I am not the reporter :-(
Comment 12 Fab 2011-03-20 12:37:12 UTC
(In reply to comment #11)
> but I cannot move status away from NEEDINFO because I am not the reporter :-(

Done. Here are the choices for the status :
 - NEEDINFO
 - UNCONFIRMED
 - RESOLVED
Comment 13 Alberts Muktupāvels 2014-11-24 04:39:09 UTC
This is fixed in 3.14.0 version.