aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-05-28 11:11:14 -0400
committerKen Moore <ken@pcbsd.org>2015-05-28 11:11:14 -0400
commit3b55e80a6b742be1bd6c6a7c4e89bb14007776c2 (patch)
treef74dc583e92f4d768c371ea47ced99bd8efa66a4
parentAdd a new LUtils::imageExtensions() function, and setup the lumina-desktop pl... (diff)
downloadlumina-3b55e80a6b742be1bd6c6a7c4e89bb14007776c2.tar.gz
lumina-3b55e80a6b742be1bd6c6a7c4e89bb14007776c2.tar.bz2
lumina-3b55e80a6b742be1bd6c6a7c4e89bb14007776c2.zip
Add new options to the system-wide settings configuration file:
favorites.add: add an entry into the favorites system for a file/dir favorites.remove: remove an entry from the favorites system for a file/dir (for backwards compat later if necessary) favorites.add.ifexists: add an entry but only if the file/dir currently exists
-rw-r--r--libLumina/LuminaUtils.cpp17
-rw-r--r--lumina-desktop/defaults/luminaDesktop.conf5
2 files changed, 22 insertions, 0 deletions
diff --git a/libLumina/LuminaUtils.cpp b/libLumina/LuminaUtils.cpp
index 61194f10..776b73ed 100644
--- a/libLumina/LuminaUtils.cpp
+++ b/libLumina/LuminaUtils.cpp
@@ -321,6 +321,7 @@ void LUtils::LoadSystemDefaults(bool skipOS){
else if(var=="desktop.plugins"){ deskset << "pluginlist="+val; }
}
if(!tmp.isEmpty()){ deskset << ""; } //space between sections
+
//Now do any panel1 settings (only works for the primary desktop at the moment)
tmp = sysDefaults.filter("panel1.");
if(!tmp.isEmpty()){deskset << "[panel"+screen+".0]"; }
@@ -342,6 +343,7 @@ void LUtils::LoadSystemDefaults(bool skipOS){
else if(var=="panel1.plugins"){ deskset << "pluginlist="+val; }
}
if(!tmp.isEmpty()){ deskset << ""; } //space between sections
+
//Now do any panel2 settings (only works for the primary desktop at the moment)
tmp = sysDefaults.filter("panel2.");
if(!tmp.isEmpty()){deskset << "[panel"+screen+".1]"; }
@@ -361,6 +363,7 @@ void LUtils::LoadSystemDefaults(bool skipOS){
else if(var=="panel2.plugins"){ deskset << "pluginlist="+val; }
}
if(!tmp.isEmpty()){ deskset << ""; } //space between sections
+
//Now do any menu settings
tmp = sysDefaults.filter("menu.");
if(!tmp.isEmpty()){deskset << "[menu]"; }
@@ -372,6 +375,20 @@ void LUtils::LoadSystemDefaults(bool skipOS){
if(var=="menu.plugins"){ deskset << "itemlist="+val; }
}
if(!tmp.isEmpty()){ deskset << ""; } //space between sections
+
+ //Now do any custom favorites
+ tmp = sysDefaults.filter("favorites.");
+ if(!tmp.isEmpty()){deskset << "[menu]"; }
+ 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).toLower().simplified();
+ //Now parse the variable and put the value in the proper file
+ if(var=="favorites.add.ifexists" && QFile::exists(val)){ LUtils::addFavorite(val); }
+ else if(var=="favorites.add"){ LUtils::addFavorite(val); }
+ else if(var=="favorites.remove"){ LUtils::removeFavorite(val); }
+ }
+
//Now do any theme settings
QStringList themesettings = LTHEME::currentSettings();
//List: [theme path, colorspath, iconsname, font, fontsize]
diff --git a/lumina-desktop/defaults/luminaDesktop.conf b/lumina-desktop/defaults/luminaDesktop.conf
index 942af606..4e885a1b 100644
--- a/lumina-desktop/defaults/luminaDesktop.conf
+++ b/lumina-desktop/defaults/luminaDesktop.conf
@@ -49,3 +49,8 @@ panel1.plugins=userbutton, taskmanager, spacer, systemtray, clock, systemdashboa
#MENU SETTINGS (right-click menu)
menu.plugins=terminal, filemanager, applications, line, settings #list of menu plugins to show
+
+#FAVORITES CUSTOMIZATION
+#favorites.add=<file/dir path> #Create a favorites entry for this file/dir
+#favorites.remove=<file/dir path> #Remove a favorites entry for this file/dir
+#favorites.add.ifexists=<file/dir path> #Create a favorites entry for this file/dir if the file/dir exists
bgstack15