From 7bdf4e22259bdd135df29f59aaf5fecb44037b48 Mon Sep 17 00:00:00 2001 From: q5sys Date: Thu, 3 Aug 2017 09:05:28 -0400 Subject: get basic user defined sound enabled --- src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp') 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(iconplayAudioFile(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;}"); } -- cgit