diff options
author | Oz Linden <oz@lindenlab.com> | 2015-06-15 15:53:45 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2015-06-15 15:53:45 -0400 |
commit | 95fc2d48eced78b2aaa29b9e8b3f9410eed1ad8c (patch) | |
tree | 7748f0142e0ecbc91daa33c42a679799c4375d5e /indra/newview/llassetuploadresponders.cpp | |
parent | 96d16928600dbf3666221a19575af9330840cfd5 (diff) | |
parent | e0f5ed29daa3b2803aaec60a77bde8df7df292ee (diff) |
merge changes for 3.7.30-release
Diffstat (limited to 'indra/newview/llassetuploadresponders.cpp')
-rwxr-xr-x | indra/newview/llassetuploadresponders.cpp | 46 |
1 files changed, 38 insertions, 8 deletions
diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index e5c2d212fe..d2b1dcbf35 100755 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -226,21 +226,34 @@ void LLAssetUploadResponder::httpFailure() { // *TODO: Add adaptive retry policy? LL_WARNS() << dumpResponse() << LL_ENDL; - LLSD args; + std::string reason; if (isHttpClientErrorStatus(getStatus())) { - args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName); - args["REASON"] = "Error in upload request. Please visit " + reason = "Error in upload request. Please visit " "http://secondlife.com/support for help fixing this problem."; - LLNotificationsUtil::add("CannotUploadReason", args); } else { - args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName); - args["REASON"] = "The server is experiencing unexpected " + reason = "The server is experiencing unexpected " "difficulties."; - LLNotificationsUtil::add("CannotUploadReason", args); } + LLSD args; + args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName); + args["REASON"] = reason; + LLNotificationsUtil::add("CannotUploadReason", args); + + // unfreeze script preview + if(mAssetType == LLAssetType::AT_LSL_TEXT) + { + LLPreviewLSL* preview = LLFloaterReg::findTypedInstance<LLPreviewLSL>("preview_script", mPostData["item_id"]); + if (preview) + { + LLSD errors; + errors.append(LLTrans::getString("UploadFailed") + reason); + preview->callbackLSLCompileFailed(errors); + } + } + LLUploadDialog::modalUploadFinished(); LLFilePicker::instance().reset(); // unlock file picker when bulk upload fails } @@ -295,8 +308,22 @@ void LLAssetUploadResponder::uploadUpload(const LLSD& content) void LLAssetUploadResponder::uploadFailure(const LLSD& content) { LL_WARNS() << dumpResponse() << LL_ENDL; + + // unfreeze script preview + if(mAssetType == LLAssetType::AT_LSL_TEXT) + { + LLPreviewLSL* preview = LLFloaterReg::findTypedInstance<LLPreviewLSL>("preview_script", mPostData["item_id"]); + if (preview) + { + LLSD errors; + errors.append(LLTrans::getString("UploadFailed") + content["message"].asString()); + preview->callbackLSLCompileFailed(errors); + } + } + // remove the "Uploading..." message LLUploadDialog::modalUploadFinished(); + LLFloater* floater_snapshot = LLFloaterReg::findInstance("snapshot"); if (floater_snapshot) { @@ -622,7 +649,10 @@ void LLUpdateTaskInventoryResponder::uploadComplete(const LLSD& content) } else { - LLLiveLSLEditor* preview = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", LLSD(item_id)); + LLSD floater_key; + floater_key["taskid"] = task_id; + floater_key["itemid"] = item_id; + LLLiveLSLEditor* preview = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key); if (preview) { // Bytecode save completed |