From 1739d61d1e15653b5ea82761e0b6fa237b9fbdf8 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 17 Jan 2017 12:23:15 -0500 Subject: Fix up some handling of the non-application .desktop file types: 1) Make sure the "LINK" type uses the default browser (even for local file links) 2) Make sure the "DIR" type uses the default file manager. --- src-qt5/core/lumina-open/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src-qt5/core/lumina-open') diff --git a/src-qt5/core/lumina-open/main.cpp b/src-qt5/core/lumina-open/main.cpp index 8d9f4cda..13213fa1 100644 --- a/src-qt5/core/lumina-open/main.cpp +++ b/src-qt5/core/lumina-open/main.cpp @@ -279,6 +279,8 @@ void getCMD(int argc, char ** argv, QString& binary, QString& args, QString& pat inFile = DF.url; cmd.clear(); extension = inFile.section(":",0,0); + if(extension=="file"){ extension = "http"; } //local file URL - Make sure we use the default browser for a LINK type + extension.prepend("x-scheme-handler/"); watch = DF.startupNotify || !DF.filePath.contains("/xdg/autostart/"); }else{ ShowErrorDialog( argc, argv, QString(QObject::tr("URL shortcut is missing the URL: %1")).arg(inFile) ); @@ -289,7 +291,7 @@ void getCMD(int argc, char ** argv, QString& binary, QString& args, QString& pat //This is a directory link - adjust inputs inFile = DF.path; cmd.clear(); - extension = "directory"; + extension = "inode/directory"; watch = DF.startupNotify || !DF.filePath.contains("/xdg/autostart/"); }else{ ShowErrorDialog( argc, argv, QString(QObject::tr("Directory shortcut is missing the path to the directory: %1")).arg(inFile) ); -- cgit