diff options
author | Weblate <noreply@weblate.org> | 2017-12-15 22:52:34 +0000 |
---|---|---|
committer | Weblate <noreply@weblate.org> | 2017-12-15 22:52:34 +0000 |
commit | 9155556b94b0fe25ef3d5398a7f70dcdc1841d69 (patch) | |
tree | ae5af06e4741c8767344be6d90a7307bcddb5b5d /src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp | |
parent | Translated using Weblate (Russian) (diff) | |
parent | Another minor networking fix. (diff) | |
download | lumina-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.cpp | 7 |
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); } |