diff options
author | Ken Moore <ken@pcbsd.org> | 2015-04-22 11:04:53 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-04-22 11:04:53 -0400 |
commit | a02f2f5025d089401025c092963eef823cfe3726 (patch) | |
tree | 1351530776f8877d68f19e7fbc6d8829529d5bf9 /lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp | |
parent | Clean up the new lumina-fileinfo utility. (diff) | |
download | lumina-a02f2f5025d089401025c092963eef823cfe3726.tar.gz lumina-a02f2f5025d089401025c092963eef823cfe3726.tar.bz2 lumina-a02f2f5025d089401025c092963eef823cfe3726.zip |
Move the initial screen brightness and volume setting routines into the session initialization (out of the system dashboard plugin).
Diffstat (limited to 'lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp')
-rw-r--r-- | lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp b/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp index b470f191..0cf053fa 100644 --- a/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp +++ b/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp @@ -12,13 +12,12 @@ LSysMenuQuick::LSysMenuQuick(QWidget *parent) : QWidget(parent), ui(new Ui::LSysMenuQuick){ ui->setupUi(this); - settings = new QSettings("panel-plugins","systemdashboard"); brighttimer = new QTimer(this); brighttimer->setSingleShot(true); brighttimer->setInterval(50); //50ms delay in setting the new value - //Now reset the initial saved settings (if any) - LOS::setScreenBrightness( settings->value("screenbrightness",100).toInt() ); //default to 100% - LOS::setAudioVolume( settings->value("audiovolume", 100).toInt() ); //default to 100% + //Now reset the initial saved settings (this is handles by the LOS/session now - 4/22/15) + UpdateMenu(); //do this once before all the signals/slots are connected below + //Now setup the connections connect(ui->slider_volume, SIGNAL(valueChanged(int)), this, SLOT(volSliderChanged()) ); connect(ui->slider_brightness, SIGNAL(valueChanged(int)), this, SLOT(brightSliderChanged()) ); @@ -102,7 +101,6 @@ void LSysMenuQuick::UpdateMenu(){ void LSysMenuQuick::volSliderChanged(){ int val = ui->slider_volume->value(); LOS::setAudioVolume(val); - settings->setValue("audiovolume",val); QString txt = QString::number(val)+"%"; if(val<100){ txt.prepend(" "); } //make sure no widget resizing ui->label_vol_text->setText( txt ); @@ -131,7 +129,6 @@ void LSysMenuQuick::brightSliderChanged(){ void LSysMenuQuick::setCurrentBrightness(){ int val = ui->slider_brightness->value(); LOS::setScreenBrightness(val); - settings->setValue("screenbrightness",val); QString txt = QString::number(val)+"%"; if(val<100){ txt.prepend(" "); } //make sure no widget resizing ui->label_bright_text->setText( txt ); |