Hello community,

here is the log from the commit of package plasma5-pk-updates for 
openSUSE:Factory checked in at 2017-01-31 12:14:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/plasma5-pk-updates (Old)
 and      /work/SRC/openSUSE:Factory/.plasma5-pk-updates.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "plasma5-pk-updates"

Changes:
--------
--- /work/SRC/openSUSE:Factory/plasma5-pk-updates/plasma5-pk-updates.changes    
2016-09-30 15:20:48.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.plasma5-pk-updates.new/plasma5-pk-updates.changes   
    2017-02-03 18:56:09.835932415 +0100
@@ -1,0 +2,7 @@
+Thu Jan 19 18:19:13 UTC 2017 - [email protected]
+
+- Add upstream commits:
+  * 0001-Add-notification-about-required-restart-logout.patch
+  * 0002-Remove-Plasma-PopupApplet-from-desktop-file.patch
+
+-------------------------------------------------------------------

New:
----
  0001-Add-notification-about-required-restart-logout.patch
  0002-Remove-Plasma-PopupApplet-from-desktop-file.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ plasma5-pk-updates.spec ++++++
--- /var/tmp/diff_new_pack.iyvIKq/_old  2017-02-03 18:56:10.387854910 +0100
+++ /var/tmp/diff_new_pack.iyvIKq/_new  2017-02-03 18:56:10.391854348 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package plasma5-pk-updates
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -36,6 +36,10 @@
 Patch4:         fix-typo-in-icon-name.patch
 # PATCH-FIX-UPSTREAM add-desktopfile-translations.patch -- add translations to 
the .desktop file
 Patch5:         add-desktopfile-translations.patch
+# PATCH-FIX-UPSTREAM 0001-Add-notification-about-required-restart-logout.patch 
-- Add notification about required restart/logout
+Patch6:         0001-Add-notification-about-required-restart-logout.patch
+# PATCH-FIX-UPSTREAM 0002-Remove-Plasma-PopupApplet-from-desktop-file.patch -- 
Remove Plasma/PopupApplet from desktop file
+Patch7:         0002-Remove-Plasma-PopupApplet-from-desktop-file.patch
 BuildRequires:  PackageKit-Qt5-devel
 BuildRequires:  cmake >= 3.0
 BuildRequires:  extra-cmake-modules >= 1.3.0
@@ -71,6 +75,8 @@
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
+%patch7 -p1
 echo "ki18n_install(po)" >> CMakeLists.txt
 
 %build

++++++ 0001-Add-notification-about-required-restart-logout.patch ++++++
>From 7b66ed081d5cb93f654d919a17b73990ef1a6cd0 Mon Sep 17 00:00:00 2001
From: Jan Grulich <[email protected]>
Date: Tue, 20 Sep 2016 14:34:03 +0200
Subject: [PATCH 1/3] Add notification about required restart/logout

BUG:359468
---
 src/declarative/pkupdates.cpp | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

Index: plasma-pk-updates-0.2/src/declarative/pkupdates.cpp
===================================================================
--- plasma-pk-updates-0.2.orig/src/declarative/pkupdates.cpp
+++ plasma-pk-updates-0.2/src/declarative/pkupdates.cpp
@@ -22,6 +22,7 @@
 #include <QDebug>
 #include <QTimer>
 #include <QDBusReply>
+#include <QDBusInterface>
 #include <QIcon>
 
 #include <KLocalizedString>
@@ -403,6 +404,31 @@ void PkUpdates::onErrorCode(PackageKit::
 
 void PkUpdates::onRequireRestart(PackageKit::Transaction::Restart type, const 
QString &packageID)
 {
+    if (type == PackageKit::Transaction::RestartSystem || type == 
PackageKit::Transaction::RestartSession) {
+        KNotification *notification = new 
KNotification(QLatin1String("notification"), KNotification::Persistent);
+        
notification->setPixmap(KIconLoader::global()->loadIcon("system-software-update",
 KIconLoader::Desktop));
+        if (type == PackageKit::Transaction::RestartSystem) {
+            notification->setActions(QStringList{QLatin1String("Restart")});
+            notification->setTitle(i18n("Restart is required"));
+            notification->setText(i18n("The computer will have to be restarted 
after the update for the changes to take effect."));
+        } else {
+            notification->setActions(QStringList{QLatin1String("Logout")});
+            notification->setTitle(i18n("Session restart is required"));
+            notification->setText(i18n("You will need to log out and back in 
after the update for the changes to take effect."));
+        }
+
+        connect(notification, &KNotification::action1Activated, this, [type] 
() {
+            QDBusInterface interface("org.kde.ksmserver", "/KSMServer", 
"org.kde.KSMServerInterface", QDBusConnection::sessionBus());
+            if (type == PackageKit::Transaction::RestartSystem) {
+                interface.asyncCall("logout", 0, 1, 2); // Options: do not ask 
again | reboot | force
+            } else {
+                interface.asyncCall("logout", 0, 0, 2); // Options: do not ask 
again | logout | force
+            }
+        });
+
+        notification->sendEvent();
+    }
+
     qDebug() << "RESTART" << 
PackageKit::Daemon::enumToString<PackageKit::Transaction>((int)type, "Restart")
              << "is required for package" << packageID;
 }
++++++ 0002-Remove-Plasma-PopupApplet-from-desktop-file.patch ++++++
>From 3c53b1b8436929a03c434476c8efab879d5e7a75 Mon Sep 17 00:00:00 2001
From: Luca Beltrame <[email protected]>
Date: Tue, 20 Dec 2016 23:03:12 +0100
Subject: [PATCH 2/3] Remove Plasma/PopupApplet from desktop file

This is no longer offered as a service type, so it breaks AppStream
data generation.

If this is not the right solution, please revert.
---
 src/plasma/metadata.desktop.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plasma/metadata.desktop.cmake 
b/src/plasma/metadata.desktop.cmake
index 6c415ef..7951830 100644
--- a/src/plasma/metadata.desktop.cmake
+++ b/src/plasma/metadata.desktop.cmake
@@ -49,7 +49,7 @@ Comment[zh_CN]=获取软件更新
 
 Icon=system-software-update
 Type=Service
-X-KDE-ServiceTypes=Plasma/Applet,Plasma/PopupApplet
+X-KDE-ServiceTypes=Plasma/Applet
 
 X-Plasma-API=declarativeappletscript
 X-Plasma-MainScript=ui/main.qml
-- 
2.11.0


Reply via email to