Compare commits

..

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
7cd0c8a483
!40 repace some deprecated functions to recommended ones
From: @hou-hongxun 
Reviewed-by: @peijiankang 
Signed-off-by: @peijiankang
2024-05-08 06:18:35 +00:00
侯红勋
bda6e14c30 repace some deprecated functions to recommended ones
Signed-off-by: 侯红勋 <houhongxun@kylinos.cn>
2024-04-24 09:55:40 +08:00
openeuler-ci-bot
0cec992765
!37 remove Recommends: ukui-bluetooth
From: @hua_yadong 
Reviewed-by: @peijiankang 
Signed-off-by: @peijiankang
2023-07-21 02:18:14 +00:00
huayadong
72ca10db6a remove Recommends: ukui-bluetooth 2023-07-20 15:38:22 +08:00
openeuler-ci-bot
a067f1ab83
!34 fix share error of peony-extensions
From: @peijiankang 
Reviewed-by: @hua_yadong 
Signed-off-by: @hua_yadong
2023-06-08 13:03:36 +00:00
peijiankang
b5828d179b fix share error peony-extensions 2023-06-08 09:54:18 +08:00
openeuler-ci-bot
92a38c321c
!29 sync packaging format
From: @peijiankang 
Reviewed-by: @dou33 
Signed-off-by: @dou33
2023-02-08 09:11:33 +00:00
peijiankang
8eff4e47ee sync packaging format 2023-02-08 14:04:47 +08:00
openeuler-ci-bot
81d8e9c7f8
!28 Enable debuginfo for fix stri
From: @tanyulong2021 
Reviewed-by: @peijiankang 
Signed-off-by: @peijiankang
2023-02-08 01:26:26 +00:00
tanyulong2021
234358ef5a Enable debuginfo for fix strip 2023-02-07 14:09:57 +08:00
4 changed files with 347 additions and 23 deletions

View File

@ -0,0 +1,28 @@
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

@ -0,0 +1,57 @@
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

@ -0,0 +1,130 @@
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,44 +1,115 @@
%define debug_package %{nil}
Name: peony-extensions
Version: 3.10.0
Release: 1
Summary: Peony qt extensions (common files)
Release: 6
Summary: adds extended functionality to the Peony file manager.
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: libpeony-dev
#BuildRequires: libpeony3
BuildRequires: peony
BuildRequires: poppler-qt5-devel
BuildRequires: libpeony-dev
BuildRequires: peony
BuildRequires: gsettings-qt-devel
BuildRequires: libudisks2-devel
BuildRequires: libnotify-devel
BuildRequires: kf5-kwayland kf5-kwayland-devel
BuildRequires: ukui-interface
Requires: samba-common-tools
Requires: samba
Requires: engrampa
Requires: mate-terminal
Requires: libpeony3
Requires: qt5-qtimageformats
Requires: polkit
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
%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
#%patch0 -p1
%patch01 -p1
%patch02 -p1
%patch03 -p1
%build
export PATH=%{_qt5_bindir}:$PATH
@ -58,16 +129,54 @@ popd
rm -rf $RPM_BUILD_ROOT
%post
%preun
systemctl enable smb &> /dev/null ||:
%files
#%doc debian/copyright debian/changelog
%{_libdir}/peony-extensions
%{_prefix}/share/
%doc debian/control debian/copyright
%license COPYING
%files -n peony-share
%{_libdir}/peony-extensions/libpeony-share.so
%{_prefix}/share/polkit-1/actions
%{_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