Merge branch 'DRTVWR-577-maint-S' of https://github.com/secondlife/viewer

# Conflicts:
#	autobuild.xml
master
Ansariel 2023-04-21 15:14:43 +02:00
commit 94a7b3ab8e
13 changed files with 60 additions and 38 deletions

View File

@ -672,9 +672,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>7b4aceaed511d44c4d1354b2162b59c7</string>
<string>02b569ac2bd71f201e3dd86ade7b3eeb</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/107398/936936/bugsplat-1.0.7.576560-darwin64-576560.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/113876/983684/bugsplat-1.0.7.579696-darwin64-579696.tar.bz2</string>
</map>
<key>name</key>
<string>darwin64</string>
@ -684,9 +684,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>53918c7c74b943cdc0bb90caf9657a84</string>
<string>5b32c47ae8e8cf0d4106f08e8db18044</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/107400/936949/bugsplat-4.0.3.0.576560-windows-576560.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/113878/983697/bugsplat-4.0.3.0.579696-windows-579696.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
@ -696,16 +696,16 @@
<key>archive</key>
<map>
<key>hash</key>
<string>19d6a55db101f02e7eb531daf3e8cfd1</string>
<string>79c005fd8a660f8551b3c9ede64fa4ef</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/107401/936948/bugsplat-.576560-windows64-576560.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/113879/983696/bugsplat-4.0.3.0.579696-windows64-579696.tar.bz2</string>
</map>
<key>name</key>
<string>windows64</string>
</map>
</map>
<key>version</key>
<string>4.0.3.0.576560</string>
<string>4.0.3.0.579696</string>
</map>
<key>colladadom</key>
<map>
@ -3013,16 +3013,6 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>name</key>
<string>windows64</string>
</map>
<key>linux64</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>46edf0f55417f8ef0d33a5c007bc3644</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/89310/815451/threejs-0.132.2-windows64-564843.tar.bz2</string>
</map>
</map>
</map>
<key>version</key>
<string>0.132.2</string>

View File

@ -153,7 +153,7 @@ void LLAgentListener::requestTeleport(LLSD const & event_data) const
params.append(event_data["x"]);
params.append(event_data["y"]);
params.append(event_data["z"]);
LLCommandDispatcher::dispatch("teleport", params, LLSD(), NULL, "clicked", true);
LLCommandDispatcher::dispatch("teleport", params, LLSD(), NULL, LLCommandHandler::NAV_TYPE_CLICKED, true);
// *TODO - lookup other LLCommandHandlers for "agent", "classified", "event", "group", "floater", "parcel", "login", login_refresh", "balance", "chat"
// should we just compose LLCommandHandler and LLDispatchListener?
}
@ -163,7 +163,7 @@ void LLAgentListener::requestTeleport(LLSD const & event_data) const
LLVector3(event_data["x"].asReal(),
event_data["y"].asReal(),
event_data["z"].asReal())).getSLURLString();
LLURLDispatcher::dispatch(url, "clicked", NULL, false);
LLURLDispatcher::dispatch(url, LLCommandHandler::NAV_TYPE_CLICKED, NULL, false);
}
}

View File

@ -64,8 +64,13 @@ void LLCommandDispatcherListener::dispatch(const LLSD& params) const
// But for testing, allow a caller to specify untrusted.
trusted_browser = params["trusted"].asBoolean();
}
LLCommandDispatcher::dispatch(params["cmd"], params["params"], params["query"], NULL,
"clicked", trusted_browser);
LLCommandDispatcher::dispatch(
params["cmd"],
params["params"],
params["query"],
NULL,
LLCommandHandler::NAV_TYPE_CLICKED,
trusted_browser);
}
void LLCommandDispatcherListener::enumerate(const LLSD& params) const

View File

@ -40,6 +40,8 @@
static LLCommandDispatcherListener sCommandDispatcherListener;
const std::string LLCommandHandler::NAV_TYPE_CLICKED = "clicked";
const std::string LLCommandHandler::NAV_TYPE_EXTERNAL = "external";
const std::string LLCommandHandler::NAV_TYPE_NAVIGATED = "navigated";
//---------------------------------------------------------------------------
// Underlying registry for command handlers, not directly accessible.

View File

@ -70,6 +70,8 @@ public:
};
static const std::string NAV_TYPE_CLICKED;
static const std::string NAV_TYPE_EXTERNAL;
static const std::string NAV_TYPE_NAVIGATED;
LLCommandHandler(const char* command, EUntrustedAccess untrusted_access);
// Automatically registers object to get called when

View File

@ -165,10 +165,21 @@ void LLFloaterDisplayName::onReset()
{
return;
}
getChild<LLUICtrl>("display_name_editor")->setValue(av_name.getCompleteName());
getChild<LLUICtrl>("display_name_editor")->setValue(av_name.getUserName());
getChild<LLUICtrl>("display_name_confirm")->clear();
getChild<LLUICtrl>("display_name_confirm")->setFocus(TRUE);
if (getChild<LLUICtrl>("display_name_editor")->getEnabled())
{
// UI is enabled, fill the first field
getChild<LLUICtrl>("display_name_confirm")->clear();
getChild<LLUICtrl>("display_name_confirm")->setFocus(TRUE);
}
else
{
// UI is disabled, looks like we should allow resetting
// even if user already set a display name, enable save button
getChild<LLUICtrl>("display_name_confirm")->setValue(av_name.getUserName());
getChild<LLUICtrl>("save_btn")->setEnabled(true);
}
}
@ -183,6 +194,21 @@ void LLFloaterDisplayName::onSave()
return;
}
LLAvatarName av_name;
if (!LLAvatarNameCache::get(gAgent.getID(), &av_name))
{
return;
}
std::string user_name = av_name.getUserName();
if (display_name_utf8.compare(user_name) == 0
&& LLAvatarNameCache::getInstance()->hasNameLookupURL())
{
// A reset
LLViewerDisplayName::set("", boost::bind(&LLFloaterDisplayName::onCacheSetName, this, _1, _2, _3));
return;
}
const U32 DISPLAY_NAME_MAX_LENGTH = 31; // characters, not bytes
LLWString display_name_wstr = utf8string_to_wstring(display_name_utf8);
if (display_name_wstr.size() > DISPLAY_NAME_MAX_LENGTH)

View File

@ -68,7 +68,7 @@ class LLGroupHandler : public LLCommandHandler
{
public:
// requires trusted browser to trigger
LLGroupHandler() : LLCommandHandler("group", UNTRUSTED_CLICK_ONLY) { }
LLGroupHandler() : LLCommandHandler("group", UNTRUSTED_THROTTLE) { }
virtual bool canHandleUntrusted(
const LLSD& params,

View File

@ -3967,7 +3967,7 @@ bool LLStartUp::dispatchURL()
|| (dx*dx > SLOP*SLOP)
|| (dy*dy > SLOP*SLOP) )
{
LLURLDispatcher::dispatch(getStartSLURL().getSLURLString(), "clicked",
LLURLDispatcher::dispatch(getStartSLURL().getSLURLString(), LLCommandHandler::NAV_TYPE_CLICKED,
NULL, false);
}
return true;

View File

@ -148,7 +148,7 @@ bool LLURLDispatcherImpl::dispatchRightClick(const LLSLURL& slurl)
const bool right_click = true;
LLMediaCtrl* web = NULL;
const bool trusted_browser = false;
return dispatchCore(slurl, "clicked", right_click, web, trusted_browser);
return dispatchCore(slurl, LLCommandHandler::NAV_TYPE_CLICKED, right_click, web, trusted_browser);
}
// static
@ -507,7 +507,7 @@ bool LLURLDispatcher::dispatchFromTextEditor(const std::string& slurl, bool trus
// *TODO: Make this trust model more refined. JC
LLMediaCtrl* web = NULL;
return LLURLDispatcherImpl::dispatch(LLSLURL(slurl), "clicked", web, trusted_content);
return LLURLDispatcherImpl::dispatch(LLSLURL(slurl), LLCommandHandler::NAV_TYPE_CLICKED, web, trusted_content);
}

View File

@ -7398,12 +7398,8 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
{
count++;
known_questions |= script_perm.permbit;
if (!LLMuteList::isLinden(owner_name))
{
// check whether permission question should cause special caution dialog
caution |= (script_perm.caution);
}
// check whether permission question should cause special caution dialog
caution |= (script_perm.caution);
if (("ScriptTakeMoney" == script_perm.question) && has_not_only_debit)
continue;

View File

@ -167,7 +167,7 @@ public:
}
// Process the SLapp as if it was a secondlife://{PLACE} SLurl
LLURLDispatcher::dispatch(url, "clicked", web, true);
LLURLDispatcher::dispatch(url, LLCommandHandler::NAV_TYPE_CLICKED, web, true);
return true;
}

View File

@ -39,6 +39,7 @@
#include "llagent.h"
#include "llagentcamera.h"
#include "llcommandhandler.h"
#include "llcommunicationchannel.h"
#include "llfloaterreg.h"
#include "llhudicon.h"
@ -1396,7 +1397,7 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi
{
if (drop)
{
LLURLDispatcher::dispatch( dropped_slurl.getSLURLString(), "clicked", NULL, true );
LLURLDispatcher::dispatch( dropped_slurl.getSLURLString(), LLCommandHandler::NAV_TYPE_CLICKED, NULL, true );
return LLWindowCallbacks::DND_MOVE;
}
return LLWindowCallbacks::DND_COPY;
@ -1865,7 +1866,7 @@ void LLViewerWindow::handleDataCopy(LLWindow *window, S32 data_type, void *data)
LLMediaCtrl* web = NULL;
const bool trusted_browser = false;
// don't treat slapps coming from external browsers as "clicks" as this would bypass throttling
if (LLURLDispatcher::dispatch(url, "", web, trusted_browser))
if (LLURLDispatcher::dispatch(url, LLCommandHandler::NAV_TYPE_EXTERNAL, web, trusted_browser))
{
// bring window to foreground, as it has just been "launched" from a URL
mWindow->bringToFront();

View File

@ -2010,7 +2010,7 @@ BOOL LLWorldMapView::handleDoubleClick( S32 x, S32 y, MASK mask )
// Invoke the event details floater if someone is clicking on an event.
LLSD params(LLSD::emptyArray());
params.append(event_id);
LLCommandDispatcher::dispatch("event", params, LLSD(), NULL, "clicked", true);
LLCommandDispatcher::dispatch("event", params, LLSD(), NULL, LLCommandHandler::NAV_TYPE_CLICKED, true);
break;
}
case MAP_ITEM_LAND_FOR_SALE: