summaryrefslogtreecommitdiff
path: root/core/settings/light-and-power
authorharlekin <harlekin>2002-10-27 16:56:57 (UTC)
committer harlekin <harlekin>2002-10-27 16:56:57 (UTC)
commit3bdf11c7117e28cda91a1447b8510d7deba94b99 (patch) (unidiff)
treebd319dc62298cc1237adbc889beea099a1bbe409 /core/settings/light-and-power
parent27a2748d4a5893a888b19d3ed453be29cac0d75b (diff)
downloadopie-3bdf11c7117e28cda91a1447b8510d7deba94b99.zip
opie-3bdf11c7117e28cda91a1447b8510d7deba94b99.tar.gz
opie-3bdf11c7117e28cda91a1447b8510d7deba94b99.tar.bz2
light sensor more generell, not only ipaq
Diffstat (limited to 'core/settings/light-and-power') (more/less context) (show whitespace changes)
-rw-r--r--core/settings/light-and-power/light.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp
index 77c6b40..fb40adc 100644
--- a/core/settings/light-and-power/light.cpp
+++ b/core/settings/light-and-power/light.cpp
@@ -141,7 +141,7 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags )
141 141
142 142
143 // ipaq sensor 143 // ipaq sensor
144 config.setGroup( "Ipaqlightsensor" ); 144 config.setGroup( "lightsensor" );
145 auto_brightness->setChecked( config.readNumEntry("LightSensor",0) != 0 ); 145 auto_brightness->setChecked( config.readNumEntry("LightSensor",0) != 0 );
146 auto_brightness_ac_3->setChecked( config.readNumEntry("LightSensorAC",0) != 0 ); 146 auto_brightness_ac_3->setChecked( config.readNumEntry("LightSensorAC",0) != 0 );
147 //LightStepSpin->setValue( config.readNumEntry("Steps", 10 ) ); 147 //LightStepSpin->setValue( config.readNumEntry("Steps", 10 ) );
@@ -227,10 +227,9 @@ void LightSettings::accept()
227 ( brightness_ac_3->value()) * 255 / brightness_ac_3->maxValue() ); 227 ( brightness_ac_3->value()) * 255 / brightness_ac_3->maxValue() );
228 228
229 229
230 // only make ipaq light sensor entries in config file if on an ipaq 230 // only make light sensor stuff appear if the unit has a sensor
231 if ( ODevice::inst()->hasLightSensor() ) { 231 if ( ODevice::inst()->hasLightSensor() ) {
232 // ipaq sensor 232 config.setGroup( "lightsensor" );
233 config.setGroup( "Ipaqlightsensor" );
234 config.writeEntry( "LightSensor", (int)auto_brightness->isChecked() ); 233 config.writeEntry( "LightSensor", (int)auto_brightness->isChecked() );
235 config.writeEntry( "LightSensorAC", (int)auto_brightness_ac_3->isChecked() ); 234 config.writeEntry( "LightSensorAC", (int)auto_brightness_ac_3->isChecked() );
236 //config.writeEntry( "Steps", LightStepSpin->value() ); 235 //config.writeEntry( "Steps", LightStepSpin->value() );
@@ -269,8 +268,6 @@ void LightSettings::applyBrightnessAC()
269 } 268 }
270} 269}
271 270
272
273
274void LightSettings::done(int r) 271void LightSettings::done(int r)
275{ 272{
276 QDialog::done(r); 273 QDialog::done(r);