diff options
Diffstat (limited to 'src-qt5')
-rw-r--r-- | src-qt5/core/libLumina/LDesktopUtils.cpp | 10 | ||||
-rw-r--r-- | src-qt5/core/libLumina/LDesktopUtils.h | 4 | ||||
-rw-r--r-- | src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf | 13 |
3 files changed, 25 insertions, 2 deletions
diff --git a/src-qt5/core/libLumina/LDesktopUtils.cpp b/src-qt5/core/libLumina/LDesktopUtils.cpp index 973763e8..4c87ae22 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.cpp +++ b/src-qt5/core/libLumina/LDesktopUtils.cpp @@ -337,6 +337,16 @@ void LDesktopUtils::LoadSystemDefaults(bool skipOS){ else if(var=="favorites_remove"){ qDebug() << " - Removing:"; LDesktopUtils::removeFavorite(val); } } + tmp = sysDefaults.filter("desktoplinks_"); + QString desktopFolder = QDir::homePath()+"/Desktop/"; //need to make this translatable and dynamic later + 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(); + val = LUtils::AppToAbsolute(val); //turn any relative files into absolute + if(var=="desktoplinks_add" && QFile::exists(val) && !QFile::exists(desktopFolder+val.section("/",-1)) ){ QFile::link(val, desktopFolder+val.section("/",-1)); } + } + // -- QUICKLAUNCH -- tmp = sysDefaults.filter("quicklaunch_"); if(tmp.isEmpty()){ tmp = sysDefaults.filter("quicklaunch."); } diff --git a/src-qt5/core/libLumina/LDesktopUtils.h b/src-qt5/core/libLumina/LDesktopUtils.h index b21bc78a..a9b44c67 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.h +++ b/src-qt5/core/libLumina/LDesktopUtils.h @@ -30,7 +30,7 @@ public: static QString findQuickPluginFile(QString ID); static QStringList listQuickPlugins(); //List of valid ID's static QStringList infoQuickPlugin(QString ID); //Returns: [Name, Description, Icon] - + //Various functions for the favorites sub-system // Formatting Note: "<name>::::[dir/app/<mimetype>]::::<path>" // the <name> field might not be used for "app" flagged entries @@ -40,7 +40,7 @@ public: static bool addFavorite(QString path, QString name = ""); static void removeFavorite(QString path); static void upgradeFavorites(int fromoldversionnumber); - + //Load the default setup for the system static void LoadSystemDefaults(bool skipOS = false); static bool checkUserFiles(QString lastversion); //returns true if something changed diff --git a/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf b/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf index f9481459..e453c0b8 100644 --- a/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf +++ b/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf @@ -97,6 +97,19 @@ favorites_add_ifexists=~/Videos #quicklaunch_add=<file/dir path> #Create a quicklaunch shortcut for this file/dir #quicklaunch_add_ifexists=<file/dir path> #Create a quicklaunch shortcut for this file/dir if the file/dir exists +#Desktop Folder symlinks +#desktoplinks_add=<file/dir path> +desktoplinks_add=firefox.desktop +desktoplinks_add=chromium-browser.desktop +desktoplinks_add=qupzilla.desktop +desktoplinks_add=thunderbird.desktop +desktoplinks_add=trojita.desktop +desktoplinks_add=vlc.desktop +desktoplinks_add=pccontrol.desktop +desktoplinks_add=lthemeengine.desktop +desktoplinks_add=lumina-config.desktop +desktoplinks_add=appcafe.desktop +desktoplinks_add=handbook.desktop #Generic scripts/utilities to run for any additional setup procedures # These are always run after all other settings are saved #Format: usersetup_run=<generic command to run> |