diff --git a/add-service-actions-to-right-click-popup-menu.patch b/add-service-actions-to-right-click-popup-menu.patch new file mode 100644 index 0000000..c92e192 --- /dev/null +++ b/add-service-actions-to-right-click-popup-menu.patch @@ -0,0 +1,78 @@ +From 5c6059fbd30365dbd036db556a38019fd7a84872 Mon Sep 17 00:00:00 2001 +From: Alexander Bikadorov +Date: Wed, 16 Nov 2016 16:39:40 +0100 +Subject: FIXED: [ 372231 ] Added KDE's service actions again to right-click + popup menu + +BUG: 372231 + +KFileItemActions::addServiceActionsTo() is not deprecated so we should continue using it like before. +--- + krusader/Panel/krpopupmenu.cpp | 22 ++++++++-------------- + krusader/Panel/krpopupmenu.h | 2 +- + 2 files changed, 9 insertions(+), 15 deletions(-) + +diff --git a/krusader/Panel/krpopupmenu.cpp b/krusader/Panel/krpopupmenu.cpp +index 7eac4a9..bfb33d1 100644 +--- a/krusader/Panel/krpopupmenu.cpp ++++ b/krusader/Panel/krpopupmenu.cpp +@@ -63,9 +63,8 @@ void KrPopupMenu::run(const QPoint &pos, KrPanel *panel) + /** + * Copied from dolphin/src/dolphincontextmenu.cpp and modified to add only compress and extract submenus. + */ +-bool KrPopupMenu::addCompressAndExtractPluginActions() ++void KrPopupMenu::addCompressAndExtractPluginActions() + { +- + KFileItemListProperties props(_items); + + QVector jsonPlugins = KPluginLoader::findPlugins("kf5/kfileitemaction", +@@ -81,8 +80,6 @@ bool KrPopupMenu::addCompressAndExtractPluginActions() + addActions(abstractPlugin->actions(props, this)); + } + } +- +- return !jsonPlugins.isEmpty(); + } + + KrPopupMenu::KrPopupMenu(KrPanel *thePanel, QWidget *parent) : QMenu(parent), panel(thePanel), empty(false), +@@ -189,16 +186,13 @@ KrPopupMenu::KrPopupMenu(KrPanel *thePanel, QWidget *parent) : QMenu(parent), pa + uAct->setText(i18n("User Actions")); + + // add compress and extract plugins (if available) +- bool success = addCompressAndExtractPluginActions(); +- +- /* +- * When KF 5.25 is adopted by all distros, we can remove these 2 lines (and corresponding code) +- * because since KF 5.25 compress and extract submenus are standalone plugins. +- */ +- if (!success) { +- fileItemActions.setItemListProperties(KFileItemListProperties(_items)); +- fileItemActions.addServiceActionsTo(this); +- } ++ addCompressAndExtractPluginActions(); ++ ++ // NOTE: design and usability problem here. Services disabled in kservicemenurc settings won't ++ // be added to the menu. But Krusader does not provide a way do change these settings (only ++ // Dolphin does). ++ fileItemActions.setItemListProperties(KFileItemListProperties(_items)); ++ fileItemActions.addServiceActionsTo(this); + + addSeparator(); + +diff --git a/krusader/Panel/krpopupmenu.h b/krusader/Panel/krpopupmenu.h +index 2d16818..b20dcf8 100644 +--- a/krusader/Panel/krpopupmenu.h ++++ b/krusader/Panel/krpopupmenu.h +@@ -44,7 +44,7 @@ protected: + void performAction(int id); + void addEmptyMenuEntries(); // adds the choices for a menu without selected items + void addCreateNewMenu(); // adds a "create new" submenu +- bool addCompressAndExtractPluginActions(); // adds various plugin actions ++ void addCompressAndExtractPluginActions(); // adds various plugin actions + + enum ID { + OPEN_ID, +-- +cgit v0.11.2 + diff --git a/krusader.changes b/krusader.changes index 7563955..186201f 100644 --- a/krusader.changes +++ b/krusader.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Dec 22 18:46:27 UTC 2016 - wbauer@tmo.at + +- Add add-service-actions-to-right-click-popup-menu.patch to add + KDE's service actions to the right click popup menu in krusader + again (boo#1016980, kde#372231) + ------------------------------------------------------------------- Mon Nov 21 20:01:31 UTC 2016 - wbauer@tmo.at diff --git a/krusader.spec b/krusader.spec index 8742f92..2bcb0a9 100644 --- a/krusader.spec +++ b/krusader.spec @@ -31,6 +31,8 @@ Patch0: krusader-2.5.0-generate-manpage.patch Patch1: 0001-Don-t-hardcode-appdata-location.patch # PATCH-FIX-UPSTREAM Remove-non-archive-mimetypes-from-krarc-archive-mime-type-list.patch boo#1011320, kde#371765 -- fixes dolphin opening e.g. LibreOffice files as archives Patch2: Remove-non-archive-mimetypes-from-krarc-archive-mime-type-list.patch +# PATCH-FIX-UPSTREAM add-service-actions-to-right-click-popup-menu.patch boo#1016980, kde#372231 -- add KDE's service actions to the right click popup menu in krusader again +Patch3: add-service-actions-to-right-click-popup-menu.patch BuildRequires: extra-cmake-modules >= 1.1.0 BuildRequires: fdupes BuildRequires: libacl-devel @@ -91,6 +93,7 @@ An advanced twin panel (commander style) file manager for KDE. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build export RPM_OPT_FLAGS="%{optflags} -fpermissive"