KMenu fails when submenu has single item.

Bastian, Waldo waldo.bastian at intel.com
Tue Apr 17 14:14:48 PDT 2007


That's the inline_alias feature :-)

Quoting from
http://standards.freedesktop.org/menu-spec/menu-spec-0.9.html

The optional inline_alias attribute defines whether a single inlined
entry should adopt the caption of the inlined menu. In such case no
additional header entry will be added regardless of the value of the
inline_header attribute. The inline_alias attribute can be either "true"
or "false". 

Example: if a menu has a sub-menu titled "WordProcessor" with a single
entry "OpenOffice 4.2", and both inline="true" and inline_alias="true"
are specified then this would result in the "OpenOffice 4.2" entry being
inlined in the current menu but the "OpenOffice 4.2" caption of the
entry would be replaced with "WordProcessor".

Cheers,
Waldo
 
Intel Corporation - Platform Software Engineering, UMG - Hillsboro,
Oregon

-----Original Message-----
From: Paul Gilliam [mailto:gilliam at us.ibm.com] 
Sent: Tuesday, April 17, 2007 1:17 PM
To: Bastian, Waldo
Cc: xdg at lists.freedesktop.org
Subject: RE: KMenu fails when submenu has single item.

Waldo,  Thank you for your quick response!

I think I can see what the feature is *supposed* to do: bump up a menu 
item that has no siblings.

The problem is that it only *half* works: the icon is promoted, but not 
the actual menu item.

In the example I give below, the "archiving" menu item's icon is
replaced 
by that of "ark", but "archiving" is not replaced by "ark".
When the menu item (with "ark"'s icon, but still labeled "archiving") is

clicked the "ark" application is started.

I think it's a bug that the label "archiving" is not replaced with
"ark".

What do you think?

Thanks again,

-=# Paul Gilliam #=-

"Bastian, Waldo" <waldo.bastian at intel.com> wrote on 04/17/2007 10:54:56 
AM:

> It's a feature. SUSE added it to its menu at some point and later the
> feature has been added to the menu spec in the form of the "inline"
> attribute.
> 
> Cheers,
> Waldo
> 
> Intel Corporation - Platform Software Engineering, UMG - Hillsboro,
> Oregon
> 
> -----Original Message-----
> From: xdg-bounces at lists.freedesktop.org
> [mailto:xdg-bounces at lists.freedesktop.org] On Behalf Of Paul Gilliam
> Sent: Monday, April 16, 2007 3:53 PM
> To: xdg at lists.freedesktop.org
> Subject: KMenu fails when submenu has single item.
> 
> 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 launches Ark application
> 
> I am trying to debug this, but haven't looked at this code before. I
see
> 
> that the actual menu structure is stored in an XML'ish 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 #=- 
> _______________________________________________
> xdg mailing list
> xdg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xdg



More information about the xdg mailing list