diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 2d0002dcd88d0feef304d6327361f5af0865c659..25e3d74ebcbf7e266cb65bcb83ae044651c30509 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -54,7 +54,7 @@ LLSnapshotFloaterView* gSnapshotFloaterView = NULL; const F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f; -const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte +const S32 MAX_POSTCARD_DATASIZE = 1572864; // 1.5 megabyte, similar to simulator limit const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512 static LLDefaultChildRegistry::Register<LLSnapshotFloaterView> r("snapshot_floater_view"); @@ -1232,6 +1232,11 @@ S32 LLFloaterSnapshot::notify(const LLSD& info) return 0; } +BOOL LLFloaterSnapshot::isWaitingState() +{ + return (impl->getStatus() == ImplBase::STATUS_WORKING); +} + BOOL LLFloaterSnapshotBase::ImplBase::updatePreviewList(bool initialized) { LLFloaterFacebook* floater_facebook = LLFloaterReg::findTypedInstance<LLFloaterFacebook>("facebook"); diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h index 1f303ea4d6532d34193e8afaf7fce11ca7563628..698273ac904ebf6af7c7d5888e29980196c9807c 100644 --- a/indra/newview/llfloatersnapshot.h +++ b/indra/newview/llfloatersnapshot.h @@ -159,6 +159,8 @@ class LLFloaterSnapshot : public LLFloaterSnapshotBase BOOL saveLocal(); static void setAgentEmail(const std::string& email); + BOOL isWaitingState(); + class Impl; friend class Impl; }; diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index 4f68c9a98ee958fc6b733f33f046a173ab3e0f12..477b3a6f8d52f19d0c74e9833332af307721aee9 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -39,6 +39,7 @@ #include "lleconomy.h" #include "llagent.h" #include "llfloaterreg.h" +#include "llfloatersnapshot.h" #include "llstatusbar.h" #include "llinventorypanel.h" #include "llsdutil.h" @@ -863,10 +864,10 @@ void LLViewerAssetUpload::HandleUploadError(LLCore::HttpStatus status, LLSD &res } // Let the Snapshot floater know we have failed uploading. - LLFloater* floater_snapshot = LLFloaterReg::findInstance("snapshot"); - if (uploadInfo->getAssetType() == LLAssetType::AT_TEXTURE && floater_snapshot && floater_snapshot->isShown()) + LLFloaterSnapshot* floater_snapshot = LLFloaterSnapshot::findInstance(); + if (uploadInfo->getAssetType() == LLAssetType::AT_IMAGE_JPEG && floater_snapshot && floater_snapshot->isWaitingState()) { - floater_snapshot->notify(LLSD().with("set-finished", LLSD().with("ok", false).with("msg", "inventory"))); + floater_snapshot->notify(LLSD().with("set-finished", LLSD().with("ok", false).with("msg", "postcard"))); } LLFloater* floater_outfit_snapshot = LLFloaterReg::findInstance("outfit_snapshot"); if (uploadInfo->getAssetType() == LLAssetType::AT_TEXTURE && floater_outfit_snapshot && floater_outfit_snapshot->isShown())