diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-05-14 21:02:28 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-05-14 21:02:28 -0400 |
commit | 094dcc07f8c1d90ae723dbe60eddacb90a09eae8 (patch) | |
tree | e750942e5f22ed677b543bd49509c2a7cdc5ce56 /indra/newview/llpanelsnapshotinventory.cpp | |
parent | d4043d3b011c32eb503c43c551872f9c24d7344f (diff) | |
parent | 38c2a5bde985a6a8a96d912d432f8bdf7e5b60be (diff) |
Merge DRTVWR-591-maint-X to main on promotion of secondlife/viewer #705: Maintenance X
Diffstat (limited to 'indra/newview/llpanelsnapshotinventory.cpp')
-rw-r--r-- | indra/newview/llpanelsnapshotinventory.cpp | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp index 9e56a04b3b..3092ea3b18 100644 --- a/indra/newview/llpanelsnapshotinventory.cpp +++ b/indra/newview/llpanelsnapshotinventory.cpp @@ -1,25 +1,25 @@ -/** +/** * @file llpanelsnapshotinventory.cpp * @brief The panel provides UI for saving snapshot as an inventory texture. * * $LicenseInfo:firstyear=2011&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2011, 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$ */ @@ -34,7 +34,7 @@ #include "llpanelsnapshot.h" #include "llsnapshotlivepreview.h" #include "llviewercontrol.h" // gSavedSettings -#include "llstatusbar.h" // can_afford_transaction() +#include "llstatusbar.h" // can_afford_transaction() #include "llnotificationsutil.h" #include "llagentbenefits.h" @@ -50,7 +50,7 @@ class LLPanelSnapshotInventoryBase public: LLPanelSnapshotInventoryBase(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ BOOL postBuild(); protected: void onSend(); /*virtual*/ LLSnapshotModel::ESnapshotType getSnapshotType(); @@ -59,22 +59,22 @@ protected: class LLPanelSnapshotInventory : public LLPanelSnapshotInventoryBase { - LOG_CLASS(LLPanelSnapshotInventory); + LOG_CLASS(LLPanelSnapshotInventory); public: - LLPanelSnapshotInventory(); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); + LLPanelSnapshotInventory(); + /*virtual*/ BOOL postBuild(); + /*virtual*/ void onOpen(const LLSD& key); - void onResolutionCommit(LLUICtrl* ctrl); + void onResolutionCommit(LLUICtrl* ctrl); private: - /*virtual*/ std::string getWidthSpinnerName() const { return "inventory_snapshot_width"; } - /*virtual*/ std::string getHeightSpinnerName() const { return "inventory_snapshot_height"; } - /*virtual*/ std::string getAspectRatioCBName() const { return "inventory_keep_aspect_check"; } - /*virtual*/ std::string getImageSizeComboName() const { return "texture_size_combo"; } - /*virtual*/ std::string getImageSizePanelName() const { return LLStringUtil::null; } - /*virtual*/ void updateControls(const LLSD& info); + /*virtual*/ std::string getWidthSpinnerName() const { return "inventory_snapshot_width"; } + /*virtual*/ std::string getHeightSpinnerName() const { return "inventory_snapshot_height"; } + /*virtual*/ std::string getAspectRatioCBName() const { return "inventory_keep_aspect_check"; } + /*virtual*/ std::string getImageSizeComboName() const { return "texture_size_combo"; } + /*virtual*/ std::string getImageSizePanelName() const { return LLStringUtil::null; } + /*virtual*/ void updateControls(const LLSD& info); }; @@ -85,15 +85,15 @@ class LLPanelOutfitSnapshotInventory public: LLPanelOutfitSnapshotInventory(); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); - + /*virtual*/ BOOL postBuild(); + /*virtual*/ void onOpen(const LLSD& key); + private: - /*virtual*/ std::string getWidthSpinnerName() const { return ""; } - /*virtual*/ std::string getHeightSpinnerName() const { return ""; } - /*virtual*/ std::string getAspectRatioCBName() const { return ""; } - /*virtual*/ std::string getImageSizeComboName() const { return "texture_size_combo"; } - /*virtual*/ std::string getImageSizePanelName() const { return LLStringUtil::null; } + /*virtual*/ std::string getWidthSpinnerName() const { return ""; } + /*virtual*/ std::string getHeightSpinnerName() const { return ""; } + /*virtual*/ std::string getAspectRatioCBName() const { return ""; } + /*virtual*/ std::string getImageSizeComboName() const { return "texture_size_combo"; } + /*virtual*/ std::string getImageSizePanelName() const { return LLStringUtil::null; } /*virtual*/ void updateControls(const LLSD& info); /*virtual*/ void cancel(); @@ -119,38 +119,38 @@ LLSnapshotModel::ESnapshotType LLPanelSnapshotInventoryBase::getSnapshotType() LLPanelSnapshotInventory::LLPanelSnapshotInventory() { - mCommitCallbackRegistrar.add("Inventory.Save", boost::bind(&LLPanelSnapshotInventory::onSend, this)); - mCommitCallbackRegistrar.add("Inventory.Cancel", boost::bind(&LLPanelSnapshotInventory::cancel, this)); + mCommitCallbackRegistrar.add("Inventory.Save", boost::bind(&LLPanelSnapshotInventory::onSend, this)); + mCommitCallbackRegistrar.add("Inventory.Cancel", boost::bind(&LLPanelSnapshotInventory::cancel, this)); } // virtual BOOL LLPanelSnapshotInventory::postBuild() { - getChild<LLSpinCtrl>(getWidthSpinnerName())->setAllowEdit(FALSE); - getChild<LLSpinCtrl>(getHeightSpinnerName())->setAllowEdit(FALSE); + getChild<LLSpinCtrl>(getWidthSpinnerName())->setAllowEdit(FALSE); + getChild<LLSpinCtrl>(getHeightSpinnerName())->setAllowEdit(FALSE); - getChild<LLUICtrl>(getImageSizeComboName())->setCommitCallback(boost::bind(&LLPanelSnapshotInventory::onResolutionCommit, this, _1)); - return LLPanelSnapshotInventoryBase::postBuild(); + getChild<LLUICtrl>(getImageSizeComboName())->setCommitCallback(boost::bind(&LLPanelSnapshotInventory::onResolutionCommit, this, _1)); + return LLPanelSnapshotInventoryBase::postBuild(); } // virtual void LLPanelSnapshotInventory::onOpen(const LLSD& key) { - LLPanelSnapshot::onOpen(key); + LLPanelSnapshot::onOpen(key); } // virtual void LLPanelSnapshotInventory::updateControls(const LLSD& info) { - const bool have_snapshot = info.has("have-snapshot") ? info["have-snapshot"].asBoolean() : true; - getChild<LLUICtrl>("save_btn")->setEnabled(have_snapshot); + const bool have_snapshot = info.has("have-snapshot") ? info["have-snapshot"].asBoolean() : true; + getChild<LLUICtrl>("save_btn")->setEnabled(have_snapshot); } void LLPanelSnapshotInventory::onResolutionCommit(LLUICtrl* ctrl) { - BOOL current_window_selected = (getChild<LLComboBox>(getImageSizeComboName())->getCurrentIndex() == 3); - getChild<LLSpinCtrl>(getWidthSpinnerName())->setVisible(!current_window_selected); - getChild<LLSpinCtrl>(getHeightSpinnerName())->setVisible(!current_window_selected); + BOOL current_window_selected = (getChild<LLComboBox>(getImageSizeComboName())->getCurrentIndex() == 3); + getChild<LLSpinCtrl>(getWidthSpinnerName())->setVisible(!current_window_selected); + getChild<LLSpinCtrl>(getHeightSpinnerName())->setVisible(!current_window_selected); } void LLPanelSnapshotInventoryBase::onSend() |