From 12940c52ceb78791f399ae9f50e77e1649777478 Mon Sep 17 00:00:00 2001 From: dou33 Date: Tue, 26 Oct 2021 14:45:47 +0800 Subject: [PATCH] add 0001-adjust-desktop-readonly-icon-agree-with-icon-view.patch --- ...p-readonly-icon-agree-with-icon-view.patch | 70 +++++++++++++++++++ peony.spec | 8 ++- 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 0001-adjust-desktop-readonly-icon-agree-with-icon-view.patch diff --git a/0001-adjust-desktop-readonly-icon-agree-with-icon-view.patch b/0001-adjust-desktop-readonly-icon-agree-with-icon-view.patch new file mode 100644 index 0000000..2938c26 --- /dev/null +++ b/0001-adjust-desktop-readonly-icon-agree-with-icon-view.patch @@ -0,0 +1,70 @@ +diff -Naur peony-3.0.4/libpeony-qt/controls/menu/directory-view-menu/directory-view-menu.cpp peony-3.0.4~/libpeony-qt/controls/menu/directory-view-menu/directory-view-menu.cpp +--- peony-3.0.4/libpeony-qt/controls/menu/directory-view-menu/directory-view-menu.cpp 2020-11-03 09:02:05.000000000 +0800 ++++ peony-3.0.4~/libpeony-qt/controls/menu/directory-view-menu/directory-view-menu.cpp 2021-10-26 14:11:07.134058887 +0800 +@@ -616,26 +616,22 @@ + if (m_selections.count() >1 && m_is_trash) + return l; + +- if (!m_is_search) { +- if (m_is_trash && m_selections.count() != 1){ +- +- }else{ +- l<setAttribute(Qt::WA_DeleteOnClose); +- p->show(); +- } else { +- PropertiesWindow *p = new PropertiesWindow(m_selections); +- p->setAttribute(Qt::WA_DeleteOnClose); +- p->show(); +- } +- }); +- } ++ if (! m_is_search) { ++ l<setAttribute(Qt::WA_DeleteOnClose); ++ p->show(); ++ } else { ++ PropertiesWindow *p = new PropertiesWindow(m_selections); ++ p->setAttribute(Qt::WA_DeleteOnClose); ++ p->show(); ++ } ++ }); + } else if (m_selections.count() == 1) { + l<canRead() && !file->canWrite() && !file->canExecute()) { +- QIcon symbolicLinkIcon = QIcon::fromTheme("emblem-readonly"); +- symbolicLinkIcon.paint(painter, linkRect, Qt::AlignCenter); +- } else if (!file->canRead() && !file->canWrite() && !file->canExecute()) { ++ if (! file->canRead()) ++ { + QIcon symbolicLinkIcon = QIcon::fromTheme("emblem-unreadable"); + symbolicLinkIcon.paint(painter, linkRect, Qt::AlignCenter); + } ++ else if(! file->canWrite() && ! file->canExecute()) ++ { ++ QIcon symbolicLinkIcon = QIcon::fromTheme("emblem-readonly"); ++ symbolicLinkIcon.paint(painter, linkRect, Qt::AlignCenter); ++ } + } + + if (index.data(Qt::UserRole + 1).toBool()) { diff --git a/peony.spec b/peony.spec index a2ac2ec..5f1abec 100644 --- a/peony.spec +++ b/peony.spec @@ -2,7 +2,7 @@ Name: peony Version: 3.0.4 -Release: 1 +Release: 2 Summary: file Manager for the UKUI desktop License: GPL-2.0+ GPL-3.0+ Expat LGPL-3.0+ URL: http://www.ukui.org @@ -17,6 +17,7 @@ Requires: peony-common, libpeony3 Requires: gvfs patch0: 001-fix-excute-file.patch +patch1: 0001-adjust-desktop-readonly-icon-agree-with-icon-view.patch %description Peony is the official file manager for the UKUI desktop. It allows one @@ -73,6 +74,7 @@ Provides: libpeony %prep %setup -q %patch0 -p1 +%patch1 -p1 %build qmake-qt5 @@ -122,7 +124,11 @@ rm -rf $RPM_BUILD_ROOT %{_prefix}/%{_lib}/pkgconfig/*.pc %{_prefix}/%{_lib}/*.so + %changelog +* Tue Oct 26 2021 douyan - 3.0.4-2 +- add patch:0001-adjust-desktop-readonly-icon-agree-with-icon-view.patch + * Mon Oct 26 2020 douyan - 3.0.4-1 - update to upstream version 3.0.4