[kde-workspace/f18] notifier_freespace.patch

Rex Dieter rdieter at fedoraproject.org
Fri Feb 1 20:09:30 UTC 2013


commit c166d1b5431760e705aadacf7cd18de3d5438b9e
Author: Rex Dieter <rdieter at math.unl.edu>
Date:   Fri Feb 1 14:09:26 2013 -0600

    notifier_freespace.patch

 kde-workspace-notifier_freespace.patch |   66 ++++++++++++++++++++++++++++++++
 kde-workspace.spec                     |    9 ++++-
 2 files changed, 74 insertions(+), 1 deletions(-)
---
diff --git a/kde-workspace-notifier_freespace.patch b/kde-workspace-notifier_freespace.patch
new file mode 100644
index 0000000..8f7e826
--- /dev/null
+++ b/kde-workspace-notifier_freespace.patch
@@ -0,0 +1,66 @@
+diff --git a/plasma/generic/dataengines/soliddevice/soliddeviceengine.cpp b/plasma/generic/dataengines/soliddevice/soliddeviceengine.cpp
+index d186843..4c2d356 100644
+--- a/plasma/generic/dataengines/soliddevice/soliddeviceengine.cpp
++++ b/plasma/generic/dataengines/soliddevice/soliddeviceengine.cpp
+@@ -166,7 +166,7 @@ bool SolidDeviceEngine::populateDeviceData(const QString &name)
+ 
+         if (storageaccess->isAccessible()) {
+             QVariant freeDiskVar;
+-            qlonglong freeDisk = freeDiskSpace(storageaccess->filePath());
++            qulonglong freeDisk = freeDiskSpace(storageaccess->filePath());
+             if ( freeDisk != -1 ) {
+                 freeDiskVar.setValue( freeDisk );
+             }
+@@ -321,7 +321,6 @@ bool SolidDeviceEngine::populateDeviceData(const QString &name)
+             //TODO: compress the calls?
+             forceUpdateAccessibility(containerUdi);
+         }
+-
+     }
+     if (device.is<Solid::OpticalDisc>()) {
+         Solid::OpticalDisc *opticaldisc = device.as<Solid::OpticalDisc>();
+@@ -577,7 +576,13 @@ void SolidDeviceEngine::deviceAdded(const QString& udi)
+     }
+     else if (device.is<Solid::StorageVolume>()) {
+         Solid::StorageAccess *access = device.as<Solid::StorageAccess>();
++        Solid::StorageVolume *volume = device.as<Solid::StorageVolume>();
+         if (access) {
++            // update the volume size in case of 2-stage devices
++            if (m_devicemap.contains(udi) && query(udi).value(I18N_NOOP("Size")).toULongLong() == 0) {
++                setData(udi, I18N_NOOP("Size"), volume->size());
++            }
++
+             connect(access, SIGNAL(setupRequested(const QString&)),
+                     this, SLOT(setMountingState(const QString&)));
+             connect(access, SIGNAL(setupDone(Solid::ErrorType,QVariant,QString)),
+@@ -625,7 +630,7 @@ void SolidDeviceEngine::setIdleState(Solid::ErrorType error, QVariant errorData,
+     setData(udi, I18N_NOOP("File Path"), storageaccess->filePath());
+ }
+ 
+-qlonglong SolidDeviceEngine::freeDiskSpace(const QString &mountPoint)
++qulonglong SolidDeviceEngine::freeDiskSpace(const QString &mountPoint)
+ {
+     KDiskFreeSpaceInfo info = KDiskFreeSpaceInfo::freeSpaceInfo(mountPoint);
+     if (info.isValid()) {
+@@ -650,7 +655,7 @@ bool SolidDeviceEngine::updateFreeSpace(const QString &udi)
+     }
+ 
+     QVariant freeSpaceVar;
+-    qlonglong freeSpace = freeDiskSpace(storageaccess->filePath());
++    qulonglong freeSpace = freeDiskSpace(storageaccess->filePath());
+     if (freeSpace != -1) {
+         freeSpaceVar.setValue( freeSpace );
+     }
+diff --git a/plasma/generic/dataengines/soliddevice/soliddeviceengine.h b/plasma/generic/dataengines/soliddevice/soliddeviceengine.h
+index 3678c02..ba62f8e 100644
+--- a/plasma/generic/dataengines/soliddevice/soliddeviceengine.h
++++ b/plasma/generic/dataengines/soliddevice/soliddeviceengine.h
+@@ -67,7 +67,7 @@ protected:
+ 
+ private:
+     bool populateDeviceData(const QString &name);
+-    qlonglong freeDiskSpace(const QString &mountPoint);
++    qulonglong freeDiskSpace(const QString &mountPoint);
+     bool updateFreeSpace(const QString &udi);
+     bool updateHardDiskTemperature(const QString &udi);
+     bool updateEmblems(const QString &udi);
diff --git a/kde-workspace.spec b/kde-workspace.spec
index 8d405ca..57e4f50 100644
--- a/kde-workspace.spec
+++ b/kde-workspace.spec
@@ -11,7 +11,7 @@
 Summary: KDE Workspace
 Name:    kde-workspace
 Version: 4.9.5
-Release: 4%{?dist}
+Release: 5%{?dist}
 
 License: GPLv2
 URL:     https://projects.kde.org/projects/kde/kde-workspace
@@ -106,6 +106,9 @@ Patch53: kde-workspace-4.7.95-kdm_xauth.patch
 # https://git.reviewboard.kde.org/r/108407/
 Patch54: kde-workspace-4.9.97-powerdevil_systemd_login1.patch
 
+# fix notifier/freespace (notably for 2-stage devices, like phones)
+Patch55: kde-workspace-notifier_freespace.patch
+
 # pam/systemd bogosity: kdm restart/shutdown does not work 
 # http://bugzilla.redhat.com/796969
 Patch57: kde-workspace-4.8.0-bug796969.patch
@@ -449,6 +452,7 @@ Requires: akonadi
 %patch52 -p1 -b .bz#732830-login
 %patch53 -p1 -b .kdm_xauth
 %patch54 -p1 -b .powerdevil_systemd_login1
+%patch55 -p1 -b .notifier_freespace
 %patch57 -p1 -b .bug796969
 %patch62 -p0 -b .systemd-displaymanager
 
@@ -1001,6 +1005,9 @@ fi
 
 
 %changelog
+* Fri Feb 01 2013 Rex Dieter <rdieter at fedoraproject.org> 4.9.5-5
+- notifier_freespace.patch
+
 * Mon Jan 28 2013 Rex Dieter <rdieter at fedoraproject.org> 4.9.5-4
 - revert kded_randrmonitor subpkg
 


More information about the scm-commits mailing list