aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-04-20 23:45:03 -0400
committerKen Moore <ken@pcbsd.org>2015-04-20 23:45:03 -0400
commiteccce30d7e271ddd4631efa4b43a12b5602c2ecf (patch)
tree5b4077ca09e3d9325ed138876c89c6d3eaaedf8d /lumina-desktop
parentMake sure to load the default value for the new datetimeorder session value (... (diff)
downloadlumina-eccce30d7e271ddd4631efa4b43a12b5602c2ecf.tar.gz
lumina-eccce30d7e271ddd4631efa4b43a12b5602c2ecf.tar.bz2
lumina-eccce30d7e271ddd4631efa4b43a12b5602c2ecf.zip
Make sure to check the list of watched files and reset it if something was removed temporarily (to ensure that the watcher functionality does not stop working while a session is in progress).
Diffstat (limited to 'lumina-desktop')
-rw-r--r--lumina-desktop/LSession.cpp12
-rw-r--r--lumina-desktop/panel-plugins/clock/LClock.cpp8
2 files changed, 18 insertions, 2 deletions
diff --git a/lumina-desktop/LSession.cpp b/lumina-desktop/LSession.cpp
index 0fea2fa1..994faad8 100644
--- a/lumina-desktop/LSession.cpp
+++ b/lumina-desktop/LSession.cpp
@@ -284,6 +284,18 @@ void LSession::watcherChange(QString changed){
if(changed.endsWith("fluxbox-init") || changed.endsWith("fluxbox-keys")){ refreshWindowManager(); }
else if(changed.endsWith("sessionsettings.conf") ){ sessionsettings->sync(); emit SessionConfigChanged(); }
else if(changed.endsWith("desktopsettings.conf") ){ emit DesktopConfigChanged(); }
+
+ //Now double-check all the watches files to ensure that none of them got removed
+
+ QStringList files = watcher->files();
+ if(files.length() < 4){
+ qDebug() << " - Resetting Watched Files...";
+ watcher->removePaths(files); //clear the current files before re-setting them
+ watcher->addPath( QDir::homePath()+"/.lumina/LuminaDE/sessionsettings.conf" );
+ watcher->addPath( QDir::homePath()+"/.lumina/LuminaDE/desktopsettings.conf" );
+ watcher->addPath( QDir::homePath()+"/.lumina/fluxbox-init" );
+ watcher->addPath( QDir::homePath()+"/.lumina/fluxbox-keys" );
+ }
}
void LSession::checkUserFiles(){
diff --git a/lumina-desktop/panel-plugins/clock/LClock.cpp b/lumina-desktop/panel-plugins/clock/LClock.cpp
index c3eb1451..1e407083 100644
--- a/lumina-desktop/panel-plugins/clock/LClock.cpp
+++ b/lumina-desktop/panel-plugins/clock/LClock.cpp
@@ -49,9 +49,12 @@ void LClock::updateTime(){
labelWidget->setToolTip(timelabel);
}else if(datetimeorder == "timedate"){
label = timelabel + " " + datelabel;
+ labelWidget->setToolTip("");
}else if(datetimeorder == "datetime"){
label = datelabel + " " + timelabel;
- }else{ label = timelabel;
+ labelWidget->setToolTip("");
+ }else{
+ label = timelabel;
labelWidget->setToolTip(datelabel);
}
if( this->layout()->direction() == QBoxLayout::TopToBottom ){
@@ -62,11 +65,12 @@ void LClock::updateTime(){
}
void LClock::updateFormats(){
+ qDebug() << "Updating clock format";
timefmt = LSession::handle()->sessionSettings()->value("TimeFormat","").toString();
datefmt = LSession::handle()->sessionSettings()->value("DateFormat","").toString();
deftime = timefmt.simplified().isEmpty();
defdate = datefmt.simplified().isEmpty();
- datetimeorder = LSession::handle()->sessionSettings()->value("DateTimeOrder", "timeonly").toString();
+ datetimeorder = LSession::handle()->sessionSettings()->value("DateTimeOrder", "timeonly").toString().toLower();
useTZ = LSession::handle()->sessionSettings()->value("CustomTimeZone",false).toBool();
if(useTZ){ TZ = QTimeZone( LSession::handle()->sessionSettings()->value("TimeZoneByteCode", QByteArray()).toByteArray() ); }
bgstack15