KMenu fails when submenu has single item.

Paul Gilliam gilliam at us.ibm.com
Wed Apr 4 13:26:44 PDT 2007


I am working a bug where KMenu messes up when it promotes a leaf  item up 
a level when it is it's parent only child.

I started a thread in a KDE forum, but I now believe that this mailing 
list would be the best place to get some help.  I don't subscribe to this 
list, so please CC me on any response....  Thanks!

Here is the URL for the KDE forum thread: 
http://www.kde-forum.org/thread.php?threadid=16423

It;s short, so I'll post it here too:

Message 1:   (from me)
--------------------------------------------------------------------------------------------
Let's assume that A-A, A-B and A-C all are the submenu of menu A in K 
Menu. If the menu editor is used to remove A-B and A-C so there remains 
only A-A as the submenu of A, then when you check K Menu, you will 
see menu A's icon has been changed to A-A's, but the name is still A. When 
you click A from the K Menu, it will launch A-A application. 
KMenu fails when submenu has single item. 

For example:
1. Select K Menu->Tools->Archiving, you will see 2 submenu items, File 
Roller 
and Ark
2. Then remove File Roller from Archiving (leaving only Ark there) by 
using the KDE Menu Editor;, save the change.
3. Now check K Menu->Tools->Archiving again, you will see 
- Archiving's icon changed to Ark's
- Archiving doesn't show Ark submenu item
- Click Archiving, it launchs Ark application

I am tring to debug this, but havn't looked at this code before. I see 
that the actual menu structer is stored in an XMLish file, and it has the 
correct structure, so the bug has to be in KMenu, not the editor.

So I am looking for the source to KMenu... can someone give me a pointer 
or two?

Thanks, 

__________________
-=# Paul Gilliam #=- 

Message 2    (From Rnise -   
http://www.kde-forum.org/profil/3048/Rinse.html)
--------------------------------------------------------------------------------------------
I think that it is not a bug, but a feature.

kmenu follows the XDG guidelines, you can find some information about it 
in the kde user guide and on http://freedesktop.org 

Message 3    (From me)
--------------------------------------------------------------------------------------------
Rinse, I can see how it might be a feature if it was fully implimented. 
But the only the icon for the leaf item is promoted, not it's label.

It's like the design was to promote the leaf item, but it was only half 
implimented.

Thanks for the pointers to the documentation... I really need pointers to 
the source. I found the XDG stuff which looks like a couple of perl 
scripts. I would like to see how this is tied into the K-Menu button.

Thanks, 

__________________
-=# Paul Gilliam #=- 


More information about the xdg mailing list