summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-10-23 15:46:15 (UTC)
committer harlekin <harlekin>2002-10-23 15:46:15 (UTC)
commit748f658f5102a50502cd060d50b35fded71356c3 (patch) (unidiff)
tree07ba617972f63727cbe7eb64d6b9f62c7ba99fd9
parentd3c2817cea75b9b84ea02a102e7048abf109f848 (diff)
downloadopie-748f658f5102a50502cd060d50b35fded71356c3.zip
opie-748f658f5102a50502cd060d50b35fded71356c3.tar.gz
opie-748f658f5102a50502cd060d50b35fded71356c3.tar.bz2
save values right
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/light-and-power/light.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp
index da36826..0193a7b 100644
--- a/core/settings/light-and-power/light.cpp
+++ b/core/settings/light-and-power/light.cpp
@@ -179,59 +179,59 @@ void LightSettings::accept()
179 int i_dim = (screensaver_dim->isChecked() ? interval_dim->value() : 0); 179 int i_dim = (screensaver_dim->isChecked() ? interval_dim->value() : 0);
180 int i_lightoff = (screensaver_lightoff->isChecked() ? interval_lightoff->value() : 0); 180 int i_lightoff = (screensaver_lightoff->isChecked() ? interval_lightoff->value() : 0);
181 int i_suspend = interval_suspend->value(); 181 int i_suspend = interval_suspend->value();
182 QCopEnvelope e("QPE/System", "setScreenSaverIntervals(int,int,int)" ); 182 QCopEnvelope e("QPE/System", "setScreenSaverIntervals(int,int,int)" );
183 e << i_dim << i_lightoff << i_suspend; 183 e << i_dim << i_lightoff << i_suspend;
184 184
185 // ac 185 // ac
186 int i_dim_ac = (screensaver_dim_ac_3->isChecked() ? interval_dim_ac_3->value() : 0); 186 int i_dim_ac = (screensaver_dim_ac_3->isChecked() ? interval_dim_ac_3->value() : 0);
187 int i_lightoff_ac = (screensaver_lightoff_ac_3->isChecked() ? interval_lightoff_ac_3->value() : 0); 187 int i_lightoff_ac = (screensaver_lightoff_ac_3->isChecked() ? interval_lightoff_ac_3->value() : 0);
188 int i_suspend_ac = interval_suspend_ac_3->value(); 188 int i_suspend_ac = interval_suspend_ac_3->value();
189 QCopEnvelope e_ac("QPE/System", "setScreenSaverIntervalsAC(int,int,int)" ); 189 QCopEnvelope e_ac("QPE/System", "setScreenSaverIntervalsAC(int,int,int)" );
190 e << i_dim_ac << i_lightoff_ac << i_suspend_ac; 190 e << i_dim_ac << i_lightoff_ac << i_suspend_ac;
191 191
192 Config config( "qpe" ); 192 Config config( "qpe" );
193 config.setGroup( "Screensaver" ); 193 config.setGroup( "Screensaver" );
194 194
195 // bat 195 // bat
196 config.writeEntry( "Dim", (int)screensaver_dim->isChecked() ); 196 config.writeEntry( "Dim", (int)screensaver_dim->isChecked() );
197 config.writeEntry( "LightOff", (int)screensaver_lightoff->isChecked() ); 197 config.writeEntry( "LightOff", (int)screensaver_lightoff->isChecked() );
198 config.writeEntry( "LcdOffOnly", (int)LcdOffOnly->isChecked() ); 198 config.writeEntry( "LcdOffOnly", (int)LcdOffOnly->isChecked() );
199 config.writeEntry( "Interval_Dim", interval_dim->value() ); 199 config.writeEntry( "Interval_Dim", interval_dim->value() );
200 config.writeEntry( "Interval_LightOff", interval_lightoff->value() ); 200 config.writeEntry( "Interval_LightOff", interval_lightoff->value() );
201 config.writeEntry( "Interval", interval_suspend->value() ); 201 config.writeEntry( "Interval", interval_suspend->value() );
202 config.writeEntry( "Brightness", 202 config.writeEntry( "Brightness",
203 (brightness->maxValue()-brightness->value())*255/brightness->maxValue() ); 203 ( brightness->value() ) * 255 / brightness->maxValue() );
204 204
205 // ac 205 // ac
206 config.writeEntry( "DimAC", (int)screensaver_dim_ac_3->isChecked() ); 206 config.writeEntry( "DimAC", (int)screensaver_dim_ac_3->isChecked() );
207 config.writeEntry( "LightOffAC", (int)screensaver_lightoff_ac_3->isChecked() ); 207 config.writeEntry( "LightOffAC", (int)screensaver_lightoff_ac_3->isChecked() );
208 config.writeEntry( "LcdOffOnlyAC", (int)LcdOffOnly_2_3->isChecked() ); 208 config.writeEntry( "LcdOffOnlyAC", (int)LcdOffOnly_2_3->isChecked() );
209 config.writeEntry( "Interval_DimAC", interval_dim_ac_3->value() ); 209 config.writeEntry( "Interval_DimAC", interval_dim_ac_3->value() );
210 config.writeEntry( "Interval_LightOffAC", interval_lightoff_ac_3->value() ); 210 config.writeEntry( "Interval_LightOffAC", interval_lightoff_ac_3->value() );
211 config.writeEntry( "IntervalAC", interval_suspend_ac_3->value() ); 211 config.writeEntry( "IntervalAC", interval_suspend_ac_3->value() );
212 config.writeEntry( "BrightnessAC", 212 config.writeEntry( "BrightnessAC",
213 (brightness_ac_3->maxValue() - brightness_ac_3->value())*255/brightness_ac_3->maxValue() ); 213 ( brightness_ac_3->value()) * 255 / brightness_ac_3->maxValue() );
214 214
215 215
216 // only make ipaq light sensor entries in config file if on an ipaq 216 // only make ipaq light sensor entries in config file if on an ipaq
217 if ( ODevice::inst()->model() == Model_iPAQ_H31xx || 217 if ( ODevice::inst()->model() == Model_iPAQ_H31xx ||
218 ODevice::inst()->model() == Model_iPAQ_H36xx || 218 ODevice::inst()->model() == Model_iPAQ_H36xx ||
219 ODevice::inst()->model() == Model_iPAQ_H37xx || 219 ODevice::inst()->model() == Model_iPAQ_H37xx ||
220 ODevice::inst()->model() == Model_iPAQ_H38xx ) { 220 ODevice::inst()->model() == Model_iPAQ_H38xx ) {
221 221
222 // ipaq sensor 222 // ipaq sensor
223 config.setGroup( "Ipaq_light_sensor" ); 223 config.setGroup( "Ipaq_light_sensor" );
224 224
225 config.writeEntry( "LightSensor", (int)auto_brightness->isChecked() ); 225 config.writeEntry( "LightSensor", (int)auto_brightness->isChecked() );
226 config.writeEntry( "LightSensorAC", (int)auto_brightness_ac_3->isChecked() ); 226 config.writeEntry( "LightSensorAC", (int)auto_brightness_ac_3->isChecked() );
227 config.writeEntry( "Steps", LightStepSpin->value() ); 227 config.writeEntry( "Steps", LightStepSpin->value() );
228 config.writeEntry( "MinValue", LightMinValueSlider->value() ); 228 config.writeEntry( "MinValue", LightMinValueSlider->value() );
229 config.writeEntry( "Shift", LightShiftSpin->value() ); 229 config.writeEntry( "Shift", LightShiftSpin->value() );
230 } 230 }
231 231
232 config.write(); 232 config.write();
233 233
234 // advanced 234 // advanced
235 Config conf("apm"); 235 Config conf("apm");
236 conf.setGroup( "Warnings" ); 236 conf.setGroup( "Warnings" );
237 conf.writeEntry( "check_interval", warnintervalBox->value()*1000 ); 237 conf.writeEntry( "check_interval", warnintervalBox->value()*1000 );