Surround Windows commands in quotes
When external editors are launched in Windows OS, the command is surrounded by quotes. This commit fixes the translation of commands for use by the multiple custom external editors feature so that the translated commands are also surrounded by quotes.
This commit is contained in:
@@ -912,7 +912,7 @@ void Options::readFromFile(Glib::ustring fname)
|
||||
if (editorToSendTo == 1) {
|
||||
externalEditorIndex = externalEditors.size();
|
||||
}
|
||||
externalEditors.push_back(ExternalEditor("GIMP", executable, "gimp"));
|
||||
externalEditors.push_back(ExternalEditor("GIMP", "\"" + executable + "\"", "gimp"));
|
||||
} else {
|
||||
for (auto ver = 12; ver >= 0; --ver) {
|
||||
executable = Glib::build_filename(gimpDir, "bin", Glib::ustring::compose(Glib::ustring("gimp-2.%1.exe"), ver));
|
||||
@@ -920,7 +920,7 @@ void Options::readFromFile(Glib::ustring fname)
|
||||
if (editorToSendTo == 1) {
|
||||
externalEditorIndex = externalEditors.size();
|
||||
}
|
||||
externalEditors.push_back(ExternalEditor("GIMP", executable, "gimp"));
|
||||
externalEditors.push_back(ExternalEditor("GIMP", "\"" + executable + "\"", "gimp"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -935,7 +935,7 @@ void Options::readFromFile(Glib::ustring fname)
|
||||
if (editorToSendTo == 2) {
|
||||
externalEditorIndex = externalEditors.size();
|
||||
}
|
||||
externalEditors.push_back(ExternalEditor("Photoshop", executable, ""));
|
||||
externalEditors.push_back(ExternalEditor("Photoshop", "\"" + executable + "\"", ""));
|
||||
}
|
||||
|
||||
if (keyFile.has_key("External Editor", "CustomEditor")) {
|
||||
@@ -944,7 +944,7 @@ void Options::readFromFile(Glib::ustring fname)
|
||||
if (editorToSendTo == 3) {
|
||||
externalEditorIndex = externalEditors.size();
|
||||
}
|
||||
externalEditors.push_back(ExternalEditor("-", executable, ""));
|
||||
externalEditors.push_back(ExternalEditor("-", "\"" + executable + "\"", ""));
|
||||
}
|
||||
}
|
||||
#elif defined __APPLE__
|
||||
|
Reference in New Issue
Block a user