summaryrefslogtreecommitdiff
path: root/indra/newview/llfloateruipreview.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2011-03-25 10:47:49 -0400
committerLoren Shih <seraph@lindenlab.com>2011-03-25 10:47:49 -0400
commit44774cd265306c6d29f0a63c0876c7fa7b84311e (patch)
treebb0568b710fbcef3ac2b8b72522e0cb08967201f /indra/newview/llfloateruipreview.cpp
parentf7ec54a92f3d87ea87fc3471a29f20d623336646 (diff)
parent5d412387869012c43e9d7d40b5b8414f42353051 (diff)
Automated merge up from viewer-development into mesh-development
Diffstat (limited to 'indra/newview/llfloateruipreview.cpp')
-rw-r--r--indra/newview/llfloateruipreview.cpp21
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;
}
}