aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lumina-open/LFileDialog.cpp4
-rw-r--r--lumina-open/main.cpp5
2 files changed, 6 insertions, 3 deletions
diff --git a/lumina-open/LFileDialog.cpp b/lumina-open/LFileDialog.cpp
index 0f2ab1cf..5214a2f1 100644
--- a/lumina-open/LFileDialog.cpp
+++ b/lumina-open/LFileDialog.cpp
@@ -35,7 +35,9 @@ void LFileDialog::setFileInfo(QString filename, QString extension, bool isFile){
//Set the labels for the file
ui->label_file->setText( this->fontMetrics().elidedText( filename, Qt::ElideMiddle, 300 ) );
if(isFile){ ui->label_extension->setText( "("+extension+")"); }
- else{ ui->label_extension->setText("("+extension+" link)"); }
+ else if(extension=="email"){ ui->label_extension->setText( QString(tr("(Email Link)")) ); }
+ else if(extension=="webbrowser"){ ui->label_extension->setText( QString(tr("(Internet URL)")) ); }
+ else{ui->label_extension->setText("("+extension+" link)"); }
fileEXT = extension;
generateAppList();
}
diff --git a/lumina-open/main.cpp b/lumina-open/main.cpp
index 5bc37dd4..233be999 100644
--- a/lumina-open/main.cpp
+++ b/lumina-open/main.cpp
@@ -108,7 +108,7 @@ QString cmdFromUser(int argc, char **argv, QString inFile, QString extension, QS
LUtils::LoadTranslation(&App,"lumina-open");
LFileDialog w;
- if(inFile.startsWith(extension)){
+ if(extension=="email" || extension=="webbrowser"){
//URL
w.setFileInfo(inFile, extension, false);
}else{
@@ -119,7 +119,7 @@ QString cmdFromUser(int argc, char **argv, QString inFile, QString extension, QS
w.show();
App.exec();
- if(!w.appSelected){ exit(1); }
+ if(!w.appSelected){ return ""; }
//Return the run path if appropriate
if(!w.appPath.isEmpty()){ path = w.appPath; }
//Just do the default application registration here for now
@@ -251,6 +251,7 @@ void getCMD(int argc, char ** argv, QString& binary, QString& args, QString& pat
//Find out the proper application to use this file/directory
useInputFile=true;
cmd = cmdFromUser(argc, argv, inFile, extension, path, showDLG);
+ if(cmd.isEmpty()){ return; }
}
}
//Now assemble the exec string (replace file/url field codes as necessary)
bgstack15