Bug 175161 - New item entries added within a submenu that are given a name that matches another menu item do not show up in K Menu after saving.
Summary: New item entries added within a submenu that are given a name that matches an...
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Plasma
Component: widget-kickoff (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2008-11-14 21:26 UTC by Paul L.
Modified: 2009-04-28 00:41 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul L. 2008-11-14 21:26:24 UTC
Version:            (using KDE 4.1.3)
Compiler:          gcc-4.2 gcc-4.3 g++4.3 
OS:                Linux
Installed from:    Ubuntu Packages

What's happening is simple: If a menu item within a sub-menu is given a name in the General tab (Name:) that is the same as an existing item within that sub-menu, application launcher doesn't show in when accessing K Menu. The added menu item exists, as can be confirmed by accessing Menu Editor and checking. It is there.

For the added item to be shown in application launcher, the entry name (General tab (Name:)) must be unique.
Comment 1 Marco Martin 2008-11-21 19:17:14 UTC
didn't understood exactly the explanation:
if let's say there is the top level category "Internet"

i create a link to an application called "Internet" too

the link to the application called internet doesn't get shown

correct?
Comment 2 Paul L. 2008-11-21 20:14:35 UTC
Open Menu Editor. Click on System. Click on Terminal (Konsole). Note the Name: and Description: entries under the General tab.

What I am describing is this: In the System Submenu, click on New Item. Give it the Name: Konsole and a Description: of Root Terminal and in Command: type konsole

Now click on the Advanced tab and check the Run as different user box and in Username: type root

Click on Save

After the database has been updated, close Menu Editor. Now look for your new entry in K Menu (K Menu > Applications > System) and you will not find it. It is there, it just isn't being displayed. This is because in Intrepid Ibex, in order for a Submenu Item entry to be displayed, the Name must be unique - it can not be the same name of an existing item.

Try it. You will see this to be true.
Comment 3 Marco Martin 2008-11-21 21:10:25 UTC
yeah, i found where it's done, duplicates are excluded to use just the later version if for instance both a kde3 and kde4 versions are present, so it's quite the intended behaviour, even if it can cause some hassle
Comment 4 Paul L. 2008-11-21 22:11:35 UTC
It may be intended, and I'll not quibble that point, but it should be made clear to the user that this is how it works. The fact that the newly added item is actually saved means that the underlying editor doesn't have a problem with items that have the same names. So it's simply an issue on how the system displays the resulting K Menu. To me, it would seem a simple solution to build the index using the Name and Description of the items in Submenus. One could then have items with the same name (Terminal) but with different descriptions (Terminal and Root Terminal).
Comment 5 Ruchir Brahmbhatt 2009-04-26 10:33:09 UTC
I think apart from name and description, command also matters. I think even if name and description are same but command is different, it should show the entry in kmenu. In my case, I used name "Konsole", description "Root Terminal" and Command "xterm" which didn't show up. 
I'm on r958058.
Comment 6 Aaron J. Seigo 2009-04-28 00:41:09 UTC
SVN commit 960100 by aseigo:

only count items as duplicates if all user visible information matches (name, generic name and icon name)
BUG:175161


 M  +20 -12    applicationmodel.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=960100