rpms/kdebase-workspace/F-12 kdebase-workspace-4.3.4-solid_hal_0_5_14.patch, NONE, 1.1 kdebase-workspace.spec, 1.313, 1.314

Rex Dieter rdieter at fedoraproject.org
Mon Dec 14 15:28:55 UTC 2009


Author: rdieter

Update of /cvs/pkgs/rpms/kdebase-workspace/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv6335

Modified Files:
	kdebase-workspace.spec 
Added Files:
	kdebase-workspace-4.3.4-solid_hal_0_5_14.patch 
Log Message:
* Mon Dec 14 2009 Rex Dieter <rdieter at fedoraproject.org> 4.3.4-3
- hal-0.5.14-1 and failures with brightness controls (#545258)


kdebase-workspace-4.3.4-solid_hal_0_5_14.patch:
 libs/solid/control/powermanager.cpp |    2 +-
 solid/hal/halpower.cpp              |   14 ++++++++------
 2 files changed, 9 insertions(+), 7 deletions(-)

--- NEW FILE kdebase-workspace-4.3.4-solid_hal_0_5_14.patch ---
diff -up kdebase-workspace-4.3.4/libs/solid/control/powermanager.cpp.hal kdebase-workspace-4.3.4/libs/solid/control/powermanager.cpp
--- kdebase-workspace-4.3.4/libs/solid/control/powermanager.cpp.hal	2009-12-14 08:49:30.623026679 -0600
+++ kdebase-workspace-4.3.4/libs/solid/control/powermanager.cpp	2009-12-14 08:50:50.842767523 -0600
@@ -203,7 +203,7 @@ float Solid::Control::PowerManager::brig
         else
         {
             return_SOLID_CALL(Ifaces::PowerManager *, globalPowerManager->managerBackend(),
-                      false, brightness(controls.keys().at(0)));
+                      false, brightness(controls.keys(Solid::Control::PowerManager::Screen).at(0)));
         }
     }
     else
diff -up kdebase-workspace-4.3.4/solid/hal/halpower.cpp.hal kdebase-workspace-4.3.4/solid/hal/halpower.cpp
--- kdebase-workspace-4.3.4/solid/hal/halpower.cpp.hal	2009-02-26 03:12:20.000000000 -0600
+++ kdebase-workspace-4.3.4/solid/hal/halpower.cpp	2009-12-14 08:56:30.768778165 -0600
@@ -378,15 +378,17 @@ float HalPower::brightness(const QString
     if(m_halManager.call("FindDeviceByCapability", "laptop_panel").arguments().at(0).toStringList().contains(device))
     {
         QDBusInterface deviceInterface("org.freedesktop.Hal", device, "org.freedesktop.Hal.Device.LaptopPanel", QDBusConnection::systemBus());
-        brightness = deviceInterface.call("GetBrightness").arguments().at(0).toDouble();
-        if(deviceInterface.lastError().isValid())
+        QDBusReply<int> brightnessReply = deviceInterface.call("GetBrightness");
+        if(!brightnessReply.isValid())
         {
-            return 0;
+            return 0.0;
         }
-        else
+        brightness = brightnessReply;
+        QDBusInterface propertyInterface("org.freedesktop.Hal", device, "org.freedesktop.Hal.Device", QDBusConnection::systemBus());
+        QDBusReply<int> levelsReply = propertyInterface.call("GetProperty", "laptop_panel.num_levels");
+        if (levelsReply.isValid())
         {
-            QDBusInterface propertyInterface("org.freedesktop.Hal", device, "org.freedesktop.Hal.Device", QDBusConnection::systemBus());
-            int levels = propertyInterface.call("GetProperty", "laptop_panel.num_levels").arguments().at(0).toInt();
+            int levels = levelsReply;
             return (float)(100*(brightness/(levels-1)));
         }
     }


Index: kdebase-workspace.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kdebase-workspace/F-12/kdebase-workspace.spec,v
retrieving revision 1.313
retrieving revision 1.314
diff -u -p -r1.313 -r1.314
--- kdebase-workspace.spec	6 Dec 2009 20:13:24 -0000	1.313
+++ kdebase-workspace.spec	14 Dec 2009 15:28:55 -0000	1.314
@@ -7,7 +7,7 @@
 Summary: K Desktop Environment - Workspace
 Name: kdebase-workspace
 Version: 4.3.4
-Release: 2%{?dist}
+Release: 3%{?dist}
 
 Source0: ftp://ftp.kde.org/pub/kde/stable/%{version}/src/kdebase-workspace-%{version}.tar.bz2
 License: GPLv2
@@ -42,6 +42,8 @@ Patch18: kdebase-workspace-4.3.3-kdm_ply
 Patch50: kdebase-workspace-4.3.3-kde#171685.patch
 # kubuntu working to upstream this
 Patch51: http://bazaar.launchpad.net/~kubuntu-members/kdebase-workspace/ubuntu/download/head:/kubuntu_101_brightne-20091019223214-s1uoamqahgp3uee7-1/kubuntu_101_brightness_fn_keys_and_osd.diff
+# fixups for hal-0.5.14 compat
+Patch52: kdebase-workspace-4.3.4-solid_hal_0_5_14.patch
 # 4.3 branch
 
 # trunk
@@ -280,6 +282,7 @@ Requires: akonadi
 # upstream patches
 %patch50 -p1 -b .kde#171685
 %patch51 -p1 -b .brightness_keys
+%patch52 -p1 -b .solid_hal_0_5_14
 
 
 %build
@@ -614,6 +617,9 @@ fi
 
 
 %changelog
+* Mon Dec 14 2009 Rex Dieter <rdieter at fedoraproject.org> 4.3.4-3
+- hal-0.5.14-1 and failures with brightness controls (#545258)
+
 * Sun Dec 06 2009 Than Ngo <than at redhat.com> - 4.3.4-2
 - fix conditional for RHEL
 




More information about the scm-commits mailing list