Bug 372231 - right click service menu's not working
Summary: right click service menu's not working
Status: RESOLVED FIXED
Alias: None
Product: krusader
Classification: Applications
Component: general (show other bugs)
Version: 2.5.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Krusader Bugs Distribution List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-08 19:38 UTC by dutchkind
Modified: 2018-05-06 00:15 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dutchkind 2016-11-08 19:38:29 UTC
In the previous version of Krusader items from /usr/share/kde4/services/ServiceMenus would show up in the appropriate right click menu's in Krusader, like an extra category "Actions", etc. In plasma 5 the new location for this is /usr/share/kservices5/ServiceMenus but Krusader doesn't show any of those since the port to plasma 5 was completed with the 2.5.0 version. The items do show up in Dolphin. This removes a lot of functionality from Krusader.
Comment 1 Alex Bikadorov 2016-11-10 14:07:10 UTC
Right now Krusader does currently show only 'Compress' and 'Extract' service menus for archives.

The problem is that the new services are linked with Dolphin. A configuration dialog in Dolphin settings belongs to it for de/activating each service and installing new ones.
And services like "Git" won't show the file status in Krusader.

Maybe statically adding specific services is enough. What do you miss?
Comment 2 dutchkind 2016-11-11 08:56:15 UTC
Before, as I said before, all desktop files /usr/share/kde4/services/ServiceMenus would automatically show up in Krusader. Besides some system right click services, there was an actions entry where I had added some of my own right click actions, and I had some for jpg files so I could run custom actions on them.

Are we talking about the same, i.e. right click on a certain file and then do some action, other then open?

How would I add services statically?
No problem if I have to apply a workaround, although I think an important feature is missing now and I have to use dolphin for those actions right now.
Comment 3 Alex Bikadorov 2016-11-15 14:41:59 UTC
> Are we talking about the same, i.e. right click on a certain file and then do some action, other then open?
There are different types of "Services". This is what I have installed:

> $ls /usr/share/kservices5/ServiceMenus
> dragonplayer_play_dvd.desktop  installfont.desktop  konsolehere.desktop  konsolerun.desktop  slideshow.desktop

These are some of the services listed in Dolphin but not all (they all have "X-KDE-ServiceTypes=KonqPopupMenu/Plugin" as type).
You are referring only to these, right? Sorry I have to ask three times but KDE services and plugins and what changed between KDE4 and 5 is new to me.

We could simply add all plugins with this type (filter by KPluginMetaData::serviceTypes()).

[ Other Dolphin services are installed in "/usr/share/kservices5/" with other types - e.g. "ServiceTypes=KFileItemAction/Plugin" or "X-KDE-ServiceTypes=FileViewVersionControlPlugin".
And only "Ark"s "compress and "extract" services are installed in "/usr/lib/qt/plugins/kf5/kfileitemaction" to make finding them not too easy:) ]

And not meant as a solution, but FYI, you can always add custom actions via Krusader's Useractions. I find this easier than creating own *.desktop files.
Comment 4 dutchkind 2016-11-15 16:39:39 UTC
(In reply to Alex Bikadorov from comment #3)
> > Are we talking about the same, i.e. right click on a certain file and then do some action, other then open?
> There are different types of "Services". This is what I have installed:
> 
> > $ls /usr/share/kservices5/ServiceMenus
> > dragonplayer_play_dvd.desktop  installfont.desktop  konsolehere.desktop  konsolerun.desktop  slideshow.desktop
> 
> These are some of the services listed in Dolphin but not all (they all have
> "X-KDE-ServiceTypes=KonqPopupMenu/Plugin" as type).
> You are referring only to these, right? Sorry I have to ask three times but
> KDE services and plugins and what changed between KDE4 and 5 is new to me.
> 
> We could simply add all plugins with this type (filter by
> KPluginMetaData::serviceTypes()).
> 
Yes, those are the ones I refer to. I have many more, and some of my own. It would be great if that could work in Krusader! Thanks for all the hard work!

> And not meant as a solution, but FYI, you can always add custom actions via
> Krusader's Useractions. I find this easier than creating own *.desktop files.
>
I know, have been using krusader since kde3 and is one of the first things I install on a system :) But the advantage of the service menu's is that they are system wide and usable everywhere. That way I can create one and it always works. But I still have also some useractions added to krusader
Comment 5 Alex Bikadorov 2016-11-16 15:49:28 UTC
Git commit 5c6059fbd30365dbd036db556a38019fd7a84872 by Alexander Bikadorov.
Committed on 16/11/2016 at 15:39.
Pushed by abikadorov into branch 'master'.

FIXED: [ 372231 ] Added KDE's service actions again to right-click popup menu

KFileItemActions::addServiceActionsTo() is not deprecated so we should continue using it like before.

M  +8    -14   krusader/Panel/krpopupmenu.cpp
M  +1    -1    krusader/Panel/krpopupmenu.h

http://commits.kde.org/krusader/5c6059fbd30365dbd036db556a38019fd7a84872
Comment 6 Alex Bikadorov 2016-11-16 15:55:40 UTC
One caveat remains: In Dolphin Settings->Services you one can dis-/enable service entries and this will also affect Krudader's popup menu.

The best solution would be to add an "ignoreConfig" flag to  KFileItemActions::addServiceActionsTo()... we have to patch Frameworks.