summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelsnapshotoptions.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2020-03-18 21:06:02 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2020-03-18 21:06:02 +0200
commitdcb6b5489d2c3cfdb13d5862f8cb29fee06745a7 (patch)
treea302137ac15519cf689e5fd719400e0875c9391d /indra/newview/llpanelsnapshotoptions.cpp
parentb8aa22d65e714f8b0cf67a5e3c64e1c01b8825f0 (diff)
parent328329fceab6b18dd7dda6f7ce9a3d4788fd7c54 (diff)
Merge branch 'master' into DRTVWR-483
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));
}