diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2020-03-18 21:07:30 +0200 |
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2020-03-18 21:07:30 +0200 |
| commit | e77134ea898cd19fdba716e46324b2945ef6826f (patch) | |
| tree | 977dafb1fb7f53e35ea809a5bf8a2f0c97b77740 /indra/newview/llpanelsnapshotoptions.cpp | |
| parent | 7d3ad90faede1d42b96311258f7f0d729d288ff1 (diff) | |
| parent | 328329fceab6b18dd7dda6f7ce9a3d4788fd7c54 (diff) | |
Merge branch 'master' into DRTVWR-486
Diffstat (limited to 'indra/newview/llpanelsnapshotoptions.cpp')
| -rw-r--r-- | indra/newview/llpanelsnapshotoptions.cpp | 11 |
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)); } |
