summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelsnapshotoptions.cpp
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2011-11-03 18:03:36 +0200
committerVadim ProductEngine <vsavchuk@productengine.com>2011-11-03 18:03:36 +0200
commit41e6455f7404b001696f8fe54e4353c80059c6e5 (patch)
tree9fd8c947644f0ab457aa9f6db9b6444dee88542d /indra/newview/llpanelsnapshotoptions.cpp
parentce05b9f7e5347c28780b399efa70992cb7bf5229 (diff)
STORM-1580 WIP Updated texture upload progress according to the spec.
By the way, fixed displaying upload cost.
Diffstat (limited to 'indra/newview/llpanelsnapshotoptions.cpp')
-rw-r--r--indra/newview/llpanelsnapshotoptions.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp
index 8e5ff282b3..df904b6836 100644
--- a/indra/newview/llpanelsnapshotoptions.cpp
+++ b/indra/newview/llpanelsnapshotoptions.cpp
@@ -26,6 +26,7 @@
#include "llviewerprecompiledheaders.h"
+#include "lleconomy.h"
#include "llpanel.h"
#include "llsidetraypanelcontainer.h"
@@ -41,6 +42,7 @@ class LLPanelSnapshotOptions
public:
LLPanelSnapshotOptions();
+ /*virtual*/ void onOpen(const LLSD& key);
private:
void openPanel(const std::string& panel_name);
@@ -60,6 +62,13 @@ LLPanelSnapshotOptions::LLPanelSnapshotOptions()
mCommitCallbackRegistrar.add("Snapshot.SaveToComputer", boost::bind(&LLPanelSnapshotOptions::onSaveToComputer, this));
}
+// virtual
+void LLPanelSnapshotOptions::onOpen(const LLSD& key)
+{
+ S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
+ getChild<LLUICtrl>("save_to_inventory_btn")->setLabelArg("[AMOUNT]", llformat("%d", upload_cost));
+}
+
void LLPanelSnapshotOptions::openPanel(const std::string& panel_name)
{
LLSideTrayPanelContainer* parent = dynamic_cast<LLSideTrayPanelContainer*>(getParent());
@@ -70,6 +79,7 @@ void LLPanelSnapshotOptions::openPanel(const std::string& panel_name)
}
parent->openPanel(panel_name);
+ parent->getCurrentPanel()->onOpen(LLSD());
LLFloaterSnapshot::postPanelSwitch();
}