diff options
Diffstat (limited to 'src-qt5/core/lumina-desktop')
-rw-r--r-- | src-qt5/core/lumina-desktop/AppMenu.cpp | 10 | ||||
-rw-r--r-- | src-qt5/core/lumina-desktop/LDesktop.cpp | 4 | ||||
-rw-r--r-- | src-qt5/core/lumina-desktop/LSession.cpp | 7 |
3 files changed, 7 insertions, 14 deletions
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; i<tmp.length() && !desktop.isEmpty(); i++){ diff --git a/src-qt5/core/lumina-desktop/LDesktop.cpp b/src-qt5/core/lumina-desktop/LDesktop.cpp index 4f0ce447..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())); } @@ -685,8 +686,7 @@ void LDesktop::PasteInDesktop(){ } } //Now go through and paste all the designated files - QString desktop = QDir::homePath()+"/"+tr("Desktop"); //translated form - if(!QFile::exists(desktop)){ desktop = QDir::homePath()+"/Desktop"; } //default/untranslated form + QString desktop = LUtils::standardDirectory(LUtils::Desktop); for(int i=0; i<files.length(); i++){ QString path = files[i].section("::::",1,-1); if(!QFile::exists(path)){ continue; } //does not exist any more - move on to next diff --git a/src-qt5/core/lumina-desktop/LSession.cpp b/src-qt5/core/lumina-desktop/LSession.cpp index 4a8a6794..7f7cc443 100644 --- a/src-qt5/core/lumina-desktop/LSession.cpp +++ b/src-qt5/core/lumina-desktop/LSession.cpp @@ -210,7 +210,7 @@ void LSession::setupSession(){ //Initialize the desktops splash.showScreen("desktop"); if(DEBUG){ qDebug() << " - Init Desktops:" << timer->elapsed();} - 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(); |