From a5261a5fa8fad810ecb5c260d92c3e771822bf58 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 20 Feb 2024 23:46:23 +0100 Subject: Convert BOOL to bool in llui --- indra/newview/llfloateraddpaymentmethod.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfloateraddpaymentmethod.cpp') diff --git a/indra/newview/llfloateraddpaymentmethod.cpp b/indra/newview/llfloateraddpaymentmethod.cpp index 3952b48229..cd265707a5 100644 --- a/indra/newview/llfloateraddpaymentmethod.cpp +++ b/indra/newview/llfloateraddpaymentmethod.cpp @@ -41,12 +41,12 @@ LLFloaterAddPaymentMethod::~LLFloaterAddPaymentMethod() { } -BOOL LLFloaterAddPaymentMethod::postBuild() +bool LLFloaterAddPaymentMethod::postBuild() { - setCanDrag(FALSE); + setCanDrag(false); getChild("continue_btn")->setCommitCallback(boost::bind(&LLFloaterAddPaymentMethod::onContinueBtn, this)); getChild("close_btn")->setCommitCallback(boost::bind(&LLFloaterAddPaymentMethod::onCloseBtn, this)); - return TRUE; + return true; } void LLFloaterAddPaymentMethod::onOpen(const LLSD& key) -- cgit v1.2.3 From e2e37cced861b98de8c1a7c9c0d3a50d2d90e433 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 22 May 2024 21:25:21 +0200 Subject: Fix line endlings --- indra/newview/llfloateraddpaymentmethod.cpp | 162 ++++++++++++++-------------- 1 file changed, 81 insertions(+), 81 deletions(-) (limited to 'indra/newview/llfloateraddpaymentmethod.cpp') diff --git a/indra/newview/llfloateraddpaymentmethod.cpp b/indra/newview/llfloateraddpaymentmethod.cpp index d63defaf17..fc962ce89f 100644 --- a/indra/newview/llfloateraddpaymentmethod.cpp +++ b/indra/newview/llfloateraddpaymentmethod.cpp @@ -1,81 +1,81 @@ -/** - * @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 "llweb.h" - - -LLFloaterAddPaymentMethod::LLFloaterAddPaymentMethod(const LLSD& key) - : LLFloater(key) -{ -} - -LLFloaterAddPaymentMethod::~LLFloaterAddPaymentMethod() -{ -} - -bool LLFloaterAddPaymentMethod::postBuild() -{ - setCanDrag(false); - getChild("continue_btn")->setCommitCallback(boost::bind(&LLFloaterAddPaymentMethod::onContinueBtn, this)); - getChild("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) - { - LLWeb::loadURL(this->getString("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]))); -} - +/** + * @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 "llweb.h" + + +LLFloaterAddPaymentMethod::LLFloaterAddPaymentMethod(const LLSD& key) + : LLFloater(key) +{ +} + +LLFloaterAddPaymentMethod::~LLFloaterAddPaymentMethod() +{ +} + +bool LLFloaterAddPaymentMethod::postBuild() +{ + setCanDrag(false); + getChild("continue_btn")->setCommitCallback(boost::bind(&LLFloaterAddPaymentMethod::onContinueBtn, this)); + getChild("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) + { + LLWeb::loadURL(this->getString("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]))); +} + -- cgit v1.2.3