diff options
| author | Don Kjer <don@lindenlab.com> | 2011-07-09 14:58:14 -0700 | 
|---|---|---|
| committer | Don Kjer <don@lindenlab.com> | 2011-07-09 14:58:14 -0700 | 
| commit | 7029c8ff534419a3bcfd0e5fc39a4739e4cdc19c (patch) | |
| tree | ad252385e65cd862ba42d57b282453af8cb12f73 /indra/newview | |
| parent | e63dd834ab84d740b242686d6e5315f7b47d03da (diff) | |
Fix for SH-2028.  Also fixed layout issues with new upload warning and upload price text when floater is resized.
Diffstat (limited to 'indra/newview')
| -rwxr-xr-x | indra/newview/llfloatermodelpreview.cpp | 15 | ||||
| -rw-r--r-- | indra/newview/llfloatermodelpreview.h | 2 | ||||
| -rw-r--r-- | indra/newview/llfloatermodeluploadbase.h | 2 | ||||
| -rw-r--r-- | indra/newview/llfloatermodelwizard.cpp | 3 | ||||
| -rw-r--r-- | indra/newview/llfloatermodelwizard.h | 2 | ||||
| -rwxr-xr-x | indra/newview/llmeshrepository.cpp | 6 | ||||
| -rw-r--r-- | indra/newview/lluploadfloaterobservers.h | 2 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_model_preview.xml | 40 | 
8 files changed, 50 insertions, 22 deletions
| diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index eb48955a64..1522f041c1 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -5486,18 +5486,23 @@ void LLFloaterModelPreview::toggleCalculateButton(bool visible)  	{  		std::string tbd = getString("tbd");  		childSetTextArg("weights", "[EQ]", tbd); +		childSetTextArg("weights", "[ST]", tbd); +		childSetTextArg("weights", "[SIM]", tbd);  		childSetTextArg("weights", "[PH]", tbd); -		childSetTextArg("weights", "[FEE]", tbd); +		childSetTextArg("upload_fee", "[FEE]", tbd);  	}  } -void LLFloaterModelPreview::onModelPhysicsFeeReceived(F64 physics, S32 fee, std::string upload_url) +void LLFloaterModelPreview::onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url)  {  	mUploadModelUrl = upload_url; -	childSetTextArg("weights", "[EQ]", llformat("%d", mModelPreview->mResourceCost)); -	childSetTextArg("weights", "[PH]", llformat("%.3f", physics)); -	childSetTextArg("weights", "[FEE]", llformat("%d", fee)); +	childSetTextArg("weights", "[EQ]", llformat("%0.3f", result["resource_cost"].asReal())); +	childSetTextArg("weights", "[ST]", llformat("%0.3f", result["model_streaming_cost"].asReal())); +	childSetTextArg("weights", "[SIM]", llformat("%0.3f", result["simulation_cost"].asReal())); +	childSetTextArg("weights", "[PH]", llformat("%0.3f", result["physics_cost"].asReal())); +	childSetTextArg("upload_fee", "[FEE]", llformat("%d", result["upload_price"].asInteger()));  	childSetVisible("weights", true); +	childSetVisible("upload_fee", true);  	mUploadBtn->setEnabled(mHasUploadPerm && !mUploadModelUrl.empty());  } diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index e252c9a677..fb4a39535d 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -202,7 +202,7 @@ public:  	// called when error occurs during permissions request  	/*virtual*/ void setPermissonsErrorStatus(U32 status, const std::string& reason); -	/*virtual*/ void onModelPhysicsFeeReceived(F64 physics, S32 fee, std::string upload_url); +	/*virtual*/ void onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url);  	/*virtual*/ void setModelPhysicsFeeErrorStatus(U32 status, const std::string& reason); diff --git a/indra/newview/llfloatermodeluploadbase.h b/indra/newview/llfloatermodeluploadbase.h index 6d1282dbd6..a52bc28687 100644 --- a/indra/newview/llfloatermodeluploadbase.h +++ b/indra/newview/llfloatermodeluploadbase.h @@ -41,7 +41,7 @@ public:  	virtual void onPermissionsReceived(const LLSD& result) = 0; -	virtual void onModelPhysicsFeeReceived(F64 physics, S32 fee, std::string upload_url) = 0; +	virtual void onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url) = 0;  	virtual void setModelPhysicsFeeErrorStatus(U32 status, const std::string& reason) = 0; diff --git a/indra/newview/llfloatermodelwizard.cpp b/indra/newview/llfloatermodelwizard.cpp index 7efcdb6145..b517b78e5a 100644 --- a/indra/newview/llfloatermodelwizard.cpp +++ b/indra/newview/llfloatermodelwizard.cpp @@ -488,7 +488,7 @@ void LLFloaterModelWizard::setPermissonsErrorStatus(U32 status, const std::strin  }  /*virtual*/ -void LLFloaterModelWizard::onModelPhysicsFeeReceived(F64 physics, S32 fee, std::string upload_url) +void LLFloaterModelWizard::onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url)  {  	swap_controls(mCalculateWeightsBtn, mCalculatingWeightsBtn, true); @@ -498,6 +498,7 @@ void LLFloaterModelWizard::onModelPhysicsFeeReceived(F64 physics, S32 fee, std::  	mUploadModelUrl = upload_url; +	S32 fee = result["upload_price"].asInteger();  	childSetTextArg("review_fee", "[FEE]", llformat("%d", fee));  	childSetTextArg("charged_fee", "[FEE]", llformat("%d", fee)); diff --git a/indra/newview/llfloatermodelwizard.h b/indra/newview/llfloatermodelwizard.h index ea60cf5db8..db9b605777 100644 --- a/indra/newview/llfloatermodelwizard.h +++ b/indra/newview/llfloatermodelwizard.h @@ -76,7 +76,7 @@ public:  	// called when error occurs during permissions request  	/*virtual*/ void setPermissonsErrorStatus(U32 status, const std::string& reason); -	/*virtual*/ void onModelPhysicsFeeReceived(F64 physics, S32 fee, std::string upload_url); +	/*virtual*/ void onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url);  	/*virtual*/ void setModelPhysicsFeeErrorStatus(U32 status, const std::string& reason); diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 9e4b749ea1..6389f08f29 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -369,10 +369,8 @@ public:  			if (observer)  			{ -				S32 fee = cc["upload_price"].asInteger(); -				F64 phys = cc["data"]["physics_cost"].asReal(); - -				observer->onModelPhysicsFeeReceived(phys, fee, mThread->mWholeModelUploadURL); +				cc["data"]["upload_price"] = cc["upload_price"]; +				observer->onModelPhysicsFeeReceived(cc["data"], mThread->mWholeModelUploadURL);  			}  		}  		else diff --git a/indra/newview/lluploadfloaterobservers.h b/indra/newview/lluploadfloaterobservers.h index c912c9755a..79aad282d7 100644 --- a/indra/newview/lluploadfloaterobservers.h +++ b/indra/newview/lluploadfloaterobservers.h @@ -53,7 +53,7 @@ public:  	LLWholeModelFeeObserver() { mWholeModelFeeObserverHandle.bind(this); }  	virtual ~LLWholeModelFeeObserver() {} -	virtual void onModelPhysicsFeeReceived(F64 physics, S32 fee, std::string upload_url) = 0; +	virtual void onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url) = 0;  	virtual void setModelPhysicsFeeErrorStatus(U32 status, const std::string& reason) = 0;  	LLHandle<LLWholeModelFeeObserver> getWholeModelFeeObserverHandle() const { return mWholeModelFeeObserverHandle; } diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml index a5fa7fbf0b..52377b60c5 100644 --- a/indra/newview/skins/default/xui/en/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml @@ -74,28 +74,50 @@      follows="all"/>      <text -     follows="top|left"       font="SansSerif" +	 bottom_delta="15"       left_delta="0"       name="warning_title"       text_color="Yellow" -     top_pad="10"       visible="false">       WARNING:      </text>      <text -     follows="top|left"       text_color="White"       height="50" +	 width="290" +	 top_delta="15"       left_delta="0"       name="warning_message"       parse_urls="true" -     top_pad="5"       wrap="true"       visible="false">       You will not be able to complete the final upload of this model to the Second Life servers. [secondlife:///app/floater/learn_more Find out how] to get enabled for mesh model uploads.      </text> +  <text +	height="50" +	top_delta="55" +	left_delta="0" +	name="weights" +	width="290" +	word_wrap="true"  +	> +	<text +		follows="top|left" +	>Test0: [EQ] +	</text> +	<text +	>Test: [ST] +	</text> +Streaming: [ST] +Simulation: [SIM] +Physics: [PH] +Prim equivs: [EQ] +  </text> +   + +    <tab_container      follows="right|top|bottom"      top="15" @@ -407,12 +429,14 @@    <text  	height="16" -	left="310" -	name="weights" +	left_delta="5" +	bottom_delta="30" +	name="upload_fee"  	width="300" +	follows="bottom|right"  	word_wrap="true"  -	top_pad="7"> -	    Prim equivs: [EQ] Physics: [PH] Upload fee: [FEE] L$ +	> +	    Upload fee: L$ [FEE]    </text>    <button bottom="540" left="10"  follows="bottom|left" height="20" label="Set to defaults" | 
