summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelsnapshotoptions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelsnapshotoptions.cpp')
-rw-r--r--indra/newview/llpanelsnapshotoptions.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp
index 1a3e946127..8cc2fbc770 100644
--- a/indra/newview/llpanelsnapshotoptions.cpp
+++ b/indra/newview/llpanelsnapshotoptions.cpp
@@ -26,19 +26,20 @@
#include "llviewerprecompiledheaders.h"
-#include "lleconomy.h"
#include "llpanel.h"
#include "llsidetraypanelcontainer.h"
#include "llfloatersnapshot.h" // FIXME: create a snapshot model
#include "llfloaterreg.h"
+#include "llagentbenefits.h"
+
+
/**
* Provides several ways to save a snapshot.
*/
class LLPanelSnapshotOptions
: public LLPanel
-, public LLEconomyObserver
{
LOG_CLASS(LLPanelSnapshotOptions);
@@ -47,7 +48,6 @@ public:
~LLPanelSnapshotOptions();
/*virtual*/ BOOL postBuild();
/*virtual*/ void onOpen(const LLSD& key);
- /*virtual*/ void onEconomyDataChange() { updateUploadCost(); }
private:
void updateUploadCost();
@@ -68,13 +68,10 @@ LLPanelSnapshotOptions::LLPanelSnapshotOptions()
mCommitCallbackRegistrar.add("Snapshot.SaveToEmail", boost::bind(&LLPanelSnapshotOptions::onSaveToEmail, this));
mCommitCallbackRegistrar.add("Snapshot.SaveToInventory", boost::bind(&LLPanelSnapshotOptions::onSaveToInventory, this));
mCommitCallbackRegistrar.add("Snapshot.SaveToComputer", boost::bind(&LLPanelSnapshotOptions::onSaveToComputer, this));
-
- LLGlobalEconomy::getInstance()->addObserver(this);
}
LLPanelSnapshotOptions::~LLPanelSnapshotOptions()
{
- LLGlobalEconomy::getInstance()->removeObserver(this);
}
// virtual
@@ -92,7 +89,7 @@ void LLPanelSnapshotOptions::onOpen(const LLSD& key)
void LLPanelSnapshotOptions::updateUploadCost()
{
- S32 upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload();
+ S32 upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
getChild<LLUICtrl>("save_to_inventory_btn")->setLabelArg("[AMOUNT]", llformat("%d", upload_cost));
}