From 41e6455f7404b001696f8fe54e4353c80059c6e5 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Thu, 3 Nov 2011 18:03:36 +0200 Subject: STORM-1580 WIP Updated texture upload progress according to the spec. By the way, fixed displaying upload cost. --- indra/newview/llassetuploadresponders.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview/llassetuploadresponders.cpp') diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index 966f5b941e..40a4d665f8 100644 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -78,6 +78,8 @@ void on_new_single_inventory_upload_complete( const LLSD& server_response, S32 upload_price) { + bool success = false; + if ( upload_price > 0 ) { // this upload costed us L$, update our balance @@ -152,6 +154,7 @@ void on_new_single_inventory_upload_complete( gInventory.updateItem(item); gInventory.notifyObservers(); + success = true; // Show the preview panel for textures and sounds to let // user know that the image (or snapshot) arrived intact. @@ -175,6 +178,13 @@ void on_new_single_inventory_upload_complete( // remove the "Uploading..." message LLUploadDialog::modalUploadFinished(); + + // Let the Snapshot floater know we have finished uploading a snapshot to inventory. + LLFloater* floater_snapshot = LLFloaterReg::findInstance("snapshot"); + if (asset_type == LLAssetType::AT_TEXTURE && floater_snapshot) + { + floater_snapshot->notify(LLSD().with("set-finished", LLSD().with("ok", success).with("msg", "inventory"))); + } } LLAssetUploadResponder::LLAssetUploadResponder(const LLSD &post_data, -- cgit v1.2.3 From bd0bd119c0bdae7e7d02014a5a843b927b9d226f Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Wed, 16 Nov 2011 20:07:55 +0200 Subject: EXP-1594 FIXED Stop the upload progress indicator if inventory texture upoload fails. --- indra/newview/llassetuploadresponders.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llassetuploadresponders.cpp') diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index 40a4d665f8..65bfc990d1 100644 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -295,6 +295,11 @@ void LLAssetUploadResponder::uploadFailure(const LLSD& content) { // remove the "Uploading..." message LLUploadDialog::modalUploadFinished(); + LLFloater* floater_snapshot = LLFloaterReg::findInstance("snapshot"); + if (floater_snapshot) + { + floater_snapshot->notify(LLSD().with("set-finished", LLSD().with("ok", false).with("msg", "inventory"))); + } std::string reason = content["state"]; // deal with L$ errors -- cgit v1.2.3