aboutsummaryrefslogtreecommitdiff
path: root/lumina-open/main.cpp
diff options
context:
space:
mode:
authorChristopher Roy Bratusek <nano@jpberlin.de>2014-10-07 19:02:43 +0200
committerChristopher Roy Bratusek <nano@jpberlin.de>2014-10-07 19:02:43 +0200
commit91cbfe642b48aba712f4f60a827bfbef80aca125 (patch)
tree29b0b5be3a0eb0b3e53d144bf6ee1e1ab460aa86 /lumina-open/main.cpp
parentClean up the new global.h usage in all the Lumina subprojects. (diff)
downloadlumina-91cbfe642b48aba712f4f60a827bfbef80aca125.tar.gz
lumina-91cbfe642b48aba712f4f60a827bfbef80aca125.tar.bz2
lumina-91cbfe642b48aba712f4f60a827bfbef80aca125.zip
make file-manager user-chooseable
Diffstat (limited to 'lumina-open/main.cpp')
-rw-r--r--lumina-open/main.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lumina-open/main.cpp b/lumina-open/main.cpp
index c34a2c6a..eef32589 100644
--- a/lumina-open/main.cpp
+++ b/lumina-open/main.cpp
@@ -23,6 +23,7 @@
#include <QColor>
#include <QFont>
#include <QTextCodec>
+#include <QSettings>
#include "LFileDialog.h"
@@ -73,11 +74,12 @@ void showOSD(int argc, char **argv, QString message){
}
QString cmdFromUser(int argc, char **argv, QString inFile, QString extension, QString& path, bool showDLG=false){
+ QSettings::setPath(QSettings::NativeFormat, QSettings::UserScope, QDir::homePath()+"/.lumina");
//First check to see if there is a default for this extension
QString defApp = LFileDialog::getDefaultApp(extension);
if(extension=="directory" && defApp.isEmpty() && !showDLG){
//Just use the Lumina File Manager
- return "lumina-fm";
+ return QSettings("LuminaDE", "desktopsettings").value("default-filemanager","lumina-fm").toString();
}else if( !defApp.isEmpty() && !showDLG ){
bool ok = false;
XDGDesktop DF = LXDG::loadDesktopFile(defApp, ok);
@@ -137,6 +139,7 @@ QString cmdFromUser(int argc, char **argv, QString inFile, QString extension, QS
void getCMD(int argc, char ** argv, QString& binary, QString& args, QString& path){
//Get the input file
QString inFile;
+ QSettings::setPath(QSettings::NativeFormat, QSettings::UserScope, QDir::homePath()+"/.lumina");
bool showDLG = false; //flag to bypass any default application setting
if(argc > 1){
for(int i=1; i<argc; i++){
@@ -197,7 +200,7 @@ void getCMD(int argc, char ** argv, QString& binary, QString& args, QString& pat
QString cmd;
bool useInputFile = false;
if(extension=="directory" && !showDLG){
- cmd = "lumina-fm";
+ cmd = QSettings("LuminaDE", "desktopsettings").value("default-filemanager","lumina-fm").toString();
useInputFile=true;
}else if(extension=="desktop" && !showDLG){
bool ok = false;
bgstack15