diff options
author | Oz Linden <oz@lindenlab.com> | 2011-03-29 19:21:41 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-03-29 19:21:41 -0400 |
commit | 7cb4f2d87dc8619d8ad86cb82f6687f1a9821a69 (patch) | |
tree | 76eb80864288acd35fa7b0892a5aba96c13a860c /indra/newview/llfloateruipreview.cpp | |
parent | 39d83cb74f5978e926ff02dcb20a64802429bc69 (diff) | |
parent | 9c0757511ec4ed12b47c6d3fd2ef20fca6828a6e (diff) |
merge changes for storm-1086
Diffstat (limited to 'indra/newview/llfloateruipreview.cpp')
-rw-r--r-- | indra/newview/llfloateruipreview.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp index 11b3379814..0d8601410a 100644 --- a/indra/newview/llfloateruipreview.cpp +++ b/indra/newview/llfloateruipreview.cpp @@ -1037,18 +1037,29 @@ void LLFloaterUIPreview::onClickEditFloater() cmd_override = bin + " " + args; } } - if (!mExternalEditor.setCommand("LL_XUI_EDITOR", cmd_override)) + + LLExternalEditor::EErrorCode status = mExternalEditor.setCommand("LL_XUI_EDITOR", cmd_override); + if (status != LLExternalEditor::EC_SUCCESS) { - std::string warning = "Select an editor by setting the environment variable LL_XUI_EDITOR " - "or the ExternalEditor setting or specifying its path in the \"Editor Path\" field."; + std::string warning; + + if (status == LLExternalEditor::EC_NOT_SPECIFIED) // Use custom message for this error. + { + warning = getString("ExternalEditorNotSet"); + } + else + { + warning = LLExternalEditor::getErrorMessage(status); + } + popupAndPrintWarning(warning); return; } // Run the editor. - if (!mExternalEditor.run(file_path)) + if (mExternalEditor.run(file_path) != LLExternalEditor::EC_SUCCESS) { - popupAndPrintWarning("Failed to run editor"); + popupAndPrintWarning(LLExternalEditor::getErrorMessage(status)); return; } } |