author | llornkcor <llornkcor> | 2002-04-17 03:19:16 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-04-17 03:19:16 (UTC) |
commit | 530f334d28c6156c4a50ba072b6d638a507c9686 (patch) (side-by-side diff) | |
tree | e364ab2ccce7c4c4e76cbdba1629ccf5d07e1a80 /core/settings/light-and-power/light.cpp | |
parent | 2d9c872bd5ae7eb5c42a7e9954cec793db0ea729 (diff) | |
download | opie-530f334d28c6156c4a50ba072b6d638a507c9686.zip opie-530f334d28c6156c4a50ba072b6d638a507c9686.tar.gz opie-530f334d28c6156c4a50ba072b6d638a507c9686.tar.bz2 |
LCD only off on suspend patch
Diffstat (limited to 'core/settings/light-and-power/light.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/settings/light-and-power/light.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp index 24e1fab..960a165 100644 --- a/core/settings/light-and-power/light.cpp +++ b/core/settings/light-and-power/light.cpp @@ -59,24 +59,25 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags fl ) int interval; interval = config.readNumEntry( "Interval_Dim", 30 ); interval_dim->setValue( interval ); interval = config.readNumEntry( "Interval_LightOff", 20 ); interval_lightoff->setValue( interval ); interval = config.readNumEntry( "Interval", 60 ); if ( interval > 3600 ) interval /= 1000; // compatibility (was millisecs) interval_suspend->setValue( interval ); screensaver_dim->setChecked( config.readNumEntry("Dim",1) != 0 ); screensaver_lightoff->setChecked( config.readNumEntry("LightOff",1) != 0 ); + LcdOffOnly->setChecked( config.readNumEntry("LcdOffOnly",0) != 0 ); int maxbright = qpe_sysBrightnessSteps(); initbright = config.readNumEntry("Brightness",255); brightness->setMaxValue( maxbright ); brightness->setTickInterval( QMAX(1,maxbright/16) ); brightness->setLineStep( QMAX(1,maxbright/16) ); brightness->setPageStep( QMAX(1,maxbright/16) ); brightness->setValue( (maxbright*255 - initbright*maxbright)/255 ); connect(brightness, SIGNAL(valueChanged(int)), this, SLOT(applyBrightness())); } LightSettings::~LightSettings() @@ -104,24 +105,25 @@ void LightSettings::accept() applyBrightness(); int i_dim = (screensaver_dim->isChecked() ? interval_dim->value() : 0); int i_lightoff = (screensaver_lightoff->isChecked() ? interval_lightoff->value() : 0); int i_suspend = interval_suspend->value(); QCopEnvelope e("QPE/System", "setScreenSaverIntervals(int,int,int)" ); e << i_dim << i_lightoff << i_suspend; Config config( "qpe" ); config.setGroup( "Screensaver" ); config.writeEntry( "Dim", (int)screensaver_dim->isChecked() ); config.writeEntry( "LightOff", (int)screensaver_lightoff->isChecked() ); + config.writeEntry( "LcdOffOnly", (int)LcdOffOnly->isChecked() ); config.writeEntry( "Interval_Dim", interval_dim->value() ); config.writeEntry( "Interval_LightOff", interval_lightoff->value() ); config.writeEntry( "Interval", interval_suspend->value() ); config.writeEntry( "Brightness", (brightness->maxValue()-brightness->value())*255/brightness->maxValue() ); config.write(); QDialog::accept(); } void LightSettings::applyBrightness() { |