diff --git a/0001-fix-poweroff.patch b/0001-fix-poweroff.patch deleted file mode 100644 index f6d5df8..0000000 --- a/0001-fix-poweroff.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 6e6f2d46c03b255062c8fdb6f64f0e587445a6ef Mon Sep 17 00:00:00 2001 -From: myshow <296570182@qq.com> -Date: Thu, 3 Dec 2020 11:05:51 +0800 -Subject: [PATCH] fix-poweroff - ---- - ukui-session/sessiondbusadaptor.h | 27 +++++++++++++++++++++++---- - 1 file changed, 23 insertions(+), 4 deletions(-) - -diff --git a/ukui-session/sessiondbusadaptor.h b/ukui-session/sessiondbusadaptor.h -index c005702..4da2b55 100644 ---- a/ukui-session/sessiondbusadaptor.h -+++ b/ukui-session/sessiondbusadaptor.h -@@ -21,6 +21,7 @@ - #define SESSIONDBUSADAPTOR_H - - #include -+#include - #include "../tools/ukuipower.h" - #include "modulemanager.h" - -@@ -54,7 +55,16 @@ public slots: - - bool canPowerOff() - { -- return mPower->canAction(UkuiPower::PowerShutdown); -+ QProcess p; -+ p.start("bash", QStringList() <<"-c" << "who | wc -l"); -+ p.waitForFinished(); -+ QString ret = p.readAllStandardOutput(); -+ int user = ret.toInt(); -+ if (user > 1) -+ return false; -+ else -+ return true; -+ // return mPower->canAction(UkuiPower::PowerShutdown); - } - - Q_NOREPLY void logout() -@@ -74,10 +84,19 @@ public slots: - Q_NOREPLY void powerOff() - { - if(mPower->canAction(UkuiPower::PowerShutdown)){ -- mManager->logout(false); -- mPower->doAction(UkuiPower::PowerShutdown); -+ // mManager->logout(false); -+ // mPower->doAction(UkuiPower::PowerShutdown); -+ QProcess::execute("shutdown -h now"); -+ // QProcess::execute("poweroff"); -+ } -+ else { -+ //弹框提示无法生效? -+ QMessageBox msg; -+ msg.setWindowTitle(tr("Error")); -+ msg.setText(tr("The computer could not be shut down!")); -+ msg.addButton(tr("Ok"), QMessageBox::AcceptRole); -+ msg.exec(); - } -- //QCoreApplication::exit(0); - } - - // QDBusVariant listModules() --- -2.29.2.windows.2 - diff --git a/ukui-session-manager-3.0.2.tar.gz b/ukui-session-manager-3.0.2.tar.gz deleted file mode 100644 index 30aa7ab..0000000 Binary files a/ukui-session-manager-3.0.2.tar.gz and /dev/null differ diff --git a/ukui-session-manager-3.0.6.tar.gz b/ukui-session-manager-3.0.6.tar.gz new file mode 100644 index 0000000..c5a4cc2 Binary files /dev/null and b/ukui-session-manager-3.0.6.tar.gz differ diff --git a/ukui-session-manager.spec b/ukui-session-manager.spec index 4bbf137..3d91834 100644 --- a/ukui-session-manager.spec +++ b/ukui-session-manager.spec @@ -1,8 +1,8 @@ %define debug_package %{nil} Name: ukui-session-manager -Version: 3.0.2 -Release: 2 +Version: 3.0.6 +Release: 1 Summary: Session manager of the UKUI desktop environment License: LGPL-2.1+ GPL-3+ URL: http://www.ukui.org @@ -22,7 +22,6 @@ Recommends: ukui-settings-daemon Provides: x-session-manager -patch0: 0001-fix-poweroff.patch %description This package contains a session that can be started from a display @@ -32,7 +31,6 @@ patch0: 0001-fix-poweroff.patch %prep %setup -q -%patch0 -p1 %build mkdir cmake-build @@ -66,6 +64,9 @@ rm -rf $RPM_BUILD_ROOT #%%{_datadir}/man/man1/ukui-session-tools.1.gz %changelog +* Mon Oct 26 2020 huayadong - 3.0.6-1 +- update to upstream version 3.0.6-1 + * Thu Dec 3 2020 lvhan - 3.0.2-2 - fix poweroff