From e2acb57e5ec9210902625b28b97d04817ef63d1242104ab1bd36e631b07615a7 Mon Sep 17 00:00:00 2001 From: Christophe Giboudeaux Date: Thu, 27 Aug 2020 11:34:02 +0000 Subject: [PATCH 1/3] OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/krusader?expand=0&rev=38 --- krusader.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/krusader.spec b/krusader.spec index a612bbd..584dd4d 100644 --- a/krusader.spec +++ b/krusader.spec @@ -1,7 +1,7 @@ # # spec file for package krusader # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -23,7 +23,7 @@ Summary: A File Manager License: GPL-2.0-or-later Group: Productivity/File utilities URL: https://krusader.org/ -Source: http://download.kde.org/stable/krusader/%{version}/%{name}-%{version}.tar.xz +Source: https://download.kde.org/stable/krusader/%{version}/%{name}-%{version}.tar.xz Source1: krusader_browse_iso.desktop Source2: org.kde.krusader.root-mode.desktop BuildRequires: extra-cmake-modules >= 1.7.0 From 744ed662c08e694b98d929d8b3b79de42da25b7a0a021c09ddf67dfa5a7aad0f Mon Sep 17 00:00:00 2001 From: Christophe Giboudeaux Date: Thu, 27 Aug 2020 12:56:40 +0000 Subject: [PATCH 2/3] OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/krusader?expand=0&rev=39 --- krusader.changes | 5 +++++ krusader.spec | 30 +++++++++++++++++------------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/krusader.changes b/krusader.changes index 9c85f6f..278d611 100644 --- a/krusader.changes +++ b/krusader.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Aug 27 12:56:33 UTC 2020 - Christophe Giboudeaux + +- Spec cleanup + ------------------------------------------------------------------- Mon Aug 26 07:18:41 UTC 2019 - wbauer@tmo.at diff --git a/krusader.spec b/krusader.spec index 584dd4d..9f324b3 100644 --- a/krusader.spec +++ b/krusader.spec @@ -86,15 +86,19 @@ An advanced twin panel (commander style) file manager for KDE. %build %cmake_kf5 -d build -%make_jobs +%cmake_build %install %kf5_makeinstall -C build + mkdir -p %{buildroot}%{_kf5_servicesdir}/ServiceMenus/ cp %{SOURCE1} %{buildroot}%{_kf5_servicesdir}/ServiceMenus/ cp %{SOURCE2} %{buildroot}%{_kf5_applicationsdir}/ + %suse_update_desktop_file org.kde.krusader.root-mode FileManager Utility + %find_lang %{name} + %fdupes %{buildroot} %post -p /sbin/ldconfig @@ -103,27 +107,27 @@ cp %{SOURCE2} %{buildroot}%{_kf5_applicationsdir}/ %files -f %{name}.lang %license COPYING %doc README AUTHORS ChangeLog TODO -%{_kf5_applicationsdir}/org.kde.krusader*.desktop -%{_kf5_appsdir}/krusader -%{_kf5_bindir}/krusader -%{_kf5_iconsdir}/??color/*/apps/krusader*.png -%{_kf5_plugindir}/kio_krarc.so -%{_kf5_servicesdir}/krarc.protocol -%{_kf5_kxmlguidir}/ -%{_kf5_mandir}/man1/krusader.1.gz +%dir %{_kf5_appstreamdir} %dir %{_kf5_mandir}/uk %dir %{_kf5_mandir}/uk/man1 -%{_kf5_mandir}/*/man1/krusader.1.gz %exclude %{_kf5_htmldir}/*/krusader -%dir %{_kf5_appstreamdir} +%{_kf5_applicationsdir}/org.kde.krusader*.desktop +%{_kf5_appsdir}/krusader %{_kf5_appstreamdir}/org.kde.krusader.appdata.xml +%{_kf5_bindir}/krusader +%{_kf5_iconsdir}/??color/*/apps/krusader*.png +%{_kf5_kxmlguidir}/ +%{_kf5_mandir}/*/man1/krusader.1.gz +%{_kf5_mandir}/man1/krusader.1.gz +%{_kf5_plugindir}/kio_krarc.so +%{_kf5_servicesdir}/krarc.protocol %files -n kio_iso %config %{_kf5_configdir}/kio_isorc -%{_kf5_plugindir}/kio_iso.so* -%{_kf5_servicesdir}/iso.protocol %dir %{_kf5_servicesdir}/ServiceMenus +%{_kf5_plugindir}/kio_iso.so* %{_kf5_servicesdir}/ServiceMenus/krusader_browse_iso.desktop +%{_kf5_servicesdir}/iso.protocol %files doc %doc %lang(en) %{_kf5_htmldir}/en/krusader From d09af4e7480acde3f7ea646e28d317cdad63d4b25a58aa8ce9bffba6e7697e31 Mon Sep 17 00:00:00 2001 From: Christophe Giboudeaux Date: Wed, 29 Jun 2022 14:05:21 +0000 Subject: [PATCH 3/3] OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/krusader?expand=0&rev=40 --- ...g-actions-for-create-extract-archive.patch | 116 ++++++++++++++++++ krusader.changes | 6 + krusader.spec | 6 +- 3 files changed, 126 insertions(+), 2 deletions(-) create mode 100644 0001-Fixed-non-working-actions-for-create-extract-archive.patch diff --git a/0001-Fixed-non-working-actions-for-create-extract-archive.patch b/0001-Fixed-non-working-actions-for-create-extract-archive.patch new file mode 100644 index 0000000..5d9292a --- /dev/null +++ b/0001-Fixed-non-working-actions-for-create-extract-archive.patch @@ -0,0 +1,116 @@ +From 3d7ae219e8df07861d9a68d6f25a8f861f48ea9b Mon Sep 17 00:00:00 2001 +From: Yaroslav Sidlovsky +Date: Sat, 20 Nov 2021 19:16:02 +0300 +Subject: [PATCH] Fixed non working actions for create / extract archives + +PanelContextMenu instance created in PanelContextMenu::run now lives long +enough so that create / extract archive actions won't be deleted right after +PanelContextMenu::run call. + +Important note: after this patch I've spotted crash, same as in the bug +https://bugs.kde.org/show_bug.cgi?id=443540. + +Looks like this crash has been fixed in the KF5 5.89(git). + +BUG: 441376 +--- + krusader/Panel/listpanel.cpp | 7 ++++--- + krusader/Panel/listpanel.h | 2 ++ + krusader/Panel/panelcontextmenu.cpp | 9 +++++---- + krusader/Panel/panelcontextmenu.h | 5 +++-- + 4 files changed, 14 insertions(+), 9 deletions(-) + +diff --git a/krusader/Panel/listpanel.cpp b/krusader/Panel/listpanel.cpp +index 5789d22..4278eb7 100644 +--- a/krusader/Panel/listpanel.cpp ++++ b/krusader/Panel/listpanel.cpp +@@ -60,7 +60,6 @@ + #include "krpreviewpopup.h" + #include "krsearchbar.h" + #include "listpanelactions.h" +-#include "panelcontextmenu.h" + #include "panelfunc.h" + #include "sidebar.h" + #include "viewactions.h" +@@ -873,12 +872,14 @@ void ListPanel::popRightClickMenu(const QPoint &loc) + { + // run it, on the mouse location + int j = QFontMetrics(font()).height() * 2; +- PanelContextMenu::run(QPoint(loc.x() + 5, loc.y() + j), this); ++ auto menu = PanelContextMenu::run(QPoint(loc.x() + 5, loc.y() + j), this); ++ _contextMenu.reset(menu); + } + + void ListPanel::popEmptyRightClickMenu(const QPoint &loc) + { +- PanelContextMenu::run(loc, this); ++ auto menu = PanelContextMenu::run(loc, this); ++ _contextMenu.reset(menu); + } + + QString ListPanel::getCurrentName() const +diff --git a/krusader/Panel/listpanel.h b/krusader/Panel/listpanel.h +index b1633dc..5180e8a 100644 +--- a/krusader/Panel/listpanel.h ++++ b/krusader/Panel/listpanel.h +@@ -54,6 +54,7 @@ + #include + + #include "krpanel.h" ++#include "panelcontextmenu.h" + + #define PROP_SYNC_BUTTON_ON 1 + #define PROP_LOCKED 2 +@@ -253,6 +254,7 @@ private: + QUrl _pinnedUrl; // only for TabState::PINNED + TabState _tabState; + QList sidebarSplitterSizes; ++ QScopedPointer _contextMenu; + }; + + #endif +diff --git a/krusader/Panel/panelcontextmenu.cpp b/krusader/Panel/panelcontextmenu.cpp +index ec7b172..8b0239e 100644 +--- a/krusader/Panel/panelcontextmenu.cpp ++++ b/krusader/Panel/panelcontextmenu.cpp +@@ -55,14 +55,15 @@ + #include "../MountMan/kmountman.h" + #include "../UserAction/useractionpopupmenu.h" + +-void PanelContextMenu::run(const QPoint &pos, KrPanel *panel) ++PanelContextMenu* PanelContextMenu::run(const QPoint &pos, KrPanel *panel) + { +- PanelContextMenu menu(panel); +- QAction * res = menu.exec(pos); ++ auto menu = new PanelContextMenu(panel); ++ QAction * res = menu->exec(pos); + int result = res && res->data().canConvert() ? + res->data().toInt() : + -1; +- menu.performAction(result); ++ menu->performAction(result); ++ return menu; + } + + /** +diff --git a/krusader/Panel/panelcontextmenu.h b/krusader/Panel/panelcontextmenu.h +index cd37a00..7199af4 100644 +--- a/krusader/Panel/panelcontextmenu.h ++++ b/krusader/Panel/panelcontextmenu.h +@@ -40,10 +40,11 @@ class PanelContextMenu : public QMenu + { + Q_OBJECT + public: +- static void run(const QPoint &pos, KrPanel *panel); ++ static PanelContextMenu* run(const QPoint &pos, KrPanel *panel); + + private: +- explicit PanelContextMenu(KrPanel *thePanel, QWidget *parent = 0); ++ explicit PanelContextMenu(KrPanel *thePanel, QWidget *parent = nullptr); ++ + void performAction(int id); + void addEmptyMenuEntries(); // adds the choices for a menu without selected items + void addCreateNewMenu(); // adds a "create new" submenu +-- +2.36.1 + diff --git a/krusader.changes b/krusader.changes index 278d611..c1109f2 100644 --- a/krusader.changes +++ b/krusader.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jun 29 14:04:17 UTC 2022 - Christophe Giboudeaux + +- Add patch to fix the 'Compress' menu (boo#1198725) + * 0001-Fixed-non-working-actions-for-create-extract-archive.patch + ------------------------------------------------------------------- Thu Aug 27 12:56:33 UTC 2020 - Christophe Giboudeaux diff --git a/krusader.spec b/krusader.spec index 9f324b3..784a833 100644 --- a/krusader.spec +++ b/krusader.spec @@ -1,7 +1,7 @@ # # spec file for package krusader # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,6 +26,8 @@ URL: https://krusader.org/ Source: https://download.kde.org/stable/krusader/%{version}/%{name}-%{version}.tar.xz Source1: krusader_browse_iso.desktop Source2: org.kde.krusader.root-mode.desktop +# PATCH-FIX-UPSTREAM +Patch0: 0001-Fixed-non-working-actions-for-create-extract-archive.patch BuildRequires: extra-cmake-modules >= 1.7.0 BuildRequires: fdupes BuildRequires: libacl-devel @@ -82,7 +84,7 @@ Group: Productivity/File utilities An advanced twin panel (commander style) file manager for KDE. %prep -%setup -q +%autosetup -p1 %build %cmake_kf5 -d build