summaryrefslogtreecommitdiff
path: root/indra/newview/llpreviewscript.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-04-04 15:26:56 -0400
committerOz Linden <oz@lindenlab.com>2011-04-04 15:26:56 -0400
commit94aa24a89ee96689633fad4e7250f6f81b6b76c1 (patch)
tree58eaa9b1e6af1eea6aedffe51d758f177217f172 /indra/newview/llpreviewscript.cpp
parent1a2cc89cc59d92e768e109a1a822bfedfd9aaf01 (diff)
parente952f77a505cf274ca0b3ea95b504a51e757806a (diff)
merge changes for social-859
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));
+ }
}
}