From 4e30c44daf54e313024b1e2ce6e5bcc003cb7bac Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 22 Aug 2018 18:10:20 -0400 Subject: A few fixes for Lumina: 1. Adjust the pkg-plist for FreeBSD to include the trident-dark color file. 2. Add a new function for fetching XDG standard directory paths (and create dir as needed) 3. Setup the desktop and lib classes to use the XDG standard path function now. 4. Add a bunch of fallback icons if the "start-here-lumina" icon could not be found in the current theme. These are all based on the OS name. 5. Ensure we run "xdg-user-dirs-update" before launching the session (if it is installed). This is used for the main standard dir detection. 6. Ensure that start-lumina-desktop *always* starts a new desktop session (bypassing any existing lock files for the desktop session). --- src-qt5/core/lumina-desktop/AppMenu.cpp | 10 ++-------- src-qt5/core/lumina-desktop/LDesktop.cpp | 3 +-- src-qt5/core/lumina-desktop/LSession.cpp | 7 +++---- 3 files changed, 6 insertions(+), 14 deletions(-) (limited to 'src-qt5/core/lumina-desktop') diff --git a/src-qt5/core/lumina-desktop/AppMenu.cpp b/src-qt5/core/lumina-desktop/AppMenu.cpp index 9ad51c93..136636e9 100644 --- a/src-qt5/core/lumina-desktop/AppMenu.cpp +++ b/src-qt5/core/lumina-desktop/AppMenu.cpp @@ -45,14 +45,8 @@ void AppMenu::updateAppList(){ APPS.clear(); //NOTE: Don't delete these pointers - the pointers are managed by the sysApps class and these are just references to them //qDebug() << "New Apps List:"; if(LSession::handle()->sessionSettings()->value("AutomaticDesktopAppLinks",true).toBool() && !lastHashUpdate.isNull() ){ - QString desktop = QDir::homePath()+"/"+tr("Desktop")+"/"; //translated desktop folder - if(!QFile::exists(desktop)){ - desktop = QDir::homePath()+"/Desktop/"; //desktop folder - if(!QFile::exists(desktop)){ - desktop = QDir::homePath()+"/desktop/"; //lowercase desktop folder - if(!QFile::exists(desktop)){ desktop.clear(); } - } - } + QString desktop = LUtils::standardDirectory(LUtils::Desktop); + desktop.append("/"); //qDebug() << "Update Desktop Folder:" << desktop << sysApps->removedApps << sysApps->newApps; QStringList tmp = sysApps->removedApps; for(int i=0; ielapsed();} - desktopFiles = QDir(QDir::homePath()+"/Desktop").entryInfoList(QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs, QDir::Name | QDir::IgnoreCase | QDir::DirsFirst); + desktopFiles = QDir(LUtils::standardDirectory(LUtils::Desktop)).entryInfoList(QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs, QDir::Name | QDir::IgnoreCase | QDir::DirsFirst); updateDesktops(); //if(DEBUG){ qDebug() << " - Process Events (6x):" << timer->elapsed();} //for(int i=0; i<6; i++){ LSession::processEvents(); } //Run through this a few times so the interface systems get up and running @@ -227,8 +227,7 @@ void LSession::setupSession(){ watcherChange( confdir+"/fluxbox-keys" ); watcherChange( confdir+"/favorites.list" ); //Try to watch the localized desktop folder too - if(QFile::exists(QDir::homePath()+"/"+tr("Desktop"))){ watcherChange( QDir::homePath()+"/"+tr("Desktop") ); } - watcherChange( QDir::homePath()+"/Desktop" ); + watcherChange( LUtils::standardDirectory(LUtils::Desktop) ); //And watch the /media directory, and /run/media/USERNAME directory if(QFile::exists("/media")){ watcherChange("/media"); } QString userMedia = QString("/run/media/%1").arg(QDir::homePath().split("/").takeLast()); @@ -419,7 +418,7 @@ void LSession::watcherChange(QString changed){ } emit SessionConfigChanged(); }else if(changed.endsWith("desktopsettings.conf") ){ emit DesktopConfigChanged(); } - else if(changed == QDir::homePath()+"/Desktop" || changed == QDir::homePath()+"/"+tr("Desktop") ){ + else if(changed == LUtils::standardDirectory(LUtils::Desktop) ){ desktopFiles = QDir(changed).entryInfoList(QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs ,QDir::Name | QDir::IgnoreCase | QDir::DirsFirst); if(DEBUG){ qDebug() << "New Desktop Files:" << desktopFiles.length(); } emit DesktopFilesChanged(); -- cgit From cdc2b5f95964666b90ff00f5d222d44f6c4145fe Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 6 Sep 2018 12:21:23 -0400 Subject: When a desktop is resized automatically re-do the wallpaper as well. --- src-qt5/core/lumina-desktop/LDesktop.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src-qt5/core/lumina-desktop') diff --git a/src-qt5/core/lumina-desktop/LDesktop.cpp b/src-qt5/core/lumina-desktop/LDesktop.cpp index ad66e7ba..e4706498 100644 --- a/src-qt5/core/lumina-desktop/LDesktop.cpp +++ b/src-qt5/core/lumina-desktop/LDesktop.cpp @@ -104,6 +104,7 @@ void LDesktop::UpdateGeometry(){ //qDebug() << " - Update Desktop Plugin Area"; //UpdateDesktopPluginArea(); //qDebug() << " - Done With Desktop Geom Updates"; + QTimer::singleShot(0, this, SLOT(UpdateBackground())); QTimer::singleShot(0, this, SLOT(UpdatePanels())); } -- cgit