diff options
author | Weblate <noreply@weblate.org> | 2017-08-03 13:47:59 +0000 |
---|---|---|
committer | Weblate <noreply@weblate.org> | 2017-08-03 13:47:59 +0000 |
commit | cf1c74e99d313864f8b55b9e55066cfaabf3e4e1 (patch) | |
tree | 76f5bbaba21be05b7cc0ac00bca2063fa63f3d59 | |
parent | Translated using Weblate (Spanish) (diff) | |
parent | get basic user defined sound enabled (diff) | |
download | lumina-cf1c74e99d313864f8b55b9e55066cfaabf3e4e1.tar.gz lumina-cf1c74e99d313864f8b55b9e55066cfaabf3e4e1.tar.bz2 lumina-cf1c74e99d313864f8b55b9e55066cfaabf3e4e1.zip |
Merge remote-tracking branch 'origin/master'
-rw-r--r-- | src-qt5/core/lumina-desktop/LSession.cpp | 8 | ||||
-rw-r--r-- | src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp | 6 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src-qt5/core/lumina-desktop/LSession.cpp b/src-qt5/core/lumina-desktop/LSession.cpp index 93318b0f..777affd1 100644 --- a/src-qt5/core/lumina-desktop/LSession.cpp +++ b/src-qt5/core/lumina-desktop/LSession.cpp @@ -191,7 +191,10 @@ void LSession::CleanupSession(){ int vol = LOS::audioVolume(); if(vol>=0){ sessionsettings->setValue("last_session_state/audio_volume", vol); } bool playaudio = sessionsettings->value("PlayLogoutAudio",true).toBool(); - if( playaudio ){ playAudioFile(LOS::LuminaShare()+"Logout.ogg"); } + if( playaudio ){ + QString sfile = sessionsettings->value("audiofiles/logout", LOS::LuminaShare()+"Logout.ogg").toString(); + playAudioFile(sfile); + } //Stop the background system tray (detaching/closing apps as necessary) stopSystemTray(!cleansession); //Now perform any other cleanup @@ -296,7 +299,8 @@ void LSession::launchStartupApps(){ //Now play the login music since we are finished if(sessionsettings->value("PlayStartupAudio",true).toBool()){ - LSession::playAudioFile(LOS::LuminaShare()+"Login.ogg"); + QString sfile = sessionsettings->value("audiofiles/login", LOS::LuminaShare()+"Login.ogg").toString(); + playAudioFile(sfile); } qDebug() << "[DESKTOP INIT FINISHED]"; } 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 5e9d7a7f..be5b8488 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp @@ -78,8 +78,10 @@ void LBattery::updateBattery(bool force){ } if(icon<iconOld && icon==0){ //Play some audio warning chime when - LSession::handle()->playAudioFile(LOS::LuminaShare()+"low-battery.ogg"); - } + 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;}"); } |