diff options
author | Oz Linden <oz@lindenlab.com> | 2011-03-31 16:51:41 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-03-31 16:51:41 -0400 |
commit | c5ae838ce3cd8521b7b4817f153560e03a8dcc32 (patch) | |
tree | 7a489631ed3811ae52fab7bbf6b5a1075aa20e65 /indra/newview/llpreviewscript.cpp | |
parent | ba0c369aa20cdbfd7940a2435dd3c6630f0d54ae (diff) | |
parent | 4047349ade461fa6bac43da2a14c6e7689918aa1 (diff) |
pull improved avatar physics ui and other improvements from Seraph
Diffstat (limited to 'indra/newview/llpreviewscript.cpp')
-rw-r--r-- | indra/newview/llpreviewscript.cpp | 23 |
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)); + } } } |