summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-10-23 22:00:05 (UTC)
committer harlekin <harlekin>2002-10-23 22:00:05 (UTC)
commitf5ee7b6584fe8c6e03494a241e30854cd658bb71 (patch) (side-by-side diff)
tree4b0a8769cc8fc82813802f75316f24a069489431
parent3c9835537b2fdccab4c0f720a4d77a98ad8bba10 (diff)
downloadopie-f5ee7b6584fe8c6e03494a241e30854cd658bb71.zip
opie-f5ee7b6584fe8c6e03494a241e30854cd658bb71.tar.gz
opie-f5ee7b6584fe8c6e03494a241e30854cd658bb71.tar.bz2
update
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/desktop.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index 33bea36..c4c6050 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -12,25 +12,24 @@
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "desktop.h"
#include "info.h"
#include "launcher.h"
-//#include "mrulist.h"
#include "qcopbridge.h"
#include "shutdownimpl.h"
#include "startmenu.h"
#include "taskbar.h"
#include "transferserver.h"
#include "irserver.h"
#include "packageslave.h"
#include <qpe/applnk.h>
#include <qpe/mimetype.h>
#include <qpe/password.h>
#include <qpe/config.h>
@@ -160,24 +159,25 @@ private:
public:
QPEScreenSaver()
{
m_disable_suspend = 100;
m_enable_dim = false;
m_enable_lightoff = false;
m_enable_onlylcdoff = false;
m_disable_suspend_ac = 100;
m_enable_dim_ac = false;
m_enable_lightoff_ac = false;
m_enable_onlylcdoff_ac = false;
+ m_disable_apm_ac = false;
m_lcd_status = true;
m_backlight_normal = -1;
m_backlight_current = -1;
m_backlight_forcedoff = false;
// Make sure the LCD is in fact on, (if opie was killed while the LCD is off it would still be off)
ODevice::inst ( )-> setDisplayStatus ( true );
setBacklight ( -1 );
}
void restore()
@@ -206,24 +206,28 @@ public:
return true;
break;
case 1:
if ( m_disable_suspend_ac > 1 && m_enable_lightoff_ac && onAC ) {
setBacklightInternal( 0 ); // off
} else if ( m_disable_suspend > 1 && m_enable_lightoff ) {
setBacklightInternal( 0 ); // off
}
return true;
break;
case 2:
+ if ( m_disable_apm_ac && onAC ) {
+ return true;
+ }
+
if ( m_enable_onlylcdoff_ac && onAC ) {
ODevice::inst ( ) -> setDisplayStatus ( false );
m_lcd_status = false;
return true;
}
else if ( m_enable_onlylcdoff ) {
ODevice::inst ( ) -> setDisplayStatus ( false );
m_lcd_status = false;
return true;
}
else // We're going to suspend the whole machine
{
@@ -291,24 +295,25 @@ public:
i2 = ssi( i2, config, "LightOffAC", "Interval_LightOffAC", 20 );
i3 = ssi( i3, config, "", "IntervalAC", 60 );
//qDebug("screen saver intervals: %d %d %d", i1, i2, i3);
v [ 0 ] = QMAX( 1000 * i1, 100 );
v [ 1 ] = QMAX( 1000 * i2, 100 );
v [ 2 ] = QMAX( 1000 * i3, 100 );
v [ 3 ] = 0;
m_enable_dim_ac = ( ( i1 != 0 ) ? config.readNumEntry ( "DimAC", 1 ) : false );
m_enable_lightoff_ac = ( ( i2 != 0 ) ? config.readNumEntry ( "LightOffAC", 1 ) : false );
m_enable_onlylcdoff_ac = config.readNumEntry ( "LcdOffOnlyAC", 0 );
+ m_disable_apm_ac = config.readNumEntry ( "NoApmAC", 0 );
if ( !i1 && !i2 && !i3 )
QWSServer::setScreenSaverInterval( 0 );
else
QWSServer::setScreenSaverIntervals( v );
}
void setInterval ( int interval )
{
setIntervals ( -1, -1, interval );
}
@@ -363,24 +368,25 @@ public:
}
private:
int m_disable_suspend;
bool m_enable_dim;
bool m_enable_lightoff;
bool m_enable_onlylcdoff;
int m_disable_suspend_ac;
bool m_enable_dim_ac;
bool m_enable_lightoff_ac;
bool m_enable_onlylcdoff_ac;
+ bool m_disable_apm_ac;
bool m_lcd_status;
int m_backlight_normal;
int m_backlight_current;
bool m_backlight_forcedoff;
};
void DesktopApplication::switchLCD ( bool on )
{
if ( qApp ) {
DesktopApplication *dapp = (DesktopApplication *) qApp;