[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/workspace/powerdevil/daemon
From:       Dario Freddi <drf () kde ! org>
Date:       2011-01-15 20:40:59
Message-ID: 20110115204059.C1C5BAC8B4 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1214660 by dafre:

BUG: 262486

The DPMS timeouts are in seconds, not milliseconds. This fix unfortunately requires \
editing configuration, luckily we haven't released yet. Users will probably want to \
edit screen turnoff time manually or start back from a new profile set.

 M  +1 -1      actions/dpms/powerdevildpmsaction.cpp  
 M  +2 -2      actions/dpms/powerdevildpmsactionconfig.cpp  
 M  +4 -4      powerdevilprofilegenerator.cpp  


--- trunk/KDE/kdebase/workspace/powerdevil/daemon/actions/dpms/powerdevildpmsaction.cpp \
#1214659:1214660 @@ -107,7 +107,7 @@
     XFlush(dpy);
     XSetErrorHandler(d->defaultHandler);
 
-    DPMSSetTimeouts(dpy, m_idleTime, (int)(m_idleTime * 1.5), m_idleTime * 2);
+    DPMSSetTimeouts(dpy, (CARD16)m_idleTime, (CARD16)(m_idleTime * 1.5), \
(CARD16)(m_idleTime * 2));  
     XFlush(dpy);
     XSetErrorHandler(d->defaultHandler);
--- trunk/KDE/kdebase/workspace/powerdevil/daemon/actions/dpms/powerdevildpmsactionconfig.cpp \
#1214659:1214660 @@ -38,14 +38,14 @@
 
 void PowerDevilDPMSActionConfig::save()
 {
-    configGroup().writeEntry("idleTime", m_spinBox->value() * 60 * 1000);
+    configGroup().writeEntry("idleTime", m_spinBox->value() * 60);
 
     configGroup().sync();
 }
 
 void PowerDevilDPMSActionConfig::load()
 {
-    m_spinBox->setValue((configGroup().readEntry<int>("idleTime", 600000) / 60) / \
1000); +    m_spinBox->setValue(configGroup().readEntry<int>("idleTime", 600000) / \
60);  }
 
 QList< QPair< QString, QWidget* > > PowerDevilDPMSActionConfig::buildUi()
--- trunk/KDE/kdebase/workspace/powerdevil/daemon/powerdevilprofilegenerator.cpp \
#1214659:1214660 @@ -89,7 +89,7 @@
     // And we also want to turn off the screen after another long while
     {
         KConfigGroup dpmsControl(&performance, "DPMSControl");
-        dpmsControl.writeEntry< uint >("idleTime", 3600000);
+        dpmsControl.writeEntry< uint >("idleTime", 3600);
     }
 
     // Assign the profile, of course!
@@ -143,7 +143,7 @@
         // We want to turn off the screen after another while
         {
             KConfigGroup dpmsControl(&powersave, "DPMSControl");
-            dpmsControl.writeEntry< uint >("idleTime", 600000);
+            dpmsControl.writeEntry< uint >("idleTime", 600);
         }
         // Last but not least, we want to suspend after a rather long period of \
                inactivity
         if (methods.contains(Solid::PowerManagement::SuspendState) || \
methods.contains(Solid::PowerManagement::HibernateState)) { @@ -185,7 +185,7 @@
         // We want to turn off the screen after another while
         {
             KConfigGroup dpmsControl(&aggrPowersave, "DPMSControl");
-            dpmsControl.writeEntry< uint >("idleTime", 300000);
+            dpmsControl.writeEntry< uint >("idleTime", 300);
         }
         // Last but not least, we want to suspend after a rather long period of \
                inactivity
         if (methods.contains(Solid::PowerManagement::SuspendState) || \
methods.contains(Solid::PowerManagement::HibernateState)) { @@ -251,7 +251,7 @@
         // DPMS
         if (oldGroup.readEntry< bool >("DPMSEnabled", false) && oldGroup.readEntry< \
int >("DPMSPowerOff", 0) > 0) {  KConfigGroup dpmsControl(&newGroup, "DPMSControl");
-            dpmsControl.writeEntry< uint >("idleTime", oldGroup.readEntry< int \
>("DPMSPowerOff", 30) * 60 * 1000); +            dpmsControl.writeEntry< uint \
> >("idleTime", oldGroup.readEntry< int >("DPMSPowerOff", 30) * 60);
         }
         // Script
         if (!oldGroup.readEntry< QString >("scriptpath", QString()).isEmpty()) {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic