aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop-unified/src-desktop/DesktopManager.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2018-02-01 09:48:11 -0500
committerKen Moore <ken@ixsystems.com>2018-02-01 09:48:11 -0500
commit9d3f929c27127bbc8f9d4b3d286c5d979f7203e4 (patch)
tree273f7323c6b1acfa690c1e45bc3ee37ca52feb07 /src-qt5/core/lumina-desktop-unified/src-desktop/DesktopManager.cpp
parentGet a unified system clock setup within the RootDesktopObject. (diff)
downloadlumina-9d3f929c27127bbc8f9d4b3d286c5d979f7203e4.tar.gz
lumina-9d3f929c27127bbc8f9d4b3d286c5d979f7203e4.tar.bz2
lumina-9d3f929c27127bbc8f9d4b3d286c5d979f7203e4.zip
Finish getting the session settings all loaded by the Desktop Manager.
Also ensure the desktop clock is a bit smarter about when it changes it's functionality (just in case the setting did not change).
Diffstat (limited to 'src-qt5/core/lumina-desktop-unified/src-desktop/DesktopManager.cpp')
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-desktop/DesktopManager.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/DesktopManager.cpp b/src-qt5/core/lumina-desktop-unified/src-desktop/DesktopManager.cpp
index be315596..35bd288d 100644
--- a/src-qt5/core/lumina-desktop-unified/src-desktop/DesktopManager.cpp
+++ b/src-qt5/core/lumina-desktop-unified/src-desktop/DesktopManager.cpp
@@ -20,6 +20,7 @@ DesktopManager::~DesktopManager(){
void DesktopManager::start(){
connect(DesktopSettings::instance(), SIGNAL(FileModified(DesktopSettings::File)), this, SLOT(settingsChanged(DesktopSettings::File)) );
//Perform the initial load of the settings files
+ QTimer::singleShot(0, this, SLOT(updateSessionSettings()) );
QTimer::singleShot(0, this, SLOT(updateDesktopSettings()) );
QTimer::singleShot(0, this, SLOT(updatePanelSettings()) );
QTimer::singleShot(0, this, SLOT(updatePluginSettings()) );
@@ -96,16 +97,18 @@ void DesktopManager::workspaceChanged(int wknum){
void DesktopManager::settingsChanged(DesktopSettings::File type){
switch(type){
+ case DesktopSettings::Session:
+ QTimer::singleShot(0, this, SLOT(updateSessionSettings()) );
case DesktopSettings::Desktop:
- QTimer::singleShot(0, this, SLOT(updateDesktopSettings()) );
+ QTimer::singleShot(1, this, SLOT(updateDesktopSettings()) );
case DesktopSettings::Panels:
- QTimer::singleShot(1, this, SLOT(updatePanelSettings()) );
+ QTimer::singleShot(2, this, SLOT(updatePanelSettings()) );
case DesktopSettings::Plugins:
- QTimer::singleShot(2, this, SLOT(updatePluginSettings()) );
+ QTimer::singleShot(3, this, SLOT(updatePluginSettings()) );
case DesktopSettings::ContextMenu:
- QTimer::singleShot(3, this, SLOT(updateMenuSettings()) );
+ QTimer::singleShot(4, this, SLOT(updateMenuSettings()) );
case DesktopSettings::Animation:
- QTimer::singleShot(4, this, SLOT(updateAnimationSettings()) );
+ QTimer::singleShot(5, this, SLOT(updateAnimationSettings()) );
default:
break;
//Do nothing - not a settings change we care about here
@@ -144,6 +147,12 @@ void DesktopManager::syncTrayWindowList(){
}
// === PRIVATE SLOTS ===
+void DesktopManager::updateSessionSettings(){
+ qDebug() << "Update Session Settings...";
+
+ RootDesktopObject::instance()->updateCurrentTimeFormat(DesktopSettings::instance()->value(DesktopSettings::Session, "datetime_format", "").toString());
+}
+
void DesktopManager::updateDesktopSettings(){
qDebug() << "Update Desktop Settings...";
QList<QScreen*> scrns = QGuiApplication::screens();
bgstack15