diff options
author | Ken Moore <ken@ixsystems.com> | 2017-11-17 07:28:08 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-11-17 07:28:08 -0500 |
commit | 5312b9161aa82ec8139c73b5f7dddd269120f15d (patch) | |
tree | 18e8b8de2e7dd6ebc8a300784629900fef0ffe0b /src-qt5/core/libLumina | |
parent | Minor cleanup. Get icons working on the context menu. (diff) | |
download | lumina-5312b9161aa82ec8139c73b5f7dddd269120f15d.tar.gz lumina-5312b9161aa82ec8139c73b5f7dddd269120f15d.tar.bz2 lumina-5312b9161aa82ec8139c73b5f7dddd269120f15d.zip |
Fix up the visibility of the archive options in lumina-fm.
Also fix the OpenWith launching of applications.
Diffstat (limited to 'src-qt5/core/libLumina')
-rw-r--r-- | src-qt5/core/libLumina/LuminaXDG.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp index 1991a82d..b4954a26 100644 --- a/src-qt5/core/libLumina/LuminaXDG.cpp +++ b/src-qt5/core/libLumina/LuminaXDG.cpp @@ -237,8 +237,9 @@ QString XDGDesktop::generateExec(QStringList inputfiles, QString ActionID){ //Does the app need the input files in URL or File syntax? bool URLsyntax = (exec.contains("%u") || exec.contains("%U")); //Adjust the input file formats as needed + //qDebug() << "Got inputfiles:" << inputfiles << URLsyntax; for(int i=0; i<inputfiles.length(); i++){ - bool url = inputfiles[i].contains("://") || inputfiles[i].startsWith("www") || QUrl(inputfiles[i]).isValid(); + bool url = inputfiles[i].startsWith("www") || inputfiles[i].contains("://"); //Run it through the QUrl class to catch/fix any URL syntax issues if(URLsyntax){ if(inputfiles[i].startsWith("mailto:") ){} //don't touch this syntax - already formatted @@ -246,11 +247,14 @@ QString XDGDesktop::generateExec(QStringList inputfiles, QString ActionID){ else{ inputfiles[i] = QUrl::fromLocalFile(inputfiles[i]).url(); } }else{ //if(inputfiles[i].startsWith("mailto:") ){} //don't touch this syntax - already formatted + //qDebug() << "Need local format:" << inputfiles[i] << url; if(url){ inputfiles[i] = QUrl(inputfiles[i]).toLocalFile(); } - else{ inputfiles[i] = QUrl::fromLocalFile(inputfiles[i]).toLocalFile(); } + else{ inputfiles[i] = inputfiles[i]; } //QUrl::fromLocalFile(inputfiles[i]).toLocalFile(); } } } + inputfiles.removeAll(""); //just in case any empty ones get through //Now to the exec replacements as needed + //qDebug() << "Generate Exec:" << exec << inputfiles; if(exec.contains("%f")){ if(inputfiles.isEmpty()){ exec.replace("%f",""); } else{ exec.replace("%f", "\""+inputfiles.first()+"\""); } //Note: can only take one input |