#3685 add test floater for new slapps

master
Maxim Nikolenko 2025-03-19 00:50:18 +02:00 committed by GitHub
parent c99e3167ed
commit f04992676d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 263 additions and 1 deletions

View File

@ -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

View File

@ -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>

View File

@ -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;
}

View File

@ -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

View File

@ -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())
{

View File

@ -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>);

View File

@ -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>

View File

@ -370,6 +370,14 @@
function="Inventory.DoToSelected"
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"

View File

@ -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">