summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llfloatersnapshot.cpp7
-rw-r--r--indra/newview/llfloatersnapshot.h2
-rw-r--r--indra/newview/llviewerassetupload.cpp7
3 files changed, 12 insertions, 4 deletions
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index 2d0002dcd8..25e3d74ebc 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 1f303ea4d6..698273ac90 100644
--- a/indra/newview/llfloatersnapshot.h
+++ b/indra/newview/llfloatersnapshot.h
@@ -159,6 +159,8 @@ public:
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 4f68c9a98e..477b3a6f8d 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())