From c74f87015118a6da7036623d026fc512f46af9d5 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Thu, 18 Mar 2010 19:42:38 +0200 Subject: (EXT-5982) [FRAGMENTATION] L$ kaufen window (Buy L$) - Moved hardcoded strings in LLFloaterBuyCurrency::buyCurrency() calls to strings.xml Reviewed by Vadim Savchuk https://codereview.productengine.com/secondlife/r/56/ --HG-- branch : product-engine --- indra/newview/llassetuploadresponders.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview/llassetuploadresponders.cpp') diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index 80cf8f1d61..8441796219 100644 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -182,7 +182,10 @@ void LLAssetUploadResponder::uploadFailure(const LLSD& content) // deal with L$ errors if (reason == "insufficient funds") { - LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("uploading_costs"), LLGlobalEconomy::Singleton::getInstance()->getPriceUpload()); + S32 price = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); + LLStringUtil::format_map_t args; + args["AMOUNT"] = llformat("%d", price); + LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("uploading_costs", args), price); } else { -- cgit v1.2.3 From 7480e069349e2b3a7581267d13f52c63e459af64 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 24 Mar 2010 16:39:59 -0700 Subject: Hooked up Save As Profile Pic reviewed by Richard CC# 167 --- indra/newview/llassetuploadresponders.cpp | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'indra/newview/llassetuploadresponders.cpp') diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index 80cf8f1d61..1d92c396b4 100644 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -199,13 +199,19 @@ void LLAssetUploadResponder::uploadComplete(const LLSD& content) LLNewAgentInventoryResponder::LLNewAgentInventoryResponder(const LLSD& post_data, const LLUUID& vfile_id, - LLAssetType::EType asset_type) -: LLAssetUploadResponder(post_data, vfile_id, asset_type) + LLAssetType::EType asset_type, + boost::function callback) +: LLAssetUploadResponder(post_data, vfile_id, asset_type), + mCallback(callback) { } -LLNewAgentInventoryResponder::LLNewAgentInventoryResponder(const LLSD& post_data, const std::string& file_name, LLAssetType::EType asset_type) -: LLAssetUploadResponder(post_data, file_name, asset_type) +LLNewAgentInventoryResponder::LLNewAgentInventoryResponder(const LLSD& post_data, + const std::string& file_name, + LLAssetType::EType asset_type, + boost::function callback) +: LLAssetUploadResponder(post_data, file_name, asset_type), + mCallback(callback) { } @@ -283,6 +289,12 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content) creation_date_now); gInventory.updateItem(item); gInventory.notifyObservers(); + + if (mCallback) + { + // call the callback with the new Asset UUID + mCallback(item->getAssetUUID()); + } // Show the preview panel for textures and sounds to let // user know that the image (or snapshot) arrived intact. @@ -330,13 +342,11 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content) U32 group_perms = mPostData.has("group_mask") ? mPostData.get("group_mask" ).asInteger() : PERM_NONE; U32 next_owner_perms = mPostData.has("next_owner_mask") ? mPostData.get("next_owner_mask").asInteger() : PERM_NONE; std::string display_name = LLStringUtil::null; - LLAssetStorage::LLStoreAssetCallback callback = NULL; - void *userdata = NULL; upload_new_resource(next_file, asset_name, asset_name, - 0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE, + LLFolderType::FT_NONE, LLInventoryType::IT_NONE, next_owner_perms, group_perms, everyone_perms, display_name, - callback, expected_upload_cost, userdata); + NULL, expected_upload_cost); } } -- cgit v1.2.3