Compare commits

..

No commits in common. "7cd0c8a483f814f21921fdf0cf976b1348104494" and "46d5e699f165404ef1d945ac391e987512bcf27e" have entirely different histories.

4 changed files with 22 additions and 346 deletions

View File

@ -1,28 +0,0 @@
From e9870402136ad75706de96effc40745dc8ab0a41 Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Tue, 6 Jun 2023 15:06:10 +0800
Subject: [PATCH 1/2] move sambashare to usershares
---
peony-share/peony-share.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/peony-share/peony-share.sh b/peony-share/peony-share.sh
index 431e747..1b181ed 100755
--- a/peony-share/peony-share.sh
+++ b/peony-share/peony-share.sh
@@ -2,9 +2,9 @@
if [ "$#" -ge 1 ];
then
- if [[ $(groups $1 | grep "sambashare") == "" ]];
+ if [[ $(groups $1 | grep "usershares") == "" ]];
then
- usermod -a -G sambashare "$1"
+ usermod -a -G usershares "$1"
fi
fi
--
2.33.0

View File

@ -1,57 +0,0 @@
From be8300414c7f15ce7dd1a0f7dafaacb76a835d48 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BE=AF=E7=BA=A2=E5=8B=8B?= <houhongxun@kylinos.cn>
Date: Wed, 24 Apr 2024 09:44:19 +0800
Subject: [PATCH] replace some deprecated member functions to recommended ones
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: 侯红勋 <houhongxun@kylinos.cn>
---
peony-bluetooth-plugin/bluetoothplugin.cpp | 2 +-
peony-share/SwitchButton/switchbutton.cpp | 2 +-
peony-share/share-properties-page-plugin.cpp | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/peony-bluetooth-plugin/bluetoothplugin.cpp b/peony-bluetooth-plugin/bluetoothplugin.cpp
index 10ab347..d05daaa 100644
--- a/peony-bluetooth-plugin/bluetoothplugin.cpp
+++ b/peony-bluetooth-plugin/bluetoothplugin.cpp
@@ -81,7 +81,7 @@ QList<QAction *> BluetoothPlugin::menuActions(Peony::MenuPluginInterface::Types
}
QProcess process;
- process.start("rfkill list");
+ process.start("rfkill", QStringList() << "list");
process.waitForFinished();
QByteArray output = process.readAllStandardOutput();
QString str_output = output;
diff --git a/peony-share/SwitchButton/switchbutton.cpp b/peony-share/SwitchButton/switchbutton.cpp
index 38bb00a..f064ded 100644
--- a/peony-share/SwitchButton/switchbutton.cpp
+++ b/peony-share/SwitchButton/switchbutton.cpp
@@ -208,7 +208,7 @@ void SwitchButton::mousePressEvent(QMouseEvent *){
}else{
QProcess tempProcess;
QString cmd = QString("groups");
- tempProcess.start(cmd);
+ tempProcess.start(cmd, QStringList());
tempProcess.waitForFinished();
QString result = tempProcess.readAllStandardOutput().data();
diff --git a/peony-share/share-properties-page-plugin.cpp b/peony-share/share-properties-page-plugin.cpp
index 69a20da..b6a37d8 100644
--- a/peony-share/share-properties-page-plugin.cpp
+++ b/peony-share/share-properties-page-plugin.cpp
@@ -76,7 +76,7 @@ bool SharePropertiesPagePlugin::supportUris(const QStringList &uris)
return false;
}
// don't share user's home directory file:///home/xxx/
- QStringList file = info->uri().split('/', QString::SkipEmptyParts);
+ QStringList file = info->uri().split('/', Qt::SkipEmptyParts);
if ((3 == file.size ()) && (file.at(1) == "home")) {
return false;
}
--
2.43.0

View File

@ -1,130 +0,0 @@
From 5b815653a800a278e8733d1d4edbfb89cb6e03b9 Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Thu, 8 Jun 2023 09:34:56 +0800
Subject: [PATCH] add share information of peony-share
---
peony-share/SwitchButton/switchbutton.cpp | 17 +++++++++++++++++
peony-share/peony-share.pro | 2 ++
.../translations/peony-share-extension_cs.ts | 13 +++++++++++++
.../translations/peony-share-extension_tr.ts | 13 +++++++++++++
.../translations/peony-share-extension_zh_CN.ts | 13 +++++++++++++
5 files changed, 58 insertions(+)
diff --git a/peony-share/SwitchButton/switchbutton.cpp b/peony-share/SwitchButton/switchbutton.cpp
index d21970d..38bb00a 100644
--- a/peony-share/SwitchButton/switchbutton.cpp
+++ b/peony-share/SwitchButton/switchbutton.cpp
@@ -20,6 +20,8 @@
#include "switchbutton.h"
#include <QDebug>
+#include <QMessageBox>
+#include <QProcess>
#define THEME_QT_SCHEMA "org.ukui.style"
#define THEME_GTK_SCHEMA "org.mate.interface"
#define TIMER_INTERVAL 5 //每隔5ms动画移动一次
@@ -204,6 +206,21 @@ void SwitchButton::mousePressEvent(QMouseEvent *){
mEndX = 0;
return ;
}else{
+ QProcess tempProcess;
+ QString cmd = QString("groups");
+ tempProcess.start(cmd);
+ tempProcess.waitForFinished();
+
+ QString result = tempProcess.readAllStandardOutput().data();
+ tempProcess.close();
+ bool bFail = false;
+ bFail= result.contains("usershares");
+
+ if(!bFail)
+ {
+ QMessageBox::information(this,tr("infomation"),tr("user no group usershares, please log off and try agagin"));
+ return;
+ }
checked = !checked;
Q_EMIT checkedChanged(checked);
diff --git a/peony-share/peony-share.pro b/peony-share/peony-share.pro
index 9474deb..55f35a5 100644
--- a/peony-share/peony-share.pro
+++ b/peony-share/peony-share.pro
@@ -27,6 +27,8 @@ TRANSLATIONS += translations/peony-share-extension_cs.ts \
translations/peony-share-extension_tr.ts \
translations/peony-share-extension_zh_CN.ts
+system("lrelease-qt5 translations/*.ts")
+
RESOURCES += resources.qrc
target.path = $$[QT_INSTALL_LIBS]/peony-extensions
diff --git a/peony-share/translations/peony-share-extension_cs.ts b/peony-share/translations/peony-share-extension_cs.ts
index a2c1812..f4c69c1 100644
--- a/peony-share/translations/peony-share-extension_cs.ts
+++ b/peony-share/translations/peony-share-extension_cs.ts
@@ -74,4 +74,17 @@
<translation>Komentář:</translation>
</message>
</context>
+<context>
+ <name>SwitchButton</name>
+ <message>
+ <location filename="../SwitchButton/switchbutton.cpp" line="221"/>
+ <source>infomation</source>
+ <translation>Informace o připomenutí</translation>
+ </message>
+ <message>
+ <location filename="../SwitchButton/switchbutton.cpp" line="221"/>
+ <source>user no group usershares, please log off and try agagin</source>
+ <translation>Tento uživatel není ve skupině usershares a musí se odhlásit a zkusit sdílet znovu</translation>
+ </message>
+</context>
</TS>
diff --git a/peony-share/translations/peony-share-extension_tr.ts b/peony-share/translations/peony-share-extension_tr.ts
index 0c9c652..de95916 100644
--- a/peony-share/translations/peony-share-extension_tr.ts
+++ b/peony-share/translations/peony-share-extension_tr.ts
@@ -74,4 +74,17 @@
<translation>Yorum yap:</translation>
</message>
</context>
+<context>
+ <name>SwitchButton</name>
+ <message>
+ <location filename="../SwitchButton/switchbutton.cpp" line="221"/>
+ <source>infomation</source>
+ <translation>Hatırlatma Bilgisi</translation>
+ </message>
+ <message>
+ <location filename="../SwitchButton/switchbutton.cpp" line="221"/>
+ <source>user no group usershares, please log off and try agagin</source>
+ <translation>Bu kullanıcı usershares kullanıcı grubunda değil ve çıkıp tekrar paylaşmaya çalışmalı</translation>
+ </message>
+</context>
</TS>
diff --git a/peony-share/translations/peony-share-extension_zh_CN.ts b/peony-share/translations/peony-share-extension_zh_CN.ts
index 2b52463..0f64c7c 100644
--- a/peony-share/translations/peony-share-extension_zh_CN.ts
+++ b/peony-share/translations/peony-share-extension_zh_CN.ts
@@ -74,4 +74,17 @@
<translation>注释:</translation>
</message>
</context>
+<context>
+ <name>SwitchButton</name>
+ <message>
+ <location filename="../SwitchButton/switchbutton.cpp" line="221"/>
+ <source>infomation</source>
+ <translation>提示信息</translation>
+ </message>
+ <message>
+ <location filename="../SwitchButton/switchbutton.cpp" line="221"/>
+ <source>user no group usershares, please log off and try agagin</source>
+ <translation>此用户不在usershares用户组中需要注销后重新尝试共享功能</translation>
+ </message>
+</context>
</TS>
--
2.33.0

View File

@ -1,115 +1,44 @@
%define debug_package %{nil}
Name: peony-extensions
Version: 3.10.0
Release: 6
Summary: adds extended functionality to the Peony file manager.
Release: 1
Summary: Peony qt extensions (common files)
License: GPLv3 and LGPLv3
URL: http://www.ukui.org
Source0: %{name}-%{version}.tar.gz
Patch01: 0001-move-sambashare-to-usershares.patch
Patch02: 0002-add-share-information-of-peony-share.patch
Patch03: 0001-replace-some-deprecated-member-functions-to-recommen.patch
BuildRequires: cmake
BuildRequires: pkgconf
BuildRequires: glib2-devel
#BuildRequires: qt5-qmake
BuildRequires: qt5-qtbase-devel
BuildRequires: qtchooser
BuildRequires: poppler-qt5-devel
BuildRequires: libpeony-dev
#BuildRequires: libpeony3
BuildRequires: peony
BuildRequires: poppler-qt5-devel
BuildRequires: gsettings-qt-devel
BuildRequires: libudisks2-devel
BuildRequires: libnotify-devel
BuildRequires: kf5-kwayland kf5-kwayland-devel
BuildRequires: ukui-interface
Requires: parchives, peony-open-terminal, peony-extension-computer-view, peony-set-wallpaper, peony-send-to-device
Requires: samba-usershares
Recommends: peony-share, peony-device-rename
Requires: samba-common-tools
Requires: samba
Requires: engrampa
Requires: mate-terminal
Requires: libpeony3
Requires: qt5-qtimageformats
Requires: polkit
%description
Peony is the official file manager for the UKUI desktop. This
package adds extended functionality to the Peony file manager.
%package -n peony-share
Summary: Allows one to quickly share a folder from the Peony file manager
Requires: samba-common-tools samba
%description -n peony-share
The Peony share extension allows you to quickly share a folder from the
Peony file manager without requiring root access. It uses Samba, so your
folders can be accessed by any operating system.
%package -n parchives
Summary: Peony qt plugin for file compress and uncompress
Recommends: engrampa
%description -n parchives
Parchives is an archive manager for the UKUI environment. You can use
this plugin to compress or uncompress file or folder.
.
This package adds extended functionality to the Peony file manager.
%package -n peony-open-terminal
Summary: Peony plugin for opening terminals in arbitrary local paths
Recommends: mate-terminal
%description -n peony-open-terminal
peony-open-terminal is a proof-of-concept Peony extension
which allows you to open a terminal in arbitrary local folders.
%package -n peony-extension-computer-view
Summary: Peony plugin for displaying computer:/// with more information
%description -n peony-extension-computer-view
peony-extionsion-computer-view is a proof-of-concept Peony extension
which allows user browsering computer:/// with more information, which
not provided in icon view and list view.
%package -n peony-set-wallpaper
Summary: Peony plugin for right click a picture to set as wallpaper
Requires: qt5-qtimageformats
%description -n peony-set-wallpaper
In addition to set wallpaper in ukui-control-center, you can select a
picture and right click to quickly set as wallpaper.
%package -n peony-bluetooth
Summary: Peony plugin for right click a file to send to other devices via Bluetooth
Recommends: ukui-bluetooth
%description -n peony-bluetooth
In addition to sending files in ukui-bluetooth, you can also choose one
File, then right-click to quickly send the file.
%package -n peony-send-to-device
Summary: Peony plugin for right click a file to send to mobile devices
%description -n peony-send-to-device
In addition to copy files to mobile device, you can also choose one
File, then right-click to quickly send the file.
%package -n peony-device-rename
Summary: Peony plugin for select a block device and rename it. This package adds extended functionality to the Peony file manager.
%description -n peony-device-rename
In this way, we can right click the device and quickly rename it, no need
to rename it use other tools like gparted.
%prep
%setup -q
%patch01 -p1
%patch02 -p1
%patch03 -p1
#%patch0 -p1
%build
export PATH=%{_qt5_bindir}:$PATH
@ -129,54 +58,16 @@ popd
rm -rf $RPM_BUILD_ROOT
%post
systemctl enable smb &> /dev/null ||:
%preun
%files
%doc debian/control debian/copyright
%license COPYING
%files -n peony-share
%{_libdir}/peony-extensions/libpeony-share.so
%{_prefix}/share/polkit-1/actions
#%doc debian/copyright debian/changelog
%{_libdir}/peony-extensions
%{_prefix}/share/
%{_bindir}/peony-share.sh
%files -n parchives
%{_libdir}/peony-extensions/libpeony-engrampa-menu-plugin.so
%files -n peony-open-terminal
%{_libdir}/peony-extensions/libpeony-menu-plugin-mate-terminal.so
%files -n peony-extension-computer-view
%{_libdir}/peony-extensions/libpeony-computer-view-plugin.so
%files -n peony-set-wallpaper
%{_libdir}/peony-extensions/libpeony-set-wallpaper.so
%files -n peony-bluetooth
%{_libdir}/peony-extensions/libpeony-bluetooth-plugin.so
%files -n peony-send-to-device
%{_libdir}/peony-extensions/libpeony-send-to-device.so
%files -n peony-device-rename
%{_libdir}/peony-extensions/libpeony-drive-rename.so
%changelog
* Wed Apr 24 2024 houhongxun <houhongxun@kylinos.cn> - 3.10.0-6
- replace some deprecated functions to recommended ones
* Sat Jun 17 2023 huayadong <huayadong@kylinos.cn> - 3.10.0-5
- remove Recommends: ukui-bluetooth
* Tue Jun 06 2023 peijiankang <peijiankang@kylinos.cn> - 3.10.0-4
- fix share error of peony-extensions
* Wed Feb 08 2023 peijiankang <peijiankang@kylinos.cn> - 3.10.0-3
- sync packaging format
* Tue Feb 07 2023 tanyulong <tanyulong@kylinos.cn> - 3.10.0-2
- Enable debuginfo for fix strip
* Mon Nov 14 2022 tanyulong <tanyulong@kylinos.cn> - 3.10.0-1
- update to upstream version 3.10.0