[Bug 781074] New: Legacy menus displayed incorrectly in cinnamon 1.5.8
https://bugzilla.novell.com/show_bug.cgi?id=781074 https://bugzilla.novell.com/show_bug.cgi?id=781074#c0 Summary: Legacy menus displayed incorrectly in cinnamon 1.5.8 Classification: openSUSE Product: openSUSE 12.2 Version: Final Platform: All OS/Version: openSUSE 12.2 Status: NEW Severity: Normal Priority: P5 - None Component: GNOME AssignedTo: bnc-team-gnome@forge.provo.novell.com ReportedBy: hippolyte@shaw.ca QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0 Custom (tree) cinnamon-applications.menu is not parsed correctly under cinnamon 1.5.8. Several menus and most menu entries are missing. The same menu works well under Gnome fallback (this should exclude a syntax error in the menu). Reproducible: Always Steps to Reproduce: 1. just relace cinnamon-applications.menu with your own menu or set XDG_CONFIG_DIRS to an alternate location containing you own cinnamon-applications.menu and restart cinnamon. 2. If you just replace teh menu file without changing XDG_CONFIG_DIRS, there is no need to restart cinnamon. 3. Actual Results: Some menus and mots menu items are missing. The following warning appears in the log; JS ERROR: !!! WARNING: 'assignment to undeclared variable subdir' JS ERROR: !!! WARNING: file '/usr/share/cinnamon/applets/menu@cinnamon.org/applet.js' line 1298 exception 0 number 156 Expected Results: All menus and items are displayed. As a temporary workaround, using menu@cinnamon.org/applet.js from version 1.4.0 (copying this file to /usr/share/cinnamon/applets/menu@cinnamon.org/) would solve the menu issue (all menus and entries are displayed correctly) but produces this warning over and over: (cinnamon:2899): Clutter-WARNING **: Attempting to add actor of type 'CinnamonGenericContainer' to a container of type 'StBoxLayout', but the actor has already a parent of type 'StBoxLayout'. (cinnamon:2899): Clutter-WARNING **: Attempting to add actor of type 'StScrollView' to a container of type 'StBoxLayout', but the actor has already a parent of type 'StBoxLayout'. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c1
Bjørn Lie
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c
Bjørn Lie
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c2
Nelson Marques
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c3
--- Comment #3 from Agnelo de la Crotche
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c4
Nelson Marques
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c5
Nelson Marques
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c6
Michael Webster
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0
Custom (tree) cinnamon-applications.menu is not parsed correctly under cinnamon 1.5.8. Several menus and most menu entries are missing. The same menu works well under Gnome fallback (this should exclude a syntax error in the menu).
Reproducible: Always
Steps to Reproduce: 1. just relace cinnamon-applications.menu with your own menu or set XDG_CONFIG_DIRS to an alternate location containing you own cinnamon-applications.menu and restart cinnamon. 2. If you just replace teh menu file without changing XDG_CONFIG_DIRS, there is no need to restart cinnamon. 3. Actual Results: Some menus and mots menu items are missing. The following warning appears in the log; JS ERROR: !!! WARNING: 'assignment to undeclared variable subdir' JS ERROR: !!! WARNING: file '/usr/share/cinnamon/applets/menu@cinnamon.org/applet.js' line 1298 exception 0 number 156
Expected Results: All menus and items are displayed.
As a temporary workaround, using menu@cinnamon.org/applet.js from version 1.4.0 (copying this file to /usr/share/cinnamon/applets/menu@cinnamon.org/) would solve the menu issue (all menus and entries are displayed correctly) but produces this warning over and over:
(cinnamon:2899): Clutter-WARNING **: Attempting to add actor of type 'CinnamonGenericContainer' to a container of type 'StBoxLayout', but the actor has already a parent of type 'StBoxLayout'.
(cinnamon:2899): Clutter-WARNING **: Attempting to add actor of type 'StScrollView' to a container of type 'StBoxLayout', but the actor has already a parent of type 'StBoxLayout'.
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c7
Nelson Marques
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c8
--- Comment #8 from Agnelo de la Crotche
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c9
--- Comment #9 from Agnelo de la Crotche
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c10
Nelson Marques
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c11
--- Comment #11 from Nelson Marques
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c12
Michael Webster
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c13
--- Comment #13 from Nelson Marques
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c14
--- Comment #14 from Michael Webster
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c15
--- Comment #15 from Michael Webster
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c16
--- Comment #16 from Nelson Marques
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c17
--- Comment #17 from Agnelo de la Crotche
So messed around a bit more - I installed 3.5.92 of gnome-menus, which allowed me to edit the menus using Cinnamon's alacarte port (right-click menu applet).
Just for info, I never do that. My menus are defined at system level, not at user level.
If I manually added an item to one of the menus there, it would then show up in the applet. So, it's not that it refuses to show them, it's just that in Cinnamon's eyes, they're empty menu categories, so it hides them.
Notice that you don't have these categories, because I created them ... but some menu entries I use (.desktop files) belong to several categories, i.e predefined ones and custom ones. This may be why I see some entries but not all. My menu file only uses my categories and desktop files and directories from an alternate location (/usr/local/share/applications and /usr/local/share/desktop-directories). For example, I'm not using this file at all: # cat /usr/share/applications/gnome-terminal.desktop [Desktop Entry] X-SuSE-translate=true GenericName=Terminal DocPath=gnome-terminal Name=GNOME Terminal Comment=Use the command line TryExec=gnome-terminal Exec=gnome-terminal Icon=utilities-terminal Type=Application X-GNOME-DocPath=gnome-terminal/index.html X-GNOME-Bugzilla-Bugzilla=GNOME X-GNOME-Bugzilla-Product=gnome-terminal X-GNOME-Bugzilla-Component=BugBuddyBugs X-GNOME-Bugzilla-Version=3.4.1.1 Categories=GNOME;GTK;Utility;TerminalEmulator; StartupNotify=true but this file instead: # cat /usr/local/share/applications/X_gnome-terminal.desktop [Desktop Entry] X-SuSE-translate=true GenericName=Command Line Terminal DocPath=gnome-terminal Name=GNOME Terminal Comment=Use the command line TryExec=gnome-terminal Exec=gnome-terminal --geometry=104x44 Icon=utilities-terminal Type=Application X-GNOME-DocPath=gnome-terminal/index.html X-GNOME-Bugzilla-Bugzilla=GNOME X-GNOME-Bugzilla-Product=gnome-terminal X-GNOME-Bugzilla-Component=BugBuddyBugs X-GNOME-Bugzilla-Version=3.4.1.1 Categories=X-Main-Terminals; StartupNotify=true Notice the category "X-Main-Terminals" which won't exist for you. I apologize for organizing menus differently. Could it be that you're just ignoring my categopries? ~~~~~~~~~~~~~~ One more thing: submenus are not supported, thus menus appear "flat" in cinnamon. It's a bummer. Any chance you could re-implement the classic tree model for cinnamon somehow? It would make lots of users happy IMO. See the "funny" xslt filter I wrote to "work around" the flat menu in gnome-shell: http://forums.opensuse.org/english/other-forums/development/programming-scri.... But in this example, I used the default menus (reset XDG_DATA_DIRS and XDG_CONFIG_DIRS) My menus are more consistent. :-) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c18
--- Comment #18 from Agnelo de la Crotche
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c19
--- Comment #19 from Agnelo de la Crotche
I may need to set up a VM of exactly what's being run here just to have the proper perspective..
You don't need to do that. Just create a directory /usr/local/share/applications (for example) and copy some .desktop files from /usr/share/applications into that directory. Set Categories in (some) of these .desktop files to match (some) categories imported in the menu file I provided. Make sure that XDG_DATA_DIRS looks in /usr/local/share first. Have some .desktop files using 'only' my categories and some other using both, like 'well known' categories and custom ones. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c20
--- Comment #20 from Nelson Marques
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c21
--- Comment #21 from Agnelo de la Crotche
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c22
--- Comment #22 from Agnelo de la Crotche
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c23
--- Comment #23 from Agnelo de la Crotche
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c24
--- Comment #24 from Michael Webster
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c25
--- Comment #25 from Agnelo de la Crotche
Great!
Will you be submitting this on github for Cinnamon as well? If not, I have a patch set in the process regarding the menu applet and editor, I can include this as well.
Please do so! -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c26
--- Comment #26 from Michael Webster
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c27
--- Comment #27 from Agnelo de la Crotche
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c28
--- Comment #28 from Michael Webster
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c29
--- Comment #29 from Agnelo de la Crotche
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c30
--- Comment #30 from Michael Webster
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c31
--- Comment #31 from Agnelo de la Crotche
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c32
--- Comment #32 from Agnelo de la Crotche
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c33
--- Comment #33 from Michael Webster
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c34
--- Comment #34 from Agnelo de la Crotche
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c35
--- Comment #35 from Nelson Marques
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c36
--- Comment #36 from Nelson Marques
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c37
--- Comment #37 from Agnelo de la Crotche
Agnelo,
This discussion about the missing values is going to far.
Hi Nelson, I knew you would say that. ;) Sorry. It's another problem I just noticed incidentally ... and fixed - or more exactly worked around. A new patch will follow. It suffices to take only the first line of the returned description. That way, if the Comment key is present but empty and you get the file header information instead, it won't break the menu. It doesn't just affect cinnamon. It is indeed a gettext "feature". You'll see the same info in gnome-fallback but there, it will appear in a tooltip box, which is not really a problem. In cinnamon however, it will show up at the bottom of the menu, increasing its size, and as I said, it's not always easy to scroll out of there. Please compare these 2 pictures, before and after I patched the applet: http://imageshack.us/a/img716/3629/cinnamonemptycomment.png http://imageshack.us/a/img201/5387/cinnamonmenuemptycommen.png
it's a bug (packaging or design) from Nautilus and it can be fixed during the packaging stage with %suse_update_desktop_file. So please open a bug report on Nautilus,
Nautilus is OK. I did empty the Comment in order to reproduce this behaviour. I could have chosen another example. Actually the "only" application which came with an empty comment on this machine was "juk", an old KDE music player. I would expect but don't assume that packagers and developers will strickly follow the specifications. We often have to deal with .desktop files containing (mostly minor) syntax errors and have to figure out some hacks. I guess my patch should be OK, despite it's a little bit straightforward. But considering the fact that cinnamon displays the description inside the menu and not in a tooltip box, taking only the first line of the Comment looks like an acceptable workaround. I haven't seen any Comment that includes "\n" anyway. The only ones which produce line feeds are empty comments when they get replaced with header information. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c38
--- Comment #38 from Agnelo de la Crotche
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c39
--- Comment #39 from Agnelo de la Crotche
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c40
--- Comment #40 from Nelson Marques
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c41
Nelson Marques
From my side this can be closed.
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c42
--- Comment #42 from Agnelo de la Crotche
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c43
--- Comment #43 from Agnelo de la Crotche
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c44
--- Comment #44 from Michael Webster
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c45
Nelson Marques
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c46
--- Comment #46 from Nelson Marques
https://bugzilla.novell.com/show_bug.cgi?id=781074
https://bugzilla.novell.com/show_bug.cgi?id=781074#c47
--- Comment #47 from Agnelo de la Crotche
participants (1)
-
bugzilla_noreply@novell.com