author | sandman <sandman> | 2002-10-28 02:33:02 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-10-28 02:33:02 (UTC) |
commit | 37397a824a807195ba440117a6bac0043ea788a1 (patch) (unidiff) | |
tree | 0fc3ae6178d46b7c1fa834c1e43a8248369970d9 /core | |
parent | c1f70789d18145743fd71464c091612788cc5e3f (diff) | |
download | opie-37397a824a807195ba440117a6bac0043ea788a1.zip opie-37397a824a807195ba440117a6bac0043ea788a1.tar.gz opie-37397a824a807195ba440117a6bac0043ea788a1.tar.bz2 |
some minor adjustments in the l&p <-> launcher interface routine
-rw-r--r-- | core/settings/light-and-power/light.cpp | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp index c021ad4..aa36e06 100644 --- a/core/settings/light-and-power/light.cpp +++ b/core/settings/light-and-power/light.cpp | |||
@@ -161,15 +161,11 @@ void LightSettings::accept() | |||
161 | int i_dim = interval_dim->value(); | 161 | int i_dim = interval_dim->value(); |
162 | int i_lightoff = interval_lightoff->value(); | 162 | int i_lightoff = interval_lightoff->value(); |
163 | int i_suspend = interval_suspend->value(); | 163 | int i_suspend = interval_suspend->value(); |
164 | QCopEnvelope e("QPE/System", "setScreenSaverIntervals(int,int,int)" ); | ||
165 | e << i_dim << i_lightoff << i_suspend; | ||
166 | 164 | ||
167 | // ac | 165 | // ac |
168 | int i_dim_ac = interval_dim_ac_3->value(); | 166 | int i_dim_ac = interval_dim_ac_3->value(); |
169 | int i_lightoff_ac = interval_lightoff_ac_3->value(); | 167 | int i_lightoff_ac = interval_lightoff_ac_3->value(); |
170 | int i_suspend_ac = interval_suspend_ac_3->value(); | 168 | int i_suspend_ac = interval_suspend_ac_3->value(); |
171 | QCopEnvelope e_ac("QPE/System", "setScreenSaverIntervalsAC(int,int,int)" ); | ||
172 | e << i_dim_ac << i_lightoff_ac << i_suspend_ac; | ||
173 | 169 | ||
174 | Config config( "apm" ); | 170 | Config config( "apm" ); |
175 | 171 | ||
@@ -177,25 +173,24 @@ void LightSettings::accept() | |||
177 | 173 | ||
178 | // bat | 174 | // bat |
179 | config.writeEntry( "LcdOffOnly", LcdOffOnly->isChecked() ); | 175 | config.writeEntry( "LcdOffOnly", LcdOffOnly->isChecked() ); |
180 | config.writeEntry( "Dim", interval_dim->value() ); | 176 | config.writeEntry( "Dim", i_dim ); |
181 | config.writeEntry( "LightOff", interval_lightoff->value() ); | 177 | config.writeEntry( "LightOff", i_lightoff ); |
182 | config.writeEntry( "Suspend", interval_suspend->value() ); | 178 | config.writeEntry( "Suspend", i_suspend ); |
183 | config.writeEntry( "Brightness", | 179 | config.writeEntry( "Brightness", |
184 | ( brightness->value() ) * 255 / brightness->maxValue() ); | 180 | ( brightness->value() ) * 255 / brightness->maxValue() ); |
185 | 181 | ||
186 | // ac | 182 | // ac |
187 | config.setGroup( "AC" ); | 183 | config.setGroup( "AC" ); |
188 | config.writeEntry( "LcdOffOnly", LcdOffOnly_2_3->isChecked() ); | 184 | config.writeEntry( "LcdOffOnly", LcdOffOnly_2_3->isChecked() ); |
189 | config.writeEntry( "Dim", interval_dim_ac_3->value() ); | 185 | config.writeEntry( "Dim", i_dim_ac ); |
190 | config.writeEntry( "LightOff", interval_lightoff_ac_3->value() ); | 186 | config.writeEntry( "LightOff", i_lightoff_ac ); |
191 | config.writeEntry( "Suspend", interval_suspend_ac_3->value() ); | 187 | config.writeEntry( "Suspend", i_suspend_ac ); |
192 | config.writeEntry( "Brightness", | 188 | config.writeEntry( "Brightness", |
193 | ( brightness_ac_3->value()) * 255 / brightness_ac_3->maxValue() ); | 189 | ( brightness_ac_3->value()) * 255 / brightness_ac_3->maxValue() ); |
194 | 190 | ||
195 | 191 | ||
196 | // only make light sensor stuff appear if the unit has a sensor | 192 | // only make light sensor stuff appear if the unit has a sensor |
197 | if ( ODevice::inst()->hasLightSensor() ) { | 193 | if ( ODevice::inst()->hasLightSensor() ) { |
198 | config.setGroup( "lightsensor" ); | ||
199 | config.setGroup( "Battery" ); | 194 | config.setGroup( "Battery" ); |
200 | config.writeEntry( "LightSensor", (int)auto_brightness->isChecked() ); | 195 | config.writeEntry( "LightSensor", (int)auto_brightness->isChecked() ); |
201 | config.setGroup( "AC" ); | 196 | config.setGroup( "AC" ); |
@@ -211,10 +206,20 @@ void LightSettings::accept() | |||
211 | config.writeEntry( "check_interval", warnintervalBox->value()*1000 ); | 206 | config.writeEntry( "check_interval", warnintervalBox->value()*1000 ); |
212 | config.writeEntry( "power_verylow", lowSpinBox->value() ); | 207 | config.writeEntry( "power_verylow", lowSpinBox->value() ); |
213 | config.writeEntry( "power_critical", criticalSpinBox->value() ); | 208 | config.writeEntry( "power_critical", criticalSpinBox->value() ); |
214 | QCopEnvelope e_warn("QPE/System", "reloadPowerWarnSettings()"); | ||
215 | |||
216 | config.write(); | 209 | config.write(); |
217 | 210 | ||
211 | { | ||
212 | QCopEnvelope e ( "QPE/System", "reloadPowerWarnSettings()" ); | ||
213 | } | ||
214 | { | ||
215 | QCopEnvelope e ( "QPE/System", "setScreenSaverInterval(int)" ); | ||
216 | e << -1; | ||
217 | } | ||
218 | { | ||
219 | QCopEnvelope e ( "QPE/System", "setBacklight(int)" ); | ||
220 | e << -1; | ||
221 | } | ||
222 | |||
218 | QDialog::accept(); | 223 | QDialog::accept(); |
219 | } | 224 | } |
220 | 225 | ||