diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2025-03-19 00:50:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-19 00:50:18 +0200 |
commit | f04992676d5ab17cc34b310e06ce7d838c5232b9 (patch) | |
tree | 063e73a8be476c8cd8fb299b85019beb34ed48c5 | |
parent | c99e3167ed8549bc13d7df03b1e12dc15b0a080f (diff) |
#3685 add test floater for new slapps
-rw-r--r-- | indra/newview/CMakeLists.txt | 2 | ||||
-rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | indra/newview/llfloaterslapptest.cpp | 51 | ||||
-rw-r--r-- | indra/newview/llfloaterslapptest.h | 42 | ||||
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 15 | ||||
-rw-r--r-- | indra/newview/llviewerfloaterreg.cpp | 5 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_test_slapp.xml | 123 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_inventory.xml | 8 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 7 |
9 files changed, 263 insertions, 1 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 3210b76649..ed29911a43 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -291,6 +291,7 @@ set(viewer_SOURCE_FILES llfloatersettingscolor.cpp llfloatersettingsdebug.cpp llfloatersidepanelcontainer.cpp + llfloaterslapptest.cpp llfloatersnapshot.cpp llfloatersounddevices.cpp llfloaterspellchecksettings.cpp @@ -962,6 +963,7 @@ set(viewer_HEADER_FILES llfloatersettingscolor.h llfloatersettingsdebug.h llfloatersidepanelcontainer.h + llfloaterslapptest.h llfloatersnapshot.h llfloatersounddevices.h llfloaterspellchecksettings.h diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 0c83355a81..4ce7e0f729 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3676,6 +3676,17 @@ <key>Value</key> <integer>5000</integer> </map> + <key>InventoryExposeFolderID</key> + <map> + <key>Comment</key> + <string>Allows copying folder id from context menu</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>MarketplaceListingsSortOrder</key> <map> <key>Comment</key> diff --git a/indra/newview/llfloaterslapptest.cpp b/indra/newview/llfloaterslapptest.cpp new file mode 100644 index 0000000000..0075379529 --- /dev/null +++ b/indra/newview/llfloaterslapptest.cpp @@ -0,0 +1,51 @@ +/** + * @file llfloaterslapptest.cpp + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, 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 "llfloaterslapptest.h" +#include "lluictrlfactory.h" + +#include "lllineeditor.h" +#include "lltextbox.h" + +LLFloaterSLappTest::LLFloaterSLappTest(const LLSD& key) + : LLFloater("floater_test_slapp") +{ +} + +LLFloaterSLappTest::~LLFloaterSLappTest() +{} + +bool LLFloaterSLappTest::postBuild() +{ + getChild<LLLineEditor>("remove_folder_id")->setKeystrokeCallback([this](LLLineEditor* editor, void*) + { + std::string slapp(getString("remove_folder_slapp")); + getChild<LLTextBox>("remove_folder_txt")->setValue(slapp + editor->getValue().asString()); + }, NULL); + + return true; +} diff --git a/indra/newview/llfloaterslapptest.h b/indra/newview/llfloaterslapptest.h new file mode 100644 index 0000000000..ec727cb629 --- /dev/null +++ b/indra/newview/llfloaterslapptest.h @@ -0,0 +1,42 @@ +/** + * @file llfloaterslapptest.h + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, 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_LLFLOATERSLAPPTEST_H +#define LL_LLFLOATERSLAPPTEST_H + +#include "llfloater.h" + +class LLFloaterSLappTest: + public LLFloater +{ + friend class LLFloaterReg; + virtual bool postBuild() override; + +private: + LLFloaterSLappTest(const LLSD& key); + ~LLFloaterSLappTest(); +}; + +#endif diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 479b7c19ac..ce91f9a1f3 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3599,6 +3599,13 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action) const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); move_folder_to_marketplacelistings(cat, marketplacelistings_id, ("move_to_marketplace_listings" != action), (("copy_or_move_to_marketplace_listings" == action))); } + else if ("copy_folder_uuid" == action) + { + LLInventoryCategory* cat = gInventory.getCategory(mUUID); + if (!cat) return; + gViewerWindow->getWindow()->copyTextToClipboard(utf8str_to_wstring(mUUID.asString())); + return; + } } void LLFolderBridge::gatherMessage(std::string& message, S32 depth, LLError::ELevel log_level) @@ -4466,6 +4473,14 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items { disabled_items.push_back(std::string("Delete System Folder")); } + else + { + static LLCachedControl<bool> show_copy_id(gSavedSettings, "InventoryExposeFolderID", false); + if (show_copy_id()) + { + items.push_back(std::string("Copy UUID")); + } + } if (isAgentInventory() && !isMarketplaceListingsFolder()) { diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index ef68609182..95c2a77ba8 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -137,6 +137,7 @@ #include "llfloatersettingscolor.h" #include "llfloatersettingsdebug.h" #include "llfloatersidepanelcontainer.h" +#include "llfloaterslapptest.h" #include "llfloatersnapshot.h" #include "llfloatersounddevices.h" #include "llfloaterspellchecksettings.h" @@ -278,7 +279,8 @@ public: "upload_model", "upload_script", "upload_sound", - "bulk_upload" + "bulk_upload", + "slapp_test" }; return std::find(blacklist_untrusted.begin(), blacklist_untrusted.end(), fl_name) == blacklist_untrusted.end(); } @@ -499,6 +501,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("search", "floater_search.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSearch>); LLFloaterReg::add("profile", "floater_profile.xml",(LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterProfile>); LLFloaterReg::add("guidebook", "floater_how_to.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHowTo>); + LLFloaterReg::add("slapp_test", "floater_test_slapp.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSLappTest>); LLFloaterReg::add("big_preview", "floater_big_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBigPreview>); diff --git a/indra/newview/skins/default/xui/en/floater_test_slapp.xml b/indra/newview/skins/default/xui/en/floater_test_slapp.xml new file mode 100644 index 0000000000..dd2720816a --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_test_slapp.xml @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater + legacy_header_height="18" + height="300" + layout="topleft" + name="slapp_test" + title="SLAPP TEST" + width="500"> + <floater.string + name="remove_folder_slapp"> + secondlife://app/remove_folder/?folder_id= + </floater.string> + <text + type="string" + length="1" + top="20" + follows="left|top|right" + height="16" + name="trusted_txt" + font="SansSerifMedium" + text_color="white" + layout="topleft" + left="16"> + Trusted source + </text> + <text + type="string" + length="1" + top_pad="8" + follows="left|top|right" + height="16" + layout="topleft" + left="16"> + /wear_folder + </text> + <text + type="string" + length="1" + top_pad="5" + follows="left|top|right" + height="16" + width="450" + layout="topleft" + left="16"> + secondlife://app/wear_folder/?folder_name=Daisy + </text> + <text + type="string" + length="1" + top_pad="8 " + follows="left|top|right" + height="16" + layout="topleft" + left="16"> + /add_folder + </text> + <text + type="string" + length="1" + top_pad="5" + follows="left|top|right" + height="16" + width="450" + layout="topleft" + left="16"> + secondlife://app/add_folder/?folder_name=Cardboard%20Boxbot + </text> + <text + type="string" + length="1" + top_pad="5" + follows="left|top|right" + height="16" + width="450" + layout="topleft"> + secondlife://app/add_folder/?folder_id=59219db2-c260-87d3-213d-bb3bc298a3d8 + </text> + <text + type="string" + length="1" + top_pad="8 " + follows="left|top|right" + height="16" + layout="topleft" + left="16"> + /remove_folder + </text> + <text + type="string" + length="1" + top_pad="5" + follows="left|top|right" + height="16" + layout="topleft" + left="16"> + Folder ID: + </text> + <line_editor + border_style="line" + border_thickness="1" + follows="left|top" + font="SansSerif" + height="18" + layout="topleft" + left="75" + max_length_bytes="50" + prevalidate_callback="ascii" + name="remove_folder_id" + top_delta="-2" + width="270" /> + <text + type="string" + length="1" + top_pad="5" + follows="left|top|right" + height="16" + width="450" + name="remove_folder_txt" + layout="topleft" + left="16"> + secondlife://app/remove_folder/?folder_id= + </text> +</floater> diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index d8aac71dd5..e57e3b0750 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -371,6 +371,14 @@ parameter="copy_uuid" /> </menu_item_call> <menu_item_call + label="Copy UUID" + layout="topleft" + name="Copy UUID"> + <menu_item_call.on_click + function="Inventory.DoToSelected" + parameter="copy_folder_uuid" /> + </menu_item_call> + <menu_item_call label="Show in Main Panel" layout="topleft" name="Show in Main Panel"> diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 6fb92f7b99..343f0c0059 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -3889,6 +3889,13 @@ function="World.EnvPreset" function="Floater.Show" parameter="font_test" /> </menu_item_call> + <menu_item_call + label="Show SLapps Test" + name="Show SLapps Test"> + <menu_item_call.on_click + function="Floater.Show" + parameter="slapp_test" /> + </menu_item_call> <menu_item_check label="Show XUI Names" name="Show XUI Names"> |