summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/light-and-power/light.cpp12
-rw-r--r--core/settings/light-and-power/lightsettingsbase.ui4
2 files changed, 5 insertions, 11 deletions
diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp
index 1a94209..d93b0af 100644
--- a/core/settings/light-and-power/light.cpp
+++ b/core/settings/light-and-power/light.cpp
@@ -76,3 +76,2 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags fl )
76 Config config( "qpe" ); 76 Config config( "qpe" );
77
78 config.setGroup( "Screensaver" ); 77 config.setGroup( "Screensaver" );
@@ -141,4 +140,4 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags fl )
141 140
142 connect(brightness, SIGNAL(valueChanged(int)), this, SLOT(applyBrightness())); 141 connect( brightness, SIGNAL( valueChanged(int) ), this, SLOT( applyBrightness() ) );
143 connect(brightness_ac_3, SIGNAL( valueChanged(int) ), this, SLOT( applyBrightnessAC() ) ); 142 connect( brightness_ac_3, SIGNAL( valueChanged(int) ), this, SLOT( applyBrightnessAC() ) );
144} 143}
@@ -155,3 +154,3 @@ static void set_fl(int bright)
155{ 154{
156 qDebug( QString("BRIGHT !! : %1").arg( bright ) ); 155 qDebug ( QString( "Brightness" ).arg( bright ) );
157 QCopEnvelope e("QPE/System", "setBacklight(int)" ); 156 QCopEnvelope e("QPE/System", "setBacklight(int)" );
@@ -242,3 +241,3 @@ void LightSettings::applyBrightness()
242{ 241{
243 if ( !PowerStatus::Online ) { 242 if ( PowerStatusManager::readStatus().acStatus() != PowerStatus::Online ) {
244 int bright = ( brightness->value() ) * 255 / brightness->maxValue(); 243 int bright = ( brightness->value() ) * 255 / brightness->maxValue();
@@ -250,5 +249,4 @@ void LightSettings::applyBrightnessAC()
250{ 249{
251 qDebug( QString("SLIDER : %1").arg( brightness_ac_3->value() ) );
252 // if ac is attached, set directly that sliders setting, else the "on battery" sliders setting 250 // if ac is attached, set directly that sliders setting, else the "on battery" sliders setting
253 if ( PowerStatus::Online ) { 251 if ( PowerStatusManager::readStatus().acStatus() == PowerStatus::Online ) {
254 int bright = ( brightness_ac_3->value() ) * 255 / brightness_ac_3->maxValue(); 252 int bright = ( brightness_ac_3->value() ) * 255 / brightness_ac_3->maxValue();
diff --git a/core/settings/light-and-power/lightsettingsbase.ui b/core/settings/light-and-power/lightsettingsbase.ui
index 5e62626..be096ac 100644
--- a/core/settings/light-and-power/lightsettingsbase.ui
+++ b/core/settings/light-and-power/lightsettingsbase.ui
@@ -760,6 +760,2 @@
760 </property> 760 </property>
761 <property stdset="1">
762 <name>tickInterval</name>
763 <number>32</number>
764 </property>
765 </widget> 761 </widget>