author | llornkcor <llornkcor> | 2002-04-17 03:19:16 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-04-17 03:19:16 (UTC) |
commit | 530f334d28c6156c4a50ba072b6d638a507c9686 (patch) (unidiff) | |
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) (ignore 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 | |||
@@ -65,12 +65,13 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags fl ) | |||
65 | interval = config.readNumEntry( "Interval", 60 ); | 65 | interval = config.readNumEntry( "Interval", 60 ); |
66 | if ( interval > 3600 ) interval /= 1000; // compatibility (was millisecs) | 66 | if ( interval > 3600 ) interval /= 1000; // compatibility (was millisecs) |
67 | interval_suspend->setValue( interval ); | 67 | interval_suspend->setValue( interval ); |
68 | 68 | ||
69 | screensaver_dim->setChecked( config.readNumEntry("Dim",1) != 0 ); | 69 | screensaver_dim->setChecked( config.readNumEntry("Dim",1) != 0 ); |
70 | screensaver_lightoff->setChecked( config.readNumEntry("LightOff",1) != 0 ); | 70 | screensaver_lightoff->setChecked( config.readNumEntry("LightOff",1) != 0 ); |
71 | LcdOffOnly->setChecked( config.readNumEntry("LcdOffOnly",0) != 0 ); | ||
71 | int maxbright = qpe_sysBrightnessSteps(); | 72 | int maxbright = qpe_sysBrightnessSteps(); |
72 | initbright = config.readNumEntry("Brightness",255); | 73 | initbright = config.readNumEntry("Brightness",255); |
73 | brightness->setMaxValue( maxbright ); | 74 | brightness->setMaxValue( maxbright ); |
74 | brightness->setTickInterval( QMAX(1,maxbright/16) ); | 75 | brightness->setTickInterval( QMAX(1,maxbright/16) ); |
75 | brightness->setLineStep( QMAX(1,maxbright/16) ); | 76 | brightness->setLineStep( QMAX(1,maxbright/16) ); |
76 | brightness->setPageStep( QMAX(1,maxbright/16) ); | 77 | brightness->setPageStep( QMAX(1,maxbright/16) ); |
@@ -110,12 +111,13 @@ void LightSettings::accept() | |||
110 | e << i_dim << i_lightoff << i_suspend; | 111 | e << i_dim << i_lightoff << i_suspend; |
111 | 112 | ||
112 | Config config( "qpe" ); | 113 | Config config( "qpe" ); |
113 | config.setGroup( "Screensaver" ); | 114 | config.setGroup( "Screensaver" ); |
114 | config.writeEntry( "Dim", (int)screensaver_dim->isChecked() ); | 115 | config.writeEntry( "Dim", (int)screensaver_dim->isChecked() ); |
115 | config.writeEntry( "LightOff", (int)screensaver_lightoff->isChecked() ); | 116 | config.writeEntry( "LightOff", (int)screensaver_lightoff->isChecked() ); |
117 | config.writeEntry( "LcdOffOnly", (int)LcdOffOnly->isChecked() ); | ||
116 | config.writeEntry( "Interval_Dim", interval_dim->value() ); | 118 | config.writeEntry( "Interval_Dim", interval_dim->value() ); |
117 | config.writeEntry( "Interval_LightOff", interval_lightoff->value() ); | 119 | config.writeEntry( "Interval_LightOff", interval_lightoff->value() ); |
118 | config.writeEntry( "Interval", interval_suspend->value() ); | 120 | config.writeEntry( "Interval", interval_suspend->value() ); |
119 | config.writeEntry( "Brightness", | 121 | config.writeEntry( "Brightness", |
120 | (brightness->maxValue()-brightness->value())*255/brightness->maxValue() ); | 122 | (brightness->maxValue()-brightness->value())*255/brightness->maxValue() ); |
121 | config.write(); | 123 | config.write(); |