diff options
author | Ken Moore <moorekou@gmail.com> | 2016-06-16 11:41:51 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2016-06-16 11:41:51 -0400 |
commit | 3507d048bef5a1c3565b0f60e329a999a691a4c3 (patch) | |
tree | 78f5a0a5d95f19bbf399291bf90bcaa196f6b284 /src-qt5/core/libLumina/LuminaUtils.cpp | |
parent | Adjust the default keyboard shortcuts a bit to try and avoid conflicts betwee... (diff) | |
download | lumina-3507d048bef5a1c3565b0f60e329a999a691a4c3.tar.gz lumina-3507d048bef5a1c3565b0f60e329a999a691a4c3.tar.bz2 lumina-3507d048bef5a1c3565b0f60e329a999a691a4c3.zip |
Another round of small bug fixes/tweaks:
1) Fix up the desktopbar plugin to work with the new file locations for configs.
2) Fix up the replacement of the "~/" prefix on a file path with the users home dir.
3) Add default favorites for the ~/[Documents, Downloads, Pictures, Videos] directories.
4) Add the ability to specify quicklaunch apps within luminaDesktop.conf (almost the same as the favorites options).
5) Another couple tweaks for the Glass theme.
6) Have the non-applauncher desktop plugins fill in from the bottom-right of the screen. This provides automatic separation between the auto-generated launchers and other plugins.
7) Add a second, auto-hidden panel at the top of the primary screen by default with the desktopbar plugin there (for instance access to favorites & ~/Desktop files/dirs)
Diffstat (limited to 'src-qt5/core/libLumina/LuminaUtils.cpp')
-rw-r--r-- | src-qt5/core/libLumina/LuminaUtils.cpp | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/src-qt5/core/libLumina/LuminaUtils.cpp b/src-qt5/core/libLumina/LuminaUtils.cpp index 124de66f..3b4b6161 100644 --- a/src-qt5/core/libLumina/LuminaUtils.cpp +++ b/src-qt5/core/libLumina/LuminaUtils.cpp @@ -212,6 +212,7 @@ QString LUtils::PathToAbsolute(QString path){ return path; } QString LUtils::AppToAbsolute(QString path){ + if(path.startsWith("~/")){ path = path.replace("~/", QDir::homePath()+"/" ); } if(path.startsWith("/") || QFile::exists(path)){ return path; } if(path.endsWith(".desktop")){ //Look in the XDG dirs @@ -491,11 +492,6 @@ QStringList LUtils::listFavorites(){ fav.removeAll(""); //remove any empty lines fav.removeDuplicates(); lastRead = cur; - /*if(fav.isEmpty()){ - //Make sure the favorites dir exists, and create it if necessary - QDir dir(QDir::homePath()+"/.lumina/favorites"); - if(!dir.exists()){ dir.mkpath(QDir::homePath()+"/.lumina/favorites"); } - }*/ } return fav; @@ -767,7 +763,27 @@ void LUtils::LoadSystemDefaults(bool skipOS){ else if(var=="favorites_add"){ qDebug() << " - Adding:"; LUtils::addFavorite(val); } else if(var=="favorites_remove"){ qDebug() << " - Removing:"; LUtils::removeFavorite(val); } } - + + // -- QUICKLAUNCH -- + tmp = sysDefaults.filter("quicklaunch_"); + if(tmp.isEmpty()){ tmp = sysDefaults.filter("quicklaunch."); } + QStringList quickL; + for(int i=0; i<tmp.length(); i++){ + if(tmp[i].startsWith("#") || !tmp[i].contains("=") ){ continue; } + QString var = tmp[i].section("=",0,0).toLower().simplified(); + QString val = tmp[i].section("=",1,1).section("#",0,0).simplified(); + //Change in 0.8.5 - use "_" instead of "." within variables names - need backwards compat for a little while + if(var.contains(".")){ var.replace(".","_"); } + //Now parse the variable and put the value in the proper file + val = AppToAbsolute(val); //turn any relative files into absolute + if(var=="quicklaunch_add_ifexists" && QFile::exists(val)){ quickL << val; } + else if(var=="quicklaunch_add"){ quickL << val; } + } + if(!quickL.isEmpty()){ + if(sesset.isEmpty()){ sesset << "[General]"; } //everything is in this section + sesset << "QuicklaunchApps="+quickL.join(", "); + } + //Now do any theme settings QStringList themesettings = LTHEME::currentSettings(); //List: [theme path, colorspath, iconsname, font, fontsize] |