aboutsummaryrefslogtreecommitdiff
path: root/libLumina/LuminaUtils.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-04-25 19:02:40 -0400
committerKen Moore <ken@pcbsd.org>2015-04-25 19:02:40 -0400
commit63d9a810a1cb925d6a273d0d16772f4773771cb4 (patch)
tree5d2f13cb6265493251f9852bd36fed4c81bcb5ff /libLumina/LuminaUtils.cpp
parentFinish getting the new Favorites system cleaned up in libLumina. Now it is re... (diff)
downloadlumina-63d9a810a1cb925d6a273d0d16772f4773771cb4.tar.gz
lumina-63d9a810a1cb925d6a273d0d16772f4773771cb4.tar.bz2
lumina-63d9a810a1cb925d6a273d0d16772f4773771cb4.zip
Add support for system-defined default non-mime applications in the luminaDesktop.conf file.
New Values: session.default.[terminal, filemanager, webbrowser, email]=<binary name or path to *.desktop file>
Diffstat (limited to 'libLumina/LuminaUtils.cpp')
-rw-r--r--libLumina/LuminaUtils.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/libLumina/LuminaUtils.cpp b/libLumina/LuminaUtils.cpp
index c53edd27..8d4e0d08 100644
--- a/libLumina/LuminaUtils.cpp
+++ b/libLumina/LuminaUtils.cpp
@@ -246,7 +246,7 @@ void LUtils::LoadSystemDefaults(bool skipOS){
}
}
//Now setup the default "desktopsettings.conf" and "sessionsettings.conf" files
- QStringList deskset, sesset;
+ QStringList deskset, sesset, lopenset;
//First start with any session settings
QStringList tmp = sysDefaults.filter("session.");
sesset << "[General]"; //everything is in this section
@@ -261,7 +261,16 @@ void LUtils::LoadSystemDefaults(bool skipOS){
if(var=="session.enablenumlock"){ sesset << "EnableNumlock="+ istrue; }
else if(var=="session.playloginaudio"){ sesset << "PlayStartupAudio="+istrue; }
else if(var=="session.playlogoutaudio"){ sesset << "PlayLogoutAudio="+istrue; }
+ else if(var=="session.default.terminal"){ sesset << "default-terminal="+val; }
+ else if(var=="session.default.filemanager"){
+ sesset << "default-filemanager="+val;
+ lopenset << "directory="+val;
+ }
+ else if(var=="session.default.webbrowser"){ lopenset << "webbrowser="+val; }
+ else if(var=="session.default.email"){ lopenset << "email="+val; }
}
+ if(!lopenset.isEmpty()){ lopenset.prepend("[default]"); } //the session options exist within this set
+
//Now do any desktop settings (only works for the primary desktop at the moment)
tmp = sysDefaults.filter("desktop.");
if(!tmp.isEmpty()){deskset << "[desktop-"+screen+"]"; }
@@ -378,4 +387,5 @@ void LUtils::LoadSystemDefaults(bool skipOS){
if(setTheme){ LTHEME::setCurrentSettings( themesettings[0], themesettings[1], themesettings[2], themesettings[3], themesettings[4]); }
LUtils::writeFile(setdir+"/sessionsettings.conf", sesset, true);
LUtils::writeFile(setdir+"/desktopsettings.conf", deskset, true);
+ LUtils::writeFile(setdir+"/lumina-open.conf", lopenset, true);
}
bgstack15