summaryrefslogtreecommitdiff
path: root/indra/newview/llpreviewscript.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2011-03-30 10:36:27 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2011-03-30 10:36:27 -0400
commit865efe9af6cb353fd3b57741ba36239a21794e80 (patch)
treece4b83db3ed9af39f9364e41d04283a161b7c64a /indra/newview/llpreviewscript.cpp
parente711e8af3d5f560fd93334d44eb7be1e01f02bec (diff)
parentac4e4607b8bde0fa05af75da5f873ef42e3c5918 (diff)
merge
Diffstat (limited to 'indra/newview/llpreviewscript.cpp')
-rw-r--r--indra/newview/llpreviewscript.cpp23
1 files changed, 19 insertions, 4 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 22ff362b5a..b19bf5d234 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -956,16 +956,31 @@ void LLScriptEdCore::openInExternalEditor()
// Open it in external editor.
{
LLExternalEditor ed;
+ LLExternalEditor::EErrorCode status;
+ std::string msg;
- if (!ed.setCommand("LL_SCRIPT_EDITOR"))
+ status = ed.setCommand("LL_SCRIPT_EDITOR");
+ if (status != LLExternalEditor::EC_SUCCESS)
{
- std::string msg = "Select an editor by setting the environment variable LL_SCRIPT_EDITOR "
- "or the ExternalEditor setting"; // *TODO: localize
+ if (status == LLExternalEditor::EC_NOT_SPECIFIED) // Use custom message for this error.
+ {
+ msg = getString("external_editor_not_set");
+ }
+ else
+ {
+ msg = LLExternalEditor::getErrorMessage(status);
+ }
+
LLNotificationsUtil::add("GenericAlert", LLSD().with("MESSAGE", msg));
return;
}
- ed.run(filename);
+ status = ed.run(filename);
+ if (status != LLExternalEditor::EC_SUCCESS)
+ {
+ msg = LLExternalEditor::getErrorMessage(status);
+ LLNotificationsUtil::add("GenericAlert", LLSD().with("MESSAGE", msg));
+ }
}
}