diff options
| author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2026-09-17 20:10:37 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-17 20:10:37 +0300 |
| commit | 31b0748d86f18904ff42c1b6b61553d993d625c7 (patch) | |
| tree | 34a4fe056968e47777720688da67070e0f20f36e /indra | |
| parent | fcb962905ef06da639fd64fbb8e1149963b39533 (diff) | |
#6334 Remove unnecessary popups when user doesn't have a payment method on file
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | indra/newview/app_settings/settings.xml | 22 | ||||
| -rw-r--r-- | indra/newview/llfloateraddpaymentmethod.cpp | 84 | ||||
| -rw-r--r-- | indra/newview/llfloateraddpaymentmethod.h | 52 | ||||
| -rw-r--r-- | indra/newview/llfloaterbuycurrency.cpp | 7 | ||||
| -rw-r--r-- | indra/newview/llviewerfloaterreg.cpp | 3 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_add_payment_method.xml | 142 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/ja/floater_add_payment_method.xml | 25 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/pl/floater_add_payment_method.xml | 19 |
9 files changed, 28 insertions, 328 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index c9db55c52d..b5443cd96a 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -190,7 +190,6 @@ set(viewer_SOURCE_FILES llfloaterabout.cpp llfloateravatarwelcomepack.cpp llfloaterbvhpreview.cpp - llfloateraddpaymentmethod.cpp llfloaterauction.cpp llfloaterautoreplacesettings.cpp llfloateravatarpicker.cpp @@ -875,7 +874,6 @@ set(viewer_HEADER_FILES llfloaterabout.h llfloateravatarwelcomepack.h llfloaterbvhpreview.h - llfloateraddpaymentmethod.h llfloaterauction.h llfloaterautoreplacesettings.h llfloateravatarpicker.h diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index a526a745fe..f068e7fb7a 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1194,6 +1194,28 @@ <key>Value</key> <string>https://accounts.secondlife.com/packs/floater?lang=[LANGUAGE]&shortfall=[SHORTFALL]</string> </map> + <key>PaymentMethodURL</key> + <map> + <key>Comment</key> + <string>URL for adding a payment method</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>https://secondlife.com/my/lindex/buy.php?associate_for_viewer=1</string> + </map> + <key>PaymentMethodStagingURL</key> + <map> + <key>Comment</key> + <string>URL for adding a payment method on the Damballah</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>https://secondlife-staging.com/my/lindex/buy.php?associate_for_viewer=1</string> + </map> <key>EnableButtonFlashing</key> <map> <key>Comment</key> diff --git a/indra/newview/llfloateraddpaymentmethod.cpp b/indra/newview/llfloateraddpaymentmethod.cpp deleted file mode 100644 index 64bd7b6aa1..0000000000 --- a/indra/newview/llfloateraddpaymentmethod.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/** - * @file llfloateraddpaymentmethod.cpp - * @brief LLFloaterAddPaymentMethod class implementation - * - * $LicenseInfo:firstyear=2020&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2020, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" - -#include "llfloateraddpaymentmethod.h" -#include "llnotificationsutil.h" -#include "lluictrlfactory.h" -#include "llviewernetwork.h" -#include "llweb.h" - - -LLFloaterAddPaymentMethod::LLFloaterAddPaymentMethod(const LLSD& key) - : LLFloater(key) -{ -} - -LLFloaterAddPaymentMethod::~LLFloaterAddPaymentMethod() -{ -} - -bool LLFloaterAddPaymentMethod::postBuild() -{ - setCanDrag(false); - getChild<LLButton>("continue_btn")->setCommitCallback(boost::bind(&LLFloaterAddPaymentMethod::onContinueBtn, this)); - getChild<LLButton>("close_btn")->setCommitCallback(boost::bind(&LLFloaterAddPaymentMethod::onCloseBtn, this)); - return true; -} - -void LLFloaterAddPaymentMethod::onOpen(const LLSD& key) -{ - centerOnScreen(); -} - -void LLFloaterAddPaymentMethod::onContinueBtn() -{ - closeFloater(); - LLNotificationsUtil::add("AddPaymentMethod", LLSD(), LLSD(), - [this](const LLSD¬if, const LLSD&resp) - { - S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp); - if (opt == 0) - { - const std::string& grid_id = LLGridManager::getInstance()->getGridId(); - const std::string& grid_id_lower = utf8str_tolower(grid_id); - LLWeb::loadURL(getString(grid_id_lower == "damballah" ? "continue_staging_url" : "continue_url")); - } - }); -} - -void LLFloaterAddPaymentMethod::onCloseBtn() -{ - closeFloater(); -} - -void LLFloaterAddPaymentMethod::centerOnScreen() -{ - LLVector2 window_size = LLUI::getInstance()->getWindowSize(); - centerWithin(LLRect(0, 0, ll_round(window_size.mV[VX]), ll_round(window_size.mV[VY]))); -} - diff --git a/indra/newview/llfloateraddpaymentmethod.h b/indra/newview/llfloateraddpaymentmethod.h deleted file mode 100644 index 252caf8f5b..0000000000 --- a/indra/newview/llfloateraddpaymentmethod.h +++ /dev/null @@ -1,52 +0,0 @@ -/** - * @file llfloateraddpaymentmethod.h - * @brief LLFloaterAddPaymentMethod class definition - * - * $LicenseInfo:firstyear=2020&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2020, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifndef LL_FLOATER_ADDPAYMENTMETHOD_H -#define LL_FLOATER_ADDPAYMENTMETHOD_H - -#include "llfloater.h" - -class LLFloaterAddPaymentMethod: - public LLFloater -{ - friend class LLFloaterReg; -public: - bool postBuild() override; - void onOpen(const LLSD& key) override; - -private: - LLFloaterAddPaymentMethod(const LLSD& key); - - void centerOnScreen(); - - void onCloseBtn(); - void onContinueBtn(); - - /*virtual*/ ~LLFloaterAddPaymentMethod(); - -}; - -#endif diff --git a/indra/newview/llfloaterbuycurrency.cpp b/indra/newview/llfloaterbuycurrency.cpp index 506cff31f4..56b3229fda 100644 --- a/indra/newview/llfloaterbuycurrency.cpp +++ b/indra/newview/llfloaterbuycurrency.cpp @@ -40,6 +40,8 @@ #include "llviewchildren.h" #include "llviewerwindow.h" #include "lluictrlfactory.h" +#include "llviewercontrol.h" +#include "llviewernetwork.h" #include "llweb.h" #include "llwindow.h" #include "llappviewer.h" @@ -336,7 +338,10 @@ void LLFloaterBuyCurrency::handleBuyCurrency(bool has_piof, bool has_target, con } else { - LLFloaterReg::showInstance("add_payment_method"); + const std::string& grid_id = LLGridManager::getInstance()->getGridId(); + const std::string& grid_id_lower = utf8str_tolower(grid_id); + const std::string url = gSavedSettings.getString(grid_id_lower == "damballah" ? "PaymentMethodStagingURL" : "PaymentMethodURL"); + LLWeb::loadURL(url); } } diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 0cfbcc06c0..efd3d99a31 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -36,7 +36,6 @@ #include "llfasttimerview.h" #include "llfloater360capture.h" #include "llfloaterabout.h" -#include "llfloateraddpaymentmethod.h" #include "llfloaterauction.h" #include "llfloaterautoreplacesettings.h" #include "llfloateravatarpicker.h" @@ -240,7 +239,6 @@ public: const std::list<std::string> blacklist_untrusted = { "360capture", "block_timers", - "add_payment_method", "appearance", "associate_listing", "avatar_picker", @@ -330,7 +328,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("360capture", "floater_360capture.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloater360Capture>); LLFloaterReg::add("block_timers", "floater_fast_timers.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFastTimerView>); LLFloaterReg::add("about_land", "floater_about_land.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLand>); - LLFloaterReg::add("add_payment_method", "floater_add_payment_method.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAddPaymentMethod>); LLFloaterReg::add("appearance", "floater_my_appearance.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>); LLFloaterReg::add("associate_listing", "floater_associate_listing.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAssociateListing>); LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAuction>); diff --git a/indra/newview/skins/default/xui/en/floater_add_payment_method.xml b/indra/newview/skins/default/xui/en/floater_add_payment_method.xml deleted file mode 100644 index 18f5f2af32..0000000000 --- a/indra/newview/skins/default/xui/en/floater_add_payment_method.xml +++ /dev/null @@ -1,142 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater - height="405" - width="900" - layout="topleft" - name="floater_add_payment_method" - single_instance="true" - show_title="false" - legacy_header_height="0" - header_height="0" - background_visible="false" - can_resize="false" - can_drag_on_left="false" - can_minimize="false" - can_close="false"> - <floater.string - name="continue_url"> - https://secondlife.com/my/lindex/buy.php?associate_for_viewer=1 - </floater.string> - <floater.string - name="continue_staging_url"> - https://secondlife-staging.com/my/lindex/buy.php?associate_for_viewer=1 - </floater.string> - <panel - background_opaque="false" - bg_alpha_color="PanelGray" - border_visible="false" - background_visible="true" - label="wrapper_panel" - layout="topleft" - left="0" - name="wrapper_panel" - top="0" - height="405" - width="900" - follows="all" - translate="false"> - <text - type="string" - length="1" - follows="top|left|right" - font="SansSerifLargeBold" - text_color="White" - layout="topleft" - left="0" - height="14" - top_pad="30" - width="900" - halign="center" - name="title_txt"> - Add a payment method to buy Linden dollars and enjoy more of Second Life. - </text> - <button - follows="top|left|right" - height="24" - label="Get started" - layout="topleft" - left="320" - name="continue_btn" - image_unselected="PushButton_Login" - image_pressed="PushButton_Login_Pressed" - image_hover_unselected="PushButton_Login_Over" - label_color="White" - top_pad ="15" - pad_bottom="1" - width="140"/> - <button - follows="top|left|right" - height="24" - label="Later" - layout="topleft" - left_pad="9" - pad_bottom="1" - name="close_btn" - width="90"/> - <icon - height="195" - width="260" - image_name="add_payment_image_left" - layout="topleft" - left="30" - name="image_left" - top_pad="30" - use_draw_context_alpha="false"/> - <icon - height="195" - width="260" - image_name="add_payment_image_center" - layout="topleft" - left_pad="30" - name="image_center" - use_draw_context_alpha="false"/> - <icon - height="195" - width="260" - image_name="add_payment_image_right" - layout="topleft" - left_pad="30" - name="image_right" - use_draw_context_alpha="false"/> - <text - type="string" - length="1" - follows="top|left" - text_color="White" - height="75" - width="260" - top_pad="15" - layout="topleft" - word_wrap="true" - left="30" - name="image_left_desc"> - Create an avatar you love. Choose from millions of items in stores and the Second Life Marketplace. Your style is here. - </text> - <text - type="string" - length="1" - follows="top|left" - text_color="White" - height="75" - width="260" - layout="topleft" - word_wrap="true" - left_pad="30" - name="image_center_desc"> - Donate to your favorite performers and hosts. Your support helps them create great experiences. - </text> - <text - type="string" - length="1" - follows="top|left" - text_color="White" - height="75" - width="260" - layout="topleft" - word_wrap="true" - left_pad="30" - name="image_right_desc"> - Make the home of your dreams. With millions of items available to purchase, you can make your retreat unique. - </text> - </panel> -</floater> diff --git a/indra/newview/skins/default/xui/ja/floater_add_payment_method.xml b/indra/newview/skins/default/xui/ja/floater_add_payment_method.xml deleted file mode 100644 index b420bf7d20..0000000000 --- a/indra/newview/skins/default/xui/ja/floater_add_payment_method.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_add_payment_method"> - <floater.string name="continue_url"> - https://secondlife.com/my/lindex/buy.php?associate_for_viewer=1&lang=ja-JP - </floater.string> - <panel label="wrapper_panel" name="wrapper_panel"> - <text name="title_txt"> - 支払い方法を追加してリンデンドルを購入し、Second Lifeをもっと楽しみましょう。 - </text> - <button label="始めましょう" name="continue_btn"/> - <button label="また後で"/> - <icon name="image_left"/> - <icon name="image_center"/> - <icon name="image_right"/> - <text name="image_left_desc"> - お気に入りのアバターを作成しましょう。ストアやSecond Lifeマーケットプレイスにある何百万ものアイテムからお選びください。あなただけのスタイルがここにあります。 - </text> - <text name="image_center_desc"> - お気に入りのパフォーマーやホストに寄付をしましょう。あなたのサポートは、彼らが素晴らしい体験を生み出すのに役立ちます。 - </text> - <text name="image_right_desc"> - あなたの夢の家を作りましょう。何百万ものアイテムを購入できるので、あなただけの住まいを作ることができます。 - </text> - </panel> -</floater> diff --git a/indra/newview/skins/default/xui/pl/floater_add_payment_method.xml b/indra/newview/skins/default/xui/pl/floater_add_payment_method.xml deleted file mode 100644 index 2ef78d3d35..0000000000 --- a/indra/newview/skins/default/xui/pl/floater_add_payment_method.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_add_payment_method"> - <panel name="wrapper_panel"> - <text name="title_txt"> - Dodaj metodę płatności, aby kupić Lindeny i lepiej doświadczać Second Life. - </text> - <button label="Rozpocznij" name="continue_btn" /> - <button label="Później" name="close_btn" /> - <text name="image_left_desc"> - Stwórz awatara, którego pokochasz. Wybieraj spośród milionów sklepów i Second Life Marketplace. Twój styl jest tutaj. - </text> - <text name="image_center_desc"> - Wspieraj swoich ulubionych wykonawców i gospodarzy. Pomożesz im tworzyć wspaniałe doświadczenia. - </text> - <text name="image_right_desc"> - Stwórz dom swoich marzeń. Miliony przedmiotów dostępnych do kupienia mogą uczynić Twoje gniazdko wyjątkowym. - </text> - </panel> -</floater> |
