Bug 297848 - Adding submenu to panel doesn't produce a usable menu
Summary: Adding submenu to panel doesn't produce a usable menu
Status: RESOLVED UNMAINTAINED
Alias: None
Product: plasma4
Classification: Plasma
Component: widget-kickoff (show other bugs)
Version: 4.9.97 RC2
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 294481 303500 313408 342135 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-04-10 14:19 UTC by jistanidiot
Modified: 2018-06-08 18:32 UTC (History)
11 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 jistanidiot 2012-04-10 14:19:51 UTC
Click on the K menu, Go to the desired submenu, right click and choose "Add to Panel"  

An icon will appear on your panel.  It 

Click on this new icon, instead of behaving like a menu, it will open up Dolphin.  It also appears that it opens the wrong place in that it is one level above the submenu I clicked.

For example if I go to K->Utilities it will put the K and not Utilities there.  If you try do it it in Utilities, it will pick up the the actual app (like kcalc) and put that there. The icon in that case will actually open up the app.  Unfortunately there seems to be no way to add the Utilities submenu to the panel.

If it makes a difference I'm using the classic menu.  I haven't tried it with the other "launcher" style menu.

I'm on Kubuntu 11.10.
kde4-config --version
Qt: 4.7.4
KDE Development Platform: 4.7.4 (4.7.4)
kde4-config: 1.0
Comment 1 jistanidiot 2012-04-25 19:26:24 UTC
I just tried this on KDE 4.8.2 and the problem still exists.
Comment 2 jistanidiot 2012-04-25 21:57:44 UTC
Also just checked.  This worked in KDE 4.5 on kubuntu 10.10.  So somewhere between that and 4.7 it broke.
Comment 3 Anne-Marie Mahfouf 2012-04-26 08:39:41 UTC
If I understand the problem: any subfolder added to the panel brings the whole KDE classic menu instead of the subfolder only menu. I don't understand the "open with Dolphin" part and I can't produce it. 
When I add the Utilities to the panel it adds a full Classic KDE menu launcher instead of a Utilities only launcher. 

Please explain better.
Comment 4 jistanidiot 2012-04-27 18:16:37 UTC
I'm not sure I can explain it better.  I created a video showing the differences between Kubuntu 10,11, and 12.  http://www.youtube.com/watch?v=79zWm_GEn3o
Comment 5 Janek Bevendorff 2012-07-13 23:36:39 UTC
*** Bug 294481 has been marked as a duplicate of this bug. ***
Comment 6 Janek Bevendorff 2012-07-13 23:36:59 UTC
*** Bug 303500 has been marked as a duplicate of this bug. ***
Comment 7 Jochen Buchholz 2012-07-14 08:59:28 UTC
I described the same behavior in the duplicate bug 303500 on my Gentoo system (kde 4.8.3) like in kde 4.8.7 in the video above. An other ugly feature is the long time ago perfect working drag and drop feature. When I open the KDE Menu (Kickoff Starter) -> Aplication and  I drag a menu folder "Graphics" to the panel I would asked to place it there as a symbol. Then I got a Kickoff Starter menu button instead of  a Graphics menu button. This new button points to "applications://graphics/" and opens a Dolphin. Unusable.

At this point I must criticize the great work of the kde team a little bit :-)
The dropping of this great feature has a long history. I remember it was dropped at the first time with the first stable kde4, many kde users like me missed this kde3 feature and it start a great discussion in bug 189583. Many old KDE users love this feature and now it is destroyed again. KDE team, take a look on this great old features, instead to copy M$ Window$ features ;-)

Perhaps it would be a great idea to start a feature survey on the KDE home, before kicking off great features.

On the other site your work is great - KDE is my favorite window manager
Comment 8 Janek Bevendorff 2012-08-05 14:57:24 UTC
Adding an icon for a submenu to the panel still doesn't work in 4.9.0. Clicking it only shows the whole KDE menu.

The "shows in Dolphin" part is not reproducible here.
Comment 9 jistanidiot 2013-01-11 13:17:00 UTC
Just tried this from one of the daily builds of kubuntu 13 (KDE 4.9.97).

While the shows in Dolphin problem seems to be fixed, it still puts the whole KDE menu on the panel instead of the correct one.  

Progress but still isn't right.
Comment 10 Juergen Harms 2013-01-30 09:37:58 UTC
Same thing (excluding the Dolphin problem) in Mageia (originally KDE 4.7.1, now KDE 4.9.97)
https://bugs.mageia.org/show_bug.cgi?id=3538

There exists a kind of workaround, manually editing your the configuration file $HOME/.kde4/share/config/plasma-desktop-appletsrc:

1. add the sub-menu launcher to your panel
2. edit .../plasma-desktop-appletsrc
    - find the configuration item for this newly created simplelauncher entry, resp. the item
      with the header [Containments][<nn>][Applets][<mm>][Configuration] for that sub-menu
    - correct the "relativePath=..." statement: orginally, it points to the summit of the kde directory
      tree; append the missing path elements to make the relative path point to the
      relative path that correspond to the sub-menu you need (consulting your kde menu tree).
3.  avoid getting caught by caching effects - for instance: perpare the edited file as an aux. file
    and only copy it to its definitive place from a console while kde is not running.

I realize, slightly painful - but you dont modify your panels every day, and if this bug is with us for some more years, such an effort might be worth its while (I have a script that does this for me, but it is specific to my environment and difficult to generalize).
Comment 11 Joyo 2013-02-15 05:42:49 UTC
Yeah, this bug is affecting me as well. On kubuntu 12.10, KDE 4.9.4.

Juergen, I tried your workaround but no luck. For me, at least the plasma-desktop-appletsrc appears to be correct (as far as I can tell with my limited knowledge). But it still doesn't work, I always get the whole KDE menu, not the submenu I am asking for.

Here are the diff results from plasma-desktop-appletsrc after I try to add a submenu called 'Useful':

137,146d136
< [Containments][3][Applets][32]
< immutability=1
< plugin=simplelauncher
< zvalue=7
<
< [Containments][3][Applets][32][Configuration]
< icon=accessories-dictionary
< relativePath=applications://useful/

As you can see, relativePath is pointing to applications/useful, but when added to the panel it displays the full applications menu.

Any other workarounds / suggestions appreciated. Hopefully this bug will get looked at soon.
Comment 12 Juergen Harms 2013-02-15 07:33:31 UTC
I installed (Mageia-3 prerelease) KDE 4.10, the bug is still there - and the workaround still works for me.

I will, at least, try to document the workaround somewhat better, maybe I can even do some scripting, but presently I am snowed under. Once this is done, I will add a new comment.
Comment 13 Juergen Harms 2013-02-17 22:29:05 UTC
Here goes, and I verified: the work-around works OK, but only for adding panel items that refer to sub-menus created by the user - it does not work if the target sub-menu is part of the KDE provided menu tree.

As an example, here is a menu item that has been created along these lines and that works , copied from my plasma-desktop-appletsrc file:

[Containments][1][Applets][18]
geometry=486,4,50,50
immutability=1
plugin=simplelauncher
zvalue=0

[Containments][1][Applets][18][Configuration]
icon=/usr/local/share/icons/gnome-info.png
relativePath=JHmenus/JhInfo/

[Containments][1][Applets][18][LayoutInformation]
Order=9

JHmenus is the sub-menu that I added at the level of the main kde menu (using the kde menu editor, JhInfo is one of the submenus directly below JHmenu). The menu editor works correctly these day. What does not work, is to add an item to the panel that allows to pull up the JhInfo submenu. I think, we agree on this.



Forget this illustration, it is just meant to explain what I believe to have understood.

I now made the following experiment (and hope you can reproduce it with your own JHmenus-like menu): I created, using the ordinary kde sequence of steps, a new icon in the panel that should pull up my JhInfo submenu - with the incorrect result we know. Looking again at the appletsrc file, the record that has been added is (and has a garbage relativePath clause)

[Containments][1][Applets][72]
geometry=1142,4,50,50
immutability=1
plugin=simplelauncher
zvalue=0

[Containments][1][Applets][72][Configuration]
icon=/usr/local/share/icons/gnome-info.png
relativePath=applications://jhmenus/JhInfo/

Next step is that I edit this new appletsrc file modified by kde when I created the new laucher icon and replace
relativePath=applications://jhmenus/JhInfo/
	by
relativePath=JHmenus/JhInfo/

Hitting the icon I still get the wrong popup. However, after logging out and in again, I obtain the correct submenu - the submenu I created in JhInfo.

I think to remember that in the past also the icon=... statement referred to an incorrect icon and that I also needed to edit the icon=... statement (which now looks ok).

I hope that helps. To avoid the caching effect (the reason why logout/in is needed), I suggest that you do the editing by preparing the appletsrc file under some other name, and then copy that file to plasma-desktop-appletsrc from a console before you log in.
Comment 14 Jekyll Wu 2013-03-01 18:43:28 UTC
*** Bug 313408 has been marked as a duplicate of this bug. ***
Comment 15 jistanidiot 2013-04-25 19:59:43 UTC
Just check in Kubuntu 13.04.

kde4-config --version
Qt: 4.8.4
KDE Development Platform: 4.10.2
kde4-config: 1.0

The bug is still there.  Add a submenu to the panel and it adds the full K menu.  The workaround described by Juergen Harms (find the submenu in  $HOME/.kde/share/config/plasma-desktop-appletsrc and remove "applications://" from the path seems to work although it only works on user generated menus).
Comment 16 michele mazza 2014-05-10 10:14:04 UTC
One year later and the bug is still with us.
KDE 4.12.4 on Debian jessie.
Comment 17 Juergen Harms 2014-05-10 10:29:49 UTC
Just to underline that user interest in getting this fixed did not go to sleep and is as strong as ever: bug still present also in Mageia (4, KDE 4.11)
Comment 18 Tony Green 2014-10-01 16:18:21 UTC
(In reply to Juergen Harms from comment #17)
> Just to underline that user interest in getting this fixed did not go to
> sleep and is as strong as ever: bug still present also in Mageia (4, KDE
> 4.11)

Still here in 4.14.

Rather amazing that a sophisticated desktop environment like KDE still can't do what even a lightweight one like XFCE can do.
Comment 19 Christoph Feck 2014-12-23 00:21:48 UTC
*** Bug 342135 has been marked as a duplicate of this bug. ***
Comment 20 Nate Graham 2018-06-08 18:32:57 UTC
Hello!

This bug report was filed for KDE Plasma 4, which reached end-of-support status in August 2015. KDE Plasma 5's desktop shell has been almost completely rewritten for better performance and usability, so it is likely that this bug has already been resolved in Plasma 5.

Accordingly, we hope you understand why we must close this bug report. If the issue described  here is still present in KDE Plasma 5.12 or later, please feel free to open a new ticket in the "plasmashell" product after reading https://community.kde.org/Get_Involved/Bug_Reporting

If you would like to get involved in KDE's bug triaging effort so that future mass bug closes like this are less likely, please read https://community.kde.org/Get_Involved#Bug_Triaging

Thanks for your understanding!

Nate Graham