diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index a192f3b60343bf58ed7214ee0b6af3a1e92214fb..41d56b209bd871139f3972c9c2a99d818c3220ee 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 65dbabe875c0cabb223071789590785a2045a4d1..0000000000000000000000000000000000000000 --- 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 b2b38a5af1fb9db141b000d460928c0051e8cd1a..0000000000000000000000000000000000000000 --- 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 b3535db47a35613d1a3ca591033b28e9a1163063..e21f29df41f33abb4ccea9230f4454bac52c5509 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 e6820ae6894fd3059ebc98ea2ddff6b4d70ce6bf..d1c3ac1d553bad47c230daca60d9a1b9a18c31df 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 745634fea770959fc5867022800e762ce91888c8..1d4f0b1da367e914c12085b3e2c90267dd27db82 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 5ea6d59b5fe13625c28b174decce7c455199f4b1..bae66a518b5252d5ceb29283e24cf44a51c98133 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 d882a8fd119bd03d9b3702b1002b4985118a49ec..5a40c42a08512ce704c8446002d62b3c3b1bbff8 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 65a3c22c9d885f6533d37c732285161bd63763f4..47bc268e4f854be5c30b1117f791f924a1c7dfe3 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 2a39b6d7f1841f21deea4c8a90850be4d5d23ce7..d28a1b573a6d354cdb5351276189baa9e4a3b052 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 5e1ced247df7c0a8c23070e2d74c56b4e13ab8a0..ab032d791584cec23aeb9cea1e96959da085a7d4 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 a407bd5c734e9d4098a9d8d1734e063bd42ca7aa..865881b99d164bd1e7a03ae578e0b41ddda63c8d 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 5ddfd521a49b0cd0e5b4e809cbbc9472584c9812..4c0a5cf18324124c35855c7f0164456f3d2d832d 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 ce3d997c45c826090e93a31eafcd5c46af0d797b..91af85c1e987cf2c0728425fa6b543fe145dbad9 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 e3e9b8044c9b29adf00a904ffab50f6f8f7bbd45..5876969c40c0698419aea58ac52be3319af805d7 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 164460388c57362bc3bd40c54292316431e94e30..aae6eda5b8d1a9462aca5882536c3d3f7d049ae9 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 3fac5f46f6a8bfd1aa5925e8a7d2a6e380d6fac3..ab9d3e88f86a0a515a183aab2e74f477c36d6c90 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 27c836527317192f91532343e73ef88997d16cd7..96d6b3027f746fb38b7ce2066707efdfd52c1603 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 70bfff5e30cc48ae9f8d2ecee7b1de9f99f83704..3812e832cb785280d957f0a5bb318148c62ef5d1 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 39faa55ae9fc74651b344e766a711e1bd3dff442..bfba5c781aaf0821dbf941e3b2a16c5c37185773 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 710e604a318e7074a0af70b7d2d2c6e2309854f9..f13ed00350bae004b512773a14f5b0a7b72d2e9e 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 37ba2e343dae462bc273c2b04ef1639a6b2f83be..73e3139743dd3dfa7446315becc8b8f2ef121808 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 27dde75fa4c3bc6e59ba40e45772c07f861ae93d..366b9f4c59b53cf6f1e022282c739f0110f120b8 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"