summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/light-and-power/light.cpp31
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
@@ -162,6 +162,4 @@ void LightSettings::accept()
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
@@ -169,6 +167,4 @@ void LightSettings::accept()
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" );
@@ -178,7 +174,7 @@ void LightSettings::accept()
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() );
@@ -187,7 +183,7 @@ void LightSettings::accept()
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() );
@@ -196,5 +192,4 @@ void LightSettings::accept()
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() );
@@ -212,8 +207,18 @@ void LightSettings::accept()
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}