aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2017-12-15 22:52:34 +0000
committerWeblate <noreply@weblate.org>2017-12-15 22:52:34 +0000
commit9155556b94b0fe25ef3d5398a7f70dcdc1841d69 (patch)
treeae5af06e4741c8767344be6d90a7307bcddb5b5d /src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp
parentTranslated using Weblate (Russian) (diff)
parentAnother minor networking fix. (diff)
downloadlumina-9155556b94b0fe25ef3d5398a7f70dcdc1841d69.tar.gz
lumina-9155556b94b0fe25ef3d5398a7f70dcdc1841d69.tar.bz2
lumina-9155556b94b0fe25ef3d5398a7f70dcdc1841d69.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp')
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp b/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp
index be5b8488..69ea5faa 100644
--- a/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp
+++ b/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp
@@ -20,6 +20,7 @@ LBattery::LBattery(QWidget *parent, QString id, bool horizontal) : LPPlugin(pare
connect(timer,SIGNAL(timeout()), this, SLOT(updateBattery()) );
timer->start();
QTimer::singleShot(0,this,SLOT(OrientationChange()) ); //update the sizing/icon
+ sessionsettings = new QSettings("lumina-desktop", "sessionsettings");
}
LBattery::~LBattery(){
@@ -76,9 +77,11 @@ void LBattery::updateBattery(bool force){
label->setPixmap( LXDG::findIcon("battery-unknown", "battery-missing").pixmap(label->size()) );
break;
}
+ }
if(icon<iconOld && icon==0){
- //Play some audio warning chime when
- QString sfile = LSession::handle()->sessionSettings()->value("audiofiles/batterylow", LOS::LuminaShare()+"low-battery.ogg").toString();
+ //Play some audio warning chime when
+ bool playaudio = sessionsettings->value("PlayBatteryLowAudio",true).toBool();
+ if( playaudio ){ QString sfile = LSession::handle()->sessionSettings()->value("audiofiles/batterylow", LOS::LuminaShare()+"low-battery.ogg").toString();
LSession::handle()->playAudioFile(sfile);
}
bgstack15