From 2aecd42d1ffc2ee056b60a66d5c39f09312e1fbe Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Tue, 1 Aug 2023 15:51:18 -0700 Subject: First commit of code to investigate how we might do bulk uploads of inventory item thumbnails - both from a code and a UI perspective --- indra/newview/CMakeLists.txt | 2 + indra/newview/llfloaterbulkythumbs.cpp | 63 ++++++++++++++++++++++ indra/newview/llfloaterbulkythumbs.h | 49 +++++++++++++++++ indra/newview/llviewerfloaterreg.cpp | 2 + .../skins/default/xui/en/floater_bulky_thumbs.xml | 42 +++++++++++++++ indra/newview/skins/default/xui/en/menu_viewer.xml | 8 +++ 6 files changed, 166 insertions(+) create mode 100644 indra/newview/llfloaterbulkythumbs.cpp create mode 100644 indra/newview/llfloaterbulkythumbs.h create mode 100644 indra/newview/skins/default/xui/en/floater_bulky_thumbs.xml diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index c37d03221c..4c6e37f82f 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -185,6 +185,7 @@ set(viewer_SOURCE_FILES llfloaterbigpreview.cpp llfloaterbuildoptions.cpp llfloaterbulkpermission.cpp + llfloaterbulkythumbs.cpp llfloaterbump.cpp llfloaterbuy.cpp llfloaterbuycontents.cpp @@ -831,6 +832,7 @@ set(viewer_HEADER_FILES llfloaterbigpreview.h llfloaterbuildoptions.h llfloaterbulkpermission.h + llfloaterbulkythumbs.h llfloaterbump.h llfloaterbuy.h llfloaterbuycontents.h diff --git a/indra/newview/llfloaterbulkythumbs.cpp b/indra/newview/llfloaterbulkythumbs.cpp new file mode 100644 index 0000000000..14ecc32c40 --- /dev/null +++ b/indra/newview/llfloaterbulkythumbs.cpp @@ -0,0 +1,63 @@ +/** + * @file llfloaterbulkythumbs.cpp + * @author Callum Prentice + * @brief LLFloaterBulkyThumbs class implementation + * + * $LicenseInfo:firstyear=2008&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, 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$ + */ + +/** + * Floater that appears when buying an object, giving a preview + * of its contents and their permissions. + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloaterbulkythumbs.h" +#include "lluictrlfactory.h" + + +LLFloaterBulkyThumbs::LLFloaterBulkyThumbs(const LLSD &key) + : LLFloater("floater_bulky_thumbs") +{ +} + +LLFloaterBulkyThumbs::~LLFloaterBulkyThumbs() {} + +BOOL LLFloaterBulkyThumbs::postBuild() +{ + mPasteFromInventoryBtn = getChild("paste_from_inventory"); + mPasteFromInventoryBtn->setCommitCallback(boost::bind(&LLFloaterBulkyThumbs::onPasteFromInventory, this)); + + mProcessBulkyThumbsBtn = getChild("process_bulky_thumbs"); + mProcessBulkyThumbsBtn->setCommitCallback(boost::bind(&LLFloaterBulkyThumbs::onProcessBulkyThumbs, this)); + mProcessBulkyThumbsBtn->setEnabled(false); + + return true; +} + + +void LLFloaterBulkyThumbs::onPasteFromInventory() +{ std::cout << "onPasteFromInventory" << std::endl; } + +void LLFloaterBulkyThumbs::onProcessBulkyThumbs() +{ std::cout << "onProcessBulkyThumbs" << std::endl; } diff --git a/indra/newview/llfloaterbulkythumbs.h b/indra/newview/llfloaterbulkythumbs.h new file mode 100644 index 0000000000..9c951211d7 --- /dev/null +++ b/indra/newview/llfloaterbulkythumbs.h @@ -0,0 +1,49 @@ +/** + * @file llfloaterbulkythumbs.h + * @author Callum Prentice + * @brief Helper floater for bulk processing of inventory thumbnails + * + * $LicenseInfo:firstyear=2008&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, 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_LLFLOATERBULKYTHUMBS_H +#define LL_LLFLOATERBULKYTHUMBS_H + +#include "llfloater.h" + +class LLFloaterBulkyThumbs: + public LLFloater +{ + friend class LLFloaterReg; +private: + LLFloaterBulkyThumbs(const LLSD &key); + BOOL postBuild() override; + ~LLFloaterBulkyThumbs(); + + LLUICtrl *mPasteFromInventoryBtn; + void onPasteFromInventory(); + + LLUICtrl *mProcessBulkyThumbsBtn; + void onProcessBulkyThumbs(); +}; + +#endif // LL_LLFLOATERBULKYTHUMBS_H diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 060bdb6995..459101317b 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -47,6 +47,7 @@ #include "llfloaterbeacons.h" #include "llfloaterbuildoptions.h" #include "llfloaterbulkpermission.h" +#include "llfloaterbulkythumbs.h" #include "llfloaterbump.h" #include "llfloaterbuy.h" #include "llfloaterbuycontents.h" @@ -328,6 +329,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("build", "floater_tools.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("build_options", "floater_build_options.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("bumps", "floater_bumps.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("bulky_thumbs", "floater_bulky_thumbs.xml", (LLFloaterBuildFunc) &LLFloaterReg::build); LLFloaterReg::add("camera", "floater_camera.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("camera_presets", "floater_camera_presets.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/skins/default/xui/en/floater_bulky_thumbs.xml b/indra/newview/skins/default/xui/en/floater_bulky_thumbs.xml new file mode 100644 index 0000000000..867c8fdc20 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_bulky_thumbs.xml @@ -0,0 +1,42 @@ + + +