[kde-workspace] #1005133: fix application specific icons (kdebz#324574)

Lukas Tinkl ltinkl at fedoraproject.org
Mon Sep 9 13:20:01 UTC 2013


commit da98b4d2b583dec127ec04af43a86c7b47ca0d40
Author: Lukáš Tinkl <lukas at kde.org>
Date:   Mon Sep 9 15:19:47 2013 +0200

    #1005133:  fix application specific icons (kdebz#324574)
    
    - fix shutdown vs logout messup (kdebz#307288)

 kde-workspace-4.11.2-logout-shutdown.patch |   48 ++++++++++++++++++++++++++++
 kde-workspace-4.11.2-usable-icons.patch    |   37 +++++++++++++++++++++
 kde-workspace.spec                         |   10 +++++-
 3 files changed, 94 insertions(+), 1 deletions(-)
---
diff --git a/kde-workspace-4.11.2-logout-shutdown.patch b/kde-workspace-4.11.2-logout-shutdown.patch
new file mode 100644
index 0000000..7450a53
--- /dev/null
+++ b/kde-workspace-4.11.2-logout-shutdown.patch
@@ -0,0 +1,48 @@
+commit fdc4aa9c298004ccd397fd2b451065d52cbf1ee0
+Author: Alex Levkovich <alevkovich at tut.by>
+Date:   Sun Sep 1 02:23:11 2013 -0400
+
+    Fix shutdown on critical battery level
+    
+    powerdevil kcontrol and daemon doesn't use consistent value for
+    action, make them both use same enumeration is more desirable than
+    plain number.
+    
+    BUG: 307288
+    FIXED-IN: 4.11.2
+    Reviewed By Weng Xuetian
+
+diff --git a/powerdevil/daemon/powerdevilcore.cpp b/powerdevil/daemon/powerdevilcore.cpp
+index 7e2f517..08cc827 100644
+--- a/powerdevil/daemon/powerdevilcore.cpp
++++ b/powerdevil/daemon/powerdevilcore.cpp
+@@ -28,6 +28,8 @@
+ #include "powerdevilpolicyagent.h"
+ #include "powerdevilprofilegenerator.h"
+ 
++#include "daemon/actions/bundled/suspendsession.h"
++
+ #include <Solid/Battery>
+ #include <Solid/Device>
+ #include <Solid/DeviceNotifier>
+@@ -505,17 +507,17 @@ bool Core::emitBatteryChargePercentNotification(int currentPercent, int previous
+     if (currentPercent <= PowerDevilSettings::batteryCriticalLevel() &&
+         previousPercent > PowerDevilSettings::batteryCriticalLevel()) {
+         switch (PowerDevilSettings::batteryCriticalAction()) {
+-        case 3:
++        case PowerDevil::BundledActions::SuspendSession::ShutdownMode:
+             emitRichNotification("criticalbattery", i18n("Battery Critical (%1% Remaining)", currentPercent),
+                              i18n("Your battery level is critical, the computer will be halted in 30 seconds."));
+             m_criticalBatteryTimer->start();
+             break;
+-        case 2:
++        case PowerDevil::BundledActions::SuspendSession::ToDiskMode:
+             emitRichNotification("criticalbattery", i18n("Battery Critical (%1% Remaining)", currentPercent),
+                              i18n("Your battery level is critical, the computer will be hibernated in 30 seconds."));
+             m_criticalBatteryTimer->start();
+             break;
+-        case 1:
++        case PowerDevil::BundledActions::SuspendSession::ToRamMode:
+             emitRichNotification("criticalbattery", i18n("Battery Critical (%1% Remaining)", currentPercent),
+                              i18n("Your battery level is critical, the computer will be suspended in 30 seconds."));
+             m_criticalBatteryTimer->start();
diff --git a/kde-workspace-4.11.2-usable-icons.patch b/kde-workspace-4.11.2-usable-icons.patch
new file mode 100644
index 0000000..0dbdb65
--- /dev/null
+++ b/kde-workspace-4.11.2-usable-icons.patch
@@ -0,0 +1,37 @@
+diff --git a/qguiplatformplugin_kde/qguiplatformplugin_kde.cpp b/qguiplatformplugin_kde/qguiplatformplugin_kde.cpp
+index ce22622..f4a8e17 100644
+--- a/qguiplatformplugin_kde/qguiplatformplugin_kde.cpp
++++ b/qguiplatformplugin_kde/qguiplatformplugin_kde.cpp
+@@ -28,6 +28,7 @@
+ #include <KDE/KFileDialog>
+ #include <KDE/KColorDialog>
+ #include <QtCore/QHash>
++#include <QtCore/QTimer>
+ #include <QtGui/QFileDialog>
+ #include <QtGui/QColorDialog>
+ #include <QtGui/QApplication>
+@@ -153,9 +154,7 @@ class KQGuiPlatformPlugin : public QGuiPlatformPlugin
+ public:
+     KQGuiPlatformPlugin()
+     {
+-        connect(KIconLoader::global(), SIGNAL(iconLoaderSettingsChanged()), this, SLOT(updateToolbarIcons()));
+-        connect(KGlobalSettings::self(), SIGNAL(toolbarAppearanceChanged(int)), this, SLOT(updateToolbarStyle()));
+-        connect(KGlobalSettings::self(), SIGNAL(kdisplayStyleChanged()), this, SLOT(updateWidgetStyle()));
++        QTimer::singleShot(0, this, SLOT(init()));
+     }
+ 
+     virtual QStringList keys() const { return QStringList() << QLatin1String("kde"); }
+@@ -340,6 +339,13 @@ public: // ColorDialog
+     }
+ 
+ private slots:
++    void init()
++    {
++        connect(KIconLoader::global(), SIGNAL(iconLoaderSettingsChanged()), this, SLOT(updateToolbarIcons()));
++        connect(KGlobalSettings::self(), SIGNAL(toolbarAppearanceChanged(int)), this, SLOT(updateToolbarStyle()));
++        connect(KGlobalSettings::self(), SIGNAL(kdisplayStyleChanged()), this, SLOT(updateWidgetStyle()));
++    }
++
+     void updateToolbarStyle()
+     {
+         //from gtksymbol.cpp
diff --git a/kde-workspace.spec b/kde-workspace.spec
index e1f203f..99e7d2e 100644
--- a/kde-workspace.spec
+++ b/kde-workspace.spec
@@ -17,7 +17,7 @@
 Summary: KDE Workspace
 Name:    kde-workspace
 Version: 4.11.1
-Release: 1%{?dist}
+Release: 2%{?dist}
 
 License: GPLv2
 URL:     https://projects.kde.org/projects/kde/kde-workspace
@@ -116,6 +116,8 @@ Patch57: kde-workspace-4.8.0-bug796969.patch
 Patch58: kde-workspace-4.11.0-backlight_actual_brightness.patch
 
 ## upstream patches
+Patch100: kde-workspace-4.11.2-logout-shutdown.patch
+Patch101: kde-workspace-4.11.2-usable-icons.patch
 
 ## plasma active patches
 
@@ -476,6 +478,8 @@ Requires: akonadi
 %patch58 -p1 -b .backlight_actual_brightness
 
 # upstream patches
+%patch100 -p1 -b .logoutshutdown
+%patch102 -p1 -b .usableicons
 
 # Fedora patches
 %if 0%{?fedora} && 0%{?rhel} > 6
@@ -1035,6 +1039,10 @@ fi
 
 
 %changelog
+* Mon Sep 09 2013 Lukáš Tinkl <ltinkl at redhat.com> - 4.11.1-2
+- #1005133:  fix application specific icons (kdebz#324574)
+- fix shutdown vs logout messup (kdebz#307288)
+
 * Tue Sep 03 2013 Rex Dieter <rdieter at fedoraproject.org> - 4.11.1-1
 - 4.11.1
 


More information about the scm-commits mailing list