diff options
author | Ken Moore <ken@ixsystems.com> | 2018-01-17 12:01:21 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2018-01-17 12:01:21 -0500 |
commit | 470c98ef7a65cf975afac534d78bf28e3d8cffa3 (patch) | |
tree | 8af32af3250e2b0ecbfea241e0e3251d2283b7ec /src-qt5/core/lumina-desktop | |
parent | Add a failsafe setting into the 1.4.x lumina-desktop: (diff) | |
parent | Merge branch 'master' of http://github.com/trueos/lumina (diff) | |
download | lumina-470c98ef7a65cf975afac534d78bf28e3d8cffa3.tar.gz lumina-470c98ef7a65cf975afac534d78bf28e3d8cffa3.tar.bz2 lumina-470c98ef7a65cf975afac534d78bf28e3d8cffa3.zip |
Merge branch 'master' of github.com:trueos/lumina
Diffstat (limited to 'src-qt5/core/lumina-desktop')
-rw-r--r-- | src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp | 21 |
1 files changed, 11 insertions, 10 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 69ea5faa..1870eefb 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp @@ -78,19 +78,20 @@ void LBattery::updateBattery(bool force){ break; } } - if(icon<iconOld && icon==0){ - //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(); + if(icon<iconOld && icon==0){ + //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); - } + } + } - if(icon==0){ label->setStyleSheet("QLabel{ background: red;}"); } - else if(icon==14 && charge>98){ label->setStyleSheet("QLabel{ background: green;}"); } - else{ label->setStyleSheet("QLabel{ background: transparent;}"); } - iconOld = icon; + if(icon==0){ label->setStyleSheet("QLabel{ background: red;}"); } + else if(icon==14 && charge>98){ label->setStyleSheet("QLabel{ background: green;}"); } + else{ label->setStyleSheet("QLabel{ background: transparent;}"); } + iconOld = icon; - } //Now update the display QString tt; //Make sure the tooltip can be properly translated as necessary (Ken Moore 5/9/14) |