From 71dbe9a953f86aba727cc27e7df7313984951c34 Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Sun, 17 Mar 2024 13:26:58 -0400 Subject: [PATCH] Revert "opensim currency support" This reverts commit b214f794ce1905b20e42a70b51b885118e821da4. --- indra/llcommon/CMakeLists.txt | 2 - indra/llcommon/llcurrencywrapper.cpp | 70 ------------------- indra/llcommon/llcurrencywrapper.h | 65 ----------------- indra/llinventory/lltransactionflags.cpp | 7 +- indra/llui/llbutton.cpp | 7 -- indra/llui/llbutton.h | 2 - indra/llui/llfloater.cpp | 7 -- indra/llui/llfloater.h | 2 - indra/llui/lltextbox.cpp | 6 -- indra/llui/lltextbox.h | 2 - indra/llui/lluistring.cpp | 4 -- indra/llui/lluistring.h | 2 +- indra/newview/llcurrencyuimanager.cpp | 11 +-- indra/newview/llfloaterauction.cpp | 3 +- indra/newview/llfloaterbuycurrency.cpp | 64 +++-------------- indra/newview/llpanelgroupcreate.cpp | 4 +- indra/newview/llpanelgrouplandmoney.cpp | 11 ++- indra/newview/llstartup.cpp | 13 ---- indra/newview/llstatusbar.cpp | 9 +-- indra/newview/llstatusbar.h | 5 +- indra/newview/llviewermessage.cpp | 5 +- indra/newview/llviewerregion.cpp | 13 ---- .../skins/default/xui/en/notifications.xml | 19 ----- 23 files changed, 29 insertions(+), 304 deletions(-) delete mode 100644 indra/llcommon/llcurrencywrapper.cpp delete mode 100644 indra/llcommon/llcurrencywrapper.h diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index a192f3b6034..41d56b209bd 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -39,7 +39,6 @@ set(llcommon_SOURCE_FILES llcoros.cpp llcrc.cpp llcriticaldamp.cpp - llcurrencywrapper.cpp lldate.cpp lldeadmantimer.cpp lldependencies.cpp @@ -150,7 +149,6 @@ set(llcommon_HEADER_FILES llcoros.h llcrc.h llcriticaldamp.h - llcurrencywrapper.h lldate.h lldeadmantimer.h lldefs.h diff --git a/indra/llcommon/llcurrencywrapper.cpp b/indra/llcommon/llcurrencywrapper.cpp deleted file mode 100644 index 65dbabe875c..00000000000 --- a/indra/llcommon/llcurrencywrapper.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/** - * @file llcurrencywrapper.cpp - * @brief Currency wrapping class from the tea viewer helper library - * - * Copyright (C) 2012 arminweatherwax (at) lavabit.com - * Copyright (C) 2015 Cinder Roxley <cinder@sdf.org> - * You can use it under the following license: - * - * Boost Software License - Version 1.0 - August 17th, 2003 - * - * Permission is hereby granted, free of charge, to any person or organization - * obtaining a copy of the software and accompanying documentation covered by - * this license (the "Software") to use, reproduce, display, distribute, - * execute, and transmit the Software, and to prepare derivative works of the - * Software, and to permit third-parties to whom the Software is furnished to - * do so, all subject to the following: - * - * The copyright notices in the Software and this entire statement, including - * the above license grant, this restriction and the following disclaimer, - * must be included in all copies of the Software, in whole or in part, and - * all derivative works of the Software, unless such copies or derivative - * works are solely in the form of machine-executable object code generated by - * a source language processor. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT - * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE - * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include "llcurrencywrapper.h" -#include <boost/algorithm/string.hpp> - - -void LLCurrencyWrapper::setCurrency(const std::string& currency) -{ - mCurrency = currency; - mChangedSignal(); -} - - -void LLCurrencyWrapper::setHomeCurrency(const std::string& currency) -{ - mHomeCurrency = currency; - setCurrency(currency); -} - -std::string LLCurrencyWrapper::wrapCurrency(const std::string& to_substitute) const -{ - return boost::algorithm::replace_all_copy(to_substitute, "L$", mCurrency); -} - -void LLCurrencyWrapper::wrapCurrency(std::string& to_substitute) const -{ - boost::algorithm::replace_all(to_substitute, "L$", mCurrency); -} - -boost::signals2::connection LLCurrencyWrapper::addCurrencyChangedCb(currency_changed_callback_t cb) -{ - return mChangedSignal.connect(cb); -} - -void LLCurrencyWrapper::removeCurrencyChangedCb(boost::signals2::connection cb) -{ - mChangedSignal.disconnect(cb); -} - diff --git a/indra/llcommon/llcurrencywrapper.h b/indra/llcommon/llcurrencywrapper.h deleted file mode 100644 index b2b38a5af1f..00000000000 --- a/indra/llcommon/llcurrencywrapper.h +++ /dev/null @@ -1,65 +0,0 @@ -/** - * @file llcurrencywrapper.h - * @brief Currency wrapping class from the tea viewer helper library - * - * Copyright (C) 2012 arminweatherwax (at) lavabit.com - * Copyright (C) 2015 Cinder Roxley <cinder@sdf.org> - * You can use it under the following license: - * - * Boost Software License - Version 1.0 - August 17th, 2003 - * - * Permission is hereby granted, free of charge, to any person or organization - * obtaining a copy of the software and accompanying documentation covered by - * this license (the "Software") to use, reproduce, display, distribute, - * execute, and transmit the Software, and to prepare derivative works of the - * Software, and to permit third-parties to whom the Software is furnished to - * do so, all subject to the following: - * - * The copyright notices in the Software and this entire statement, including - * the above license grant, this restriction and the following disclaimer, - * must be included in all copies of the Software, in whole or in part, and - * all derivative works of the Software, unless such copies or derivative - * works are solely in the form of machine-executable object code generated by - * a source language processor. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT - * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE - * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#ifndef LL_CURRENCYWRAPPER_H -#define LL_CURRENCYWRAPPER_H - -#include "llsingleton.h" -#include <string> -#include <boost/signals2.hpp> - -class LLCurrencyWrapper final : public LLSingleton<LLCurrencyWrapper> -{ - LLSINGLETON_EMPTY_CTOR(LLCurrencyWrapper); - -public: - void setCurrency(const std::string& currency); - void setHomeCurrency(const std::string& currency); - const std::string& getCurrency() const { return mCurrency; } - const std::string& getHomeCurrency() const { return mHomeCurrency; } - std::string wrapCurrency(const std::string& to_substitute) const; - void wrapCurrency(std::string& to_substitute) const; - - using currency_changed_signal_t = boost::signals2::signal<void()>; - using currency_changed_callback_t = std::function<void()>; - - boost::signals2::connection addCurrencyChangedCb(currency_changed_callback_t cb); - void removeCurrencyChangedCb(boost::signals2::connection cb); - -private: - std::string mCurrency; - std::string mHomeCurrency; - currency_changed_signal_t mChangedSignal; -}; - -#endif //LL_CURRENCYWRAPPER_H diff --git a/indra/llinventory/lltransactionflags.cpp b/indra/llinventory/lltransactionflags.cpp index b3535db47a3..e21f29df41f 100644 --- a/indra/llinventory/lltransactionflags.cpp +++ b/indra/llinventory/lltransactionflags.cpp @@ -30,7 +30,6 @@ #include "lluuid.h" #include "lltransactionflags.h" #include "lltransactiontypes.h" -#include "llcurrencywrapper.h" const U8 TRANSACTION_FLAGS_NONE = 0; const U8 TRANSACTION_FLAG_SOURCE_GROUP = 1; @@ -112,7 +111,7 @@ std::string build_transfer_message_to_source( // *NOTE: Do not change these strings! The viewer matches // them in llviewermessage.cpp to perform localization. // If you need to make changes, add a new, localizable message. JC - ostr << LLCurrencyWrapper::instance().wrapCurrency("You paid L$") << amount; + ostr << "You paid L$" << amount; switch(transaction_type) { case TRANS_GROUP_CREATE: @@ -130,7 +129,7 @@ std::string build_transfer_message_to_source( } else { - ostr << "You paid " << dest_name << LLCurrencyWrapper::instance().wrapCurrency(" L$") << amount; + ostr << "You paid " << dest_name << " L$" << amount; append_reason(ostr, transaction_type, description); } ostr << "."; @@ -161,7 +160,7 @@ std::string build_transfer_message_to_destination( // *NOTE: Do not change these strings! The viewer matches // them in llviewermessage.cpp to perform localization. // If you need to make changes, add a new, localizable message. JC - ostr << source_name << LLCurrencyWrapper::instance().wrapCurrency(" paid you L$") << amount; + ostr << source_name << " paid you L$" << amount; append_reason(ostr, transaction_type, description); ostr << "."; return ostr.str(); diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index e6820ae6894..d1c3ac1d553 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -627,13 +627,6 @@ BOOL LLButton::handleHover(S32 x, S32 y, MASK mask) return TRUE; } -void LLButton::updateCurrencySymbols() -{ - mUnselectedLabel.dirty(); - mSelectedLabel.dirty(); - mDisabledSelectedLabel.dirty(); -} - void LLButton::getOverlayImageSize(S32& overlay_width, S32& overlay_height) { overlay_width = mImageOverlay->getWidth(); diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index 745634fea77..1d4f0b1da36 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -289,8 +289,6 @@ class LLButton void setAutoResize(bool auto_resize) { mAutoResize = auto_resize; } - void updateCurrencySymbols(); - protected: LLPointer<LLUIImage> getImageUnselected() const { return mImageUnselected; } LLPointer<LLUIImage> getImageSelected() const { return mImageSelected; } diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 5ea6d59b5fe..bae66a518b5 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -2239,13 +2239,6 @@ void LLFloater::updateTransparency(ETypeTransparency transparency_type) updateTransparency(this, transparency_type); } -void LLFloater::updateCurrencySymbol() -{ - mTitle.dirty(); - mShortTitle.dirty(); - applyTitle(); -} - void LLFloater::setCanMinimize(BOOL can_minimize) { // if removing minimize/restore button programmatically, diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index d882a8fd119..5a40c42a085 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -403,8 +403,6 @@ class LLFloater : public LLPanel, public LLInstanceTracker<LLFloater> void updateTransparency(ETypeTransparency transparency_type); - void updateCurrencySymbol(); - void enableResizeCtrls(bool enable, bool width = true, bool height = true); bool isPositioning(LLFloaterEnums::EOpenPositioning p) const { return (p == mPositioning); } diff --git a/indra/llui/lltextbox.cpp b/indra/llui/lltextbox.cpp index 65a3c22c9d8..47bc268e4f8 100644 --- a/indra/llui/lltextbox.cpp +++ b/indra/llui/lltextbox.cpp @@ -166,12 +166,6 @@ BOOL LLTextBox::setTextArg( const std::string& key, const LLStringExplicit& text return TRUE; } -void LLTextBox::updateCurrencySymbols() -{ - mLabel.dirty(); - mText.dirty(); - LLTextBase::setText(mText.getString()); -} void LLTextBox::reshapeToFitText(BOOL called_from_parent) { diff --git a/indra/llui/lltextbox.h b/indra/llui/lltextbox.h index 2a39b6d7f18..d28a1b573a6 100644 --- a/indra/llui/lltextbox.h +++ b/indra/llui/lltextbox.h @@ -69,8 +69,6 @@ class LLTextBox : /*virtual*/ LLSD getValue() const; /*virtual*/ BOOL setTextArg( const std::string& key, const LLStringExplicit& text ); - void updateCurrencySymbols(); - void setShowCursorHand(bool show_cursor) { mShowCursorHand = show_cursor; } protected: diff --git a/indra/llui/lluistring.cpp b/indra/llui/lluistring.cpp index 5e1ced247df..ab032d79158 100644 --- a/indra/llui/lluistring.cpp +++ b/indra/llui/lluistring.cpp @@ -27,7 +27,6 @@ #include "linden_common.h" #include "lluistring.h" -#include "llcurrencywrapper.h" #include "llfasttimer.h" #include "llsd.h" #include "lltrans.h" @@ -146,9 +145,6 @@ void LLUIString::updateResult() const combined_args.insert(mArgs->begin(), mArgs->end()); } LLStringUtil::format(mResult, combined_args); - // Impact on lag: at average frame time 15.9 ms - // FTM_UI_STRING 0.01ms both with/without wrapCurrency so bite me. - LLCurrencyWrapper::instance().wrapCurrency(mResult); } void LLUIString::updateWResult() const diff --git a/indra/llui/lluistring.h b/indra/llui/lluistring.h index a407bd5c734..865881b99d1 100644 --- a/indra/llui/lluistring.h +++ b/indra/llui/lluistring.h @@ -95,10 +95,10 @@ class LLUIString void insert(S32 charidx, const LLWString& wchars); void replace(S32 charidx, llwchar wc); +private: // something changed, requiring reformatting of strings void dirty(); -private: std::string& getUpdatedResult() const { if (mNeedsResult) { updateResult(); } return mResult; } LLWString& getUpdatedWResult() const{ if (mNeedsWResult) { updateWResult(); } return mWResult; } diff --git a/indra/newview/llcurrencyuimanager.cpp b/indra/newview/llcurrencyuimanager.cpp index 5ddfd521a49..4c0a5cf1832 100644 --- a/indra/newview/llcurrencyuimanager.cpp +++ b/indra/newview/llcurrencyuimanager.cpp @@ -44,7 +44,6 @@ #include "llviewchildren.h" #include "llxmlrpctransaction.h" #include "llviewernetwork.h" -#include "llviewerregion.h" #include "llpanel.h" #include "stringize.h" @@ -285,15 +284,17 @@ void LLCurrencyUIManager::Impl::finishCurrencyBuy() void LLCurrencyUIManager::Impl::startTransaction(TransactionType type, const char* method, LLXMLRPCValue params) { - LLViewerRegion* region = gAgent.getRegion(); - const std::string transaction_uri = (region != nullptr) ? region->getBuyCurrencyServerURL() - : LLGridManager::getInstance()->getHelperURI() + "currency.php"; + static std::string transactionURI; + if (transactionURI.empty()) + { + transactionURI = LLGridManager::getInstance()->getHelperURI() + "currency.php"; + } delete mTransaction; mTransactionType = type; mTransaction = new LLXMLRPCTransaction( - transaction_uri, + transactionURI, method, params, false /* don't use gzip */ diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp index ce3d997c45c..91af85c1e98 100644 --- a/indra/newview/llfloaterauction.cpp +++ b/indra/newview/llfloaterauction.cpp @@ -39,7 +39,6 @@ #include "llagent.h" #include "llassetstorage.h" #include "llcombobox.h" -#include "llcurrencywrapper.h" #include "llestateinfomodel.h" #include "llmimetypes.h" #include "llnotifications.h" @@ -499,7 +498,7 @@ void LLFloaterAuction::doSellToAnyone() body["sale_price"] = parcelp->getArea(); // Sell for L$1 per square meter body["auth_buyer_id"] = LLUUID::null; // To anyone - LL_INFOS() << LLCurrencyWrapper::instance().wrapCurrency("Sending parcel update to sell to anyone for L$1 via capability to: ") + LL_INFOS() << "Sending parcel update to sell to anyone for L$1 via capability to: " << mParcelUpdateCapUrl << LL_ENDL; LLCoreHttpUtil::HttpCoroutineAdapter::messageHttpPost(mParcelUpdateCapUrl, body, diff --git a/indra/newview/llfloaterbuycurrency.cpp b/indra/newview/llfloaterbuycurrency.cpp index e3e9b8044c9..5876969c40c 100644 --- a/indra/newview/llfloaterbuycurrency.cpp +++ b/indra/newview/llfloaterbuycurrency.cpp @@ -28,8 +28,6 @@ #include "llfloaterbuycurrency.h" -#include "llcurrencywrapper.h" - // viewer includes #include "llcurrencyuimanager.h" #include "llfloater.h" @@ -40,7 +38,6 @@ #include "llstatusbar.h" #include "lltextbox.h" #include "llviewchildren.h" -#include "llviewernetwork.h" #include "llviewerwindow.h" #include "lluictrlfactory.h" #include "llweb.h" @@ -56,6 +53,8 @@ class LLFloaterBuyCurrencyUI final LLFloaterBuyCurrencyUI(const LLSD& key); virtual ~LLFloaterBuyCurrencyUI(); + +public: LLViewChildren mChildren; LLCurrencyUIManager mManager; @@ -63,13 +62,13 @@ class LLFloaterBuyCurrencyUI final S32 mTargetPrice; S32 mRequiredAmount; +public: void noTarget(); void target(const std::string& name, S32 price); virtual BOOL postBuild(); void updateUI(); - void updateCurrencySymbols(); void collapsePanels(bool collapse); virtual void draw(); @@ -77,8 +76,6 @@ class LLFloaterBuyCurrencyUI final void onClickBuy(); void onClickCancel(); - - boost::signals2::connection mCurrencyChangedSlot; }; LLFloater* LLFloaterBuyCurrency::buildFloater(const LLSD& key) @@ -98,8 +95,6 @@ LLFloaterBuyCurrencyUI::LLFloaterBuyCurrencyUI(const LLSD& key) LLFloaterBuyCurrencyUI::~LLFloaterBuyCurrencyUI() { - if (mCurrencyChangedSlot.connected()) - mCurrencyChangedSlot.disconnect(); } @@ -139,17 +134,10 @@ BOOL LLFloaterBuyCurrencyUI::postBuild() getChild<LLUICtrl>("buy_btn")->setCommitCallback( boost::bind(&LLFloaterBuyCurrencyUI::onClickBuy, this)); getChild<LLUICtrl>("cancel_btn")->setCommitCallback( boost::bind(&LLFloaterBuyCurrencyUI::onClickCancel, this)); - if (LLGridManager::instance().isInOpenSim()) - { - getChild<LLTextBox>("currency_links")->setText(LLStringExplicit("")); - } center(); updateUI(); - - mCurrencyChangedSlot = LLCurrencyWrapper::instance().addCurrencyChangedCb( - std::bind(&LLFloaterBuyCurrencyUI::updateCurrencySymbols, this)); return TRUE; } @@ -197,15 +185,7 @@ void LLFloaterBuyCurrencyUI::updateUI() LLSD args; args["TITLE"] = getString("info_cannot_buy"); args["MESSAGE"] = mManager.errorMessage(); - if( !LLGridManager::getInstance()->isInSecondlife() ) - { - args["LINK"] = mManager.errorURI(); - LLNotificationsUtil::add("CouldNotBuyCurrencyOS", args); - } - else - { - LLNotificationsUtil::add("CouldNotBuyCurrency", args); - } + LLNotificationsUtil::add("CouldNotBuyCurrency", args); mManager.clearError(); closeFloater(); } @@ -260,16 +240,6 @@ void LLFloaterBuyCurrencyUI::updateUI() getChildView("getting_data")->setVisible( !mManager.canBuy() && !hasError && !getChildView("currency_est")->getVisible()); } -void LLFloaterBuyCurrencyUI::updateCurrencySymbols() -{ - updateCurrencySymbol(); - getChild<LLTextBox>("info_need_more")->updateCurrencySymbols(); - getChild<LLTextBox>("info_buying")->updateCurrencySymbols(); - getChild<LLTextBox>("currency_label")->updateCurrencySymbols(); - getChild<LLTextBox>("purchase_warning_repurchase")->updateCurrencySymbols(); - getChild<LLTextBox>("purchase_warning_notenough")->updateCurrencySymbols(); -} - void LLFloaterBuyCurrencyUI::collapsePanels(bool collapse) { LLLayoutPanel* price_panel = getChild<LLLayoutPanel>("layout_panel_price"); @@ -319,33 +289,15 @@ LLFetchAvatarPaymentInfo* LLFloaterBuyCurrency::sPropertiesRequest = NULL; // static void LLFloaterBuyCurrency::buyCurrency() { - if (LLGridManager::instance().isInOpenSim()) - { - LLFloaterBuyCurrencyUI* ui = LLFloaterReg::showTypedInstance<LLFloaterBuyCurrencyUI>("buy_currency"); - ui->noTarget(); - ui->updateUI(); - } - else - { - delete sPropertiesRequest; - sPropertiesRequest = new LLFetchAvatarPaymentInfo(false); - } + delete sPropertiesRequest; + sPropertiesRequest = new LLFetchAvatarPaymentInfo(false); } // static void LLFloaterBuyCurrency::buyCurrency(const std::string& name, S32 price) { - if (LLGridManager::instance().isInOpenSim()) - { - LLFloaterBuyCurrencyUI* ui = LLFloaterReg::showTypedInstance<LLFloaterBuyCurrencyUI>("buy_currency"); - ui->target(name, price); - ui->updateUI(); - } - else - { - delete sPropertiesRequest; - sPropertiesRequest = new LLFetchAvatarPaymentInfo(true, name, price); - } + delete sPropertiesRequest; + sPropertiesRequest = new LLFetchAvatarPaymentInfo(true, name, price); } // static diff --git a/indra/newview/llpanelgroupcreate.cpp b/indra/newview/llpanelgroupcreate.cpp index 164460388c5..aae6eda5b8d 100644 --- a/indra/newview/llpanelgroupcreate.cpp +++ b/indra/newview/llpanelgroupcreate.cpp @@ -27,8 +27,6 @@ #include "llpanelgroupcreate.h" -#include "llcurrencywrapper.h" - // UI includes #include "llbutton.h" #include "llcheckboxctrl.h" @@ -166,7 +164,7 @@ void LLPanelGroupCreate::addMembershipRow(const std::string &name) } item_params.columns.add(cell_params); cell_params.column = "clmn_price"; - cell_params.value = LLCurrencyWrapper::instance().wrapCurrency(llformat("L$ %d",LLAgentBenefitsMgr::get(name).getCreateGroupCost())); + cell_params.value = llformat("L$ %d",LLAgentBenefitsMgr::get(name).getCreateGroupCost()); item_params.columns.add(cell_params); mMembershipList->addRow(item_params); } diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp index 3fac5f46f6a..ab9d3e88f86 100644 --- a/indra/newview/llpanelgrouplandmoney.cpp +++ b/indra/newview/llpanelgrouplandmoney.cpp @@ -30,7 +30,6 @@ #include "lluiconstants.h" #include "roles_constants.h" -#include "llcurrencywrapper.h" #include "llparcel.h" #include "llqueryflags.h" @@ -845,7 +844,7 @@ void LLPanelGroupLandMoney::processPlacesReply(LLMessageSystem* msg, void**) group_id_map_t::iterator found_it = sGroupIDs.find(group_id); if(found_it == sGroupIDs.end()) { - LL_INFOS() << LLCurrencyWrapper::instance().wrapCurrency("Group Panel Land L$ ") << group_id << " no longer in existence." + LL_INFOS() << "Group Panel Land L$ " << group_id << " no longer in existence." << LL_ENDL; return; } @@ -1137,7 +1136,7 @@ void LLPanelGroupLandMoney::processGroupAccountDetailsReply(LLMessageSystem* msg msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); if (gAgent.getID() != agent_id) { - LL_WARNS() << LLCurrencyWrapper::instance().wrapCurrency("Got group L$ history reply for another agent!") << LL_ENDL; + LL_WARNS() << "Got group L$ history reply for another agent!" << LL_ENDL; return; } @@ -1314,7 +1313,7 @@ void LLPanelGroupLandMoney::processGroupAccountTransactionsReply(LLMessageSystem msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); if (gAgent.getID() != agent_id) { - LL_WARNS() << LLCurrencyWrapper::instance().wrapCurrency("Got group L$ history reply for another agent!") << LL_ENDL; + LL_WARNS() << "Got group L$ history reply for another agent!" << LL_ENDL; return; } @@ -1494,7 +1493,7 @@ void LLPanelGroupLandMoney::processGroupAccountSummaryReply(LLMessageSystem* msg msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); if (gAgent.getID() != agent_id) { - LL_WARNS() << LLCurrencyWrapper::instance().wrapCurrency("Got group L$ history reply for another agent!") << LL_ENDL; + LL_WARNS() << "Got group L$ history reply for another agent!" << LL_ENDL; return; } @@ -1506,7 +1505,7 @@ void LLPanelGroupLandMoney::processGroupAccountSummaryReply(LLMessageSystem* msg self = get_ptr_in_map(LLGroupMoneyTabEventHandler::sInstanceIDs, request_id); if (!self) { - LL_WARNS() << LLCurrencyWrapper::instance().wrapCurrency("GroupAccountSummary recieved for non-existent group L$ planning tab.") << LL_ENDL; + LL_WARNS() << "GroupAccountSummary recieved for non-existent group L$ planning tab." << LL_ENDL; return; } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 27c83652731..96d6b3027f7 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -52,7 +52,6 @@ #include "llexperiencecache.h" #include "lllandmark.h" #include "llcachename.h" -#include "llcurrencywrapper.h" #include "lldir.h" #include "lldonotdisturbnotificationstorage.h" #include "llerrorcontrol.h" @@ -3982,18 +3981,6 @@ bool process_login_success_response(U32& first_sim_size_x, U32& first_sim_size_y } } - std::string currency = "L$"; - if(response.has("currency")) - { - currency = response["currency"].asString(); - } - else if (LLGridManager::getInstance()->isInOpenSim()) - { - currency = "OS$"; - } - LLCurrencyWrapper::getInstance()->setHomeCurrency(currency); - - // Only save mfa_hash for future logins if the user wants their info remembered. if(response.has("mfa_hash") && gSavedSettings.getBOOL("RememberUser") diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 70bfff5e30c..3812e832cb7 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -135,11 +135,6 @@ LLStatusBar::LLStatusBar(const LLRect& rect) LLStatusBar::~LLStatusBar() { - if (mCurrencyChangedSlot.connected()) - { - mCurrencyChangedSlot.disconnect(); - } - delete mBalanceTimer; mBalanceTimer = NULL; @@ -265,8 +260,6 @@ BOOL LLStatusBar::postBuild() updateMenuSearchPosition(); } - mCurrencyChangedSlot = LLCurrencyWrapper::getInstance()->addCurrencyChangedCb( - [&] { mBtnBuyL->updateCurrencySymbols(); sendMoneyBalanceRequest(); }); return TRUE; } @@ -483,7 +476,7 @@ S32 LLStatusBar::getSquareMetersLeft() const return mSquareMetersCredit - mSquareMetersCommitted; } -void LLStatusBar::onClickBuyCurrency() const +void LLStatusBar::onClickBuyCurrency() { // open a currency floater - actual one open depends on // value specified in settings.xml diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index 39faa55ae9f..bfba5c781aa 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -28,7 +28,6 @@ #define LL_LLSTATUSBAR_H #include "llpanel.h" -#include "llcurrencywrapper.h" // "Constants" loaded from settings.xml at start time extern S32 STATUS_BAR_HEIGHT; @@ -100,7 +99,7 @@ class LLStatusBar final private: - void onClickBuyCurrency() const; + void onClickBuyCurrency(); void onVolumeChanged(const LLSD& newvalue); void onMouseEnterPresetsCamera(); @@ -158,8 +157,6 @@ class LLStatusBar final ALPanelQuickSettingsPulldown* mPanelQuickSettingsPulldown; LLPanelVolumePulldown* mPanelVolumePulldown; LLPanelNearByMedia* mPanelNearByMedia; - - boost::signals2::connection mCurrencyChangedSlot; }; // *HACK: Status bar owns your cached money balance. JC diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 710e604a318..f13ed00350b 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -32,7 +32,6 @@ #include "llaudioengine.h" #include "llavataractions.h" #include "llavatarnamecache.h" // IDEVO HACK -#include "llcurrencywrapper.h" #include "lleconomy.h" #include "lleventtimer.h" #include "llfloatercreatelandmark.h" @@ -400,7 +399,7 @@ void give_money(const LLUUID& uuid, LLViewerRegion* region, S32 amount, BOOL is_ { if (uuid.isNull()) { - LL_WARNS() << LLCurrencyWrapper::instance().wrapCurrency("Failed to send L$ gift to to Null UUID.") << LL_ENDL; + LL_WARNS() << "Failed to send L$ gift to to Null UUID." << LL_ENDL; return; } // gStatusBar->debitBalance(amount); @@ -4963,7 +4962,7 @@ void process_money_balance_reply( LLMessageSystem* msg, void** ) msg->getS32Fast(_PREHASH_MoneyData, _PREHASH_SquareMetersCredit, credit); msg->getS32Fast(_PREHASH_MoneyData, _PREHASH_SquareMetersCommitted, committed); msg->getStringFast(_PREHASH_MoneyData, _PREHASH_Description, desc); - LL_INFOS("Messaging") << LLCurrencyWrapper::instance().wrapCurrency("L$, credit, committed: ") << balance << " " << credit << " " + LL_INFOS("Messaging") << "L$, credit, committed: " << balance << " " << credit << " " << committed << LL_ENDL; if (gStatusBar) diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 37ba2e343da..73e3139743d 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -92,8 +92,6 @@ #include <boost/regex.hpp> -#include "llcurrencywrapper.h" - // When we receive a base grant of capabilities that has a different number of // capabilities than the original base grant received for the region, print @@ -2502,7 +2500,6 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features) if (LLGridManager::getInstance()->isInOpenSim()) { setGodnames(); - std::string cur_symbol = LLCurrencyWrapper::instance().getHomeCurrency(); if (mSimulatorFeatures.has("OpenSimExtras")) { const LLSD& extras(mSimulatorFeatures["OpenSimExtras"]); @@ -2524,11 +2521,6 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features) mHGGridNick = extras["GridNick"].asString(); } - if (extras.has("currency")) - { - cur_symbol = extras["currency"].asString(); - } - if (extras.has("map-server-url")) { mHGMapServerURL = extras["map-server-url"].asString(); @@ -2568,11 +2560,6 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features) mMinPhysPrimScale = OS_MIN_PRIM_SCALE; mMaxPhysPrimScale = OS_DEFAULT_MAX_PRIM_SCALE; } - - if (LLCurrencyWrapper::instance().getCurrency() != cur_symbol) - { - LLCurrencyWrapper::instance().setCurrency(cur_symbol); - } } else #endif diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 27dde75fa4c..366b9f4c59b 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -1354,25 +1354,6 @@ You must agree to the [CURRENT_GRID] Terms and Conditions, Privacy Policy, and T yestext="OK"/> </notification> - <notification - icon="alertmodal.tga" - name="CouldNotBuyCurrencyOS" - type="alertmodal"> -[TITLE] -[MESSAGE] - <tag>confirm</tag> - <url - option="0" - name="url" - target = "_external"> - [LINK] - </url> - <usetemplate - name="okcancelbuttons" - notext="No" - yestext="OK"/> - </notification> - <notification icon="alertmodal.tga" name="CouldNotPutOnOutfit" -- GitLab