Merge branch 'DRTVWR-516-maint' of https://bitbucket.org/lindenlab/viewer

master
Ansariel 2021-04-16 23:05:40 +02:00
commit 7ab897baf0
10 changed files with 42 additions and 23 deletions

View File

@ -228,6 +228,7 @@ Ansariel Hiller
SL-13364
SL-13858
SL-13697
SL-13395
Aralara Rajal
Arare Chantilly
CHUIBUG-191

View File

@ -27,9 +27,8 @@
// Many classes just store a single LLNotificationPtr
// and llnotifications.h is very large, so define this ligher header.
#include <boost/shared_ptr.hpp>
class LLNotification;
typedef boost::shared_ptr<LLNotification> LLNotificationPtr;
typedef std::shared_ptr<LLNotification> LLNotificationPtr;
#endif

View File

@ -85,7 +85,6 @@
#include <boost/utility.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <boost/type_traits.hpp>
#include <boost/signals2.hpp>
#include <boost/range.hpp>
@ -306,7 +305,7 @@ typedef boost::shared_ptr<LLNotificationVisibilityRule> LLNotificationVisibility
*/
class LLNotification :
boost::noncopyable,
public boost::enable_shared_from_this<LLNotification>
public std::enable_shared_from_this<LLNotification>
{
LOG_CLASS(LLNotification);
friend class LLNotifications;
@ -762,7 +761,10 @@ public:
: mFilter(filter),
mItems()
{}
virtual ~LLNotificationChannelBase() {}
virtual ~LLNotificationChannelBase()
{
mItems.clear();
}
// you can also connect to a Channel, so you can be notified of
// changes to this channel
LLBoundListener connectChanged(const LLEventListener& slot)
@ -892,6 +894,7 @@ class LLNotifications :
{
LLSINGLETON(LLNotifications);
LOG_CLASS(LLNotifications);
virtual ~LLNotifications() {}
public:
@ -1092,7 +1095,11 @@ public:
LLPersistentNotificationChannel()
: LLNotificationChannel("Persistent", "Visible", &notificationFilter)
{}
virtual ~LLPersistentNotificationChannel() {}
virtual ~LLPersistentNotificationChannel()
{
mHistory.clear();
}
typedef std::vector<LLNotificationPtr> history_list_t;
history_list_t::iterator beginHistory() { sortHistory(); return mHistory.begin(); }

View File

@ -1262,7 +1262,7 @@ std::string LLUrlEntryPlace::getLocation(const std::string &url) const
//
LLUrlEntryRegion::LLUrlEntryRegion()
{
mPattern = boost::regex("secondlife:///app/region/[^/\\s]+(/\\d+)?(/\\d+)?(/\\d+)?/?",
mPattern = boost::regex("secondlife:///app/region/[A-Za-z0-9()_%]+(/\\d+)?(/\\d+)?(/\\d+)?/?",
boost::regex::perl|boost::regex::icase);
mMenuName = "menu_url_slurl.xml";
mTooltip = LLTrans::getString("TooltipSLURL");

View File

@ -739,11 +739,6 @@ namespace tut
"XXX secondlife:///app/region/Burning%20Life%20(Hyper)/27/210/30 XXX",
"secondlife:///app/region/Burning%20Life%20(Hyper)/27/210/30");
// DEV-35459: SLURLs and teleport Links not parsed properly
testRegex("Region with quote", url,
"XXX secondlife:///app/region/A'ksha%20Oasis/41/166/701 XXX",
"secondlife:///app/region/A%27ksha%20Oasis/41/166/701");
// Rendering tests.
testLabel("Render /app/region/Ahern/50/50/50/", url,
"secondlife:///app/region/Ahern/50/50/50/",

View File

@ -4387,7 +4387,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
const LLUUID &lost_and_found_id = model->findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND);
const LLUUID &favorites = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE);
const LLUUID &marketplace_listings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false);
const LLUUID &outfits_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS, false); // <FS:Ansariel> Fix "outfits" context menu
const LLUUID &outfits_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS, false);
// <FS:Ansariel> FIRE-11628: Option to delete broken links from AO folder
if (mUUID == AOEngine::instance().getAOFolder())
@ -4395,7 +4395,9 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
items.push_back(std::string("Cleanup broken Links"));
}
// </FS:Ansariel>
// <FS:Ansariel> Fix "outfits" context menu
//if (outfits_id == mUUID)
if (model->isObjectDescendentOf(mUUID, outfits_id) && getCategory() &&
(getCategory()->getPreferredType() == LLFolderType::FT_NONE ||
getCategory()->getPreferredType() == LLFolderType::FT_MY_OUTFITS))
@ -4403,6 +4405,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
items.push_back(std::string("New Outfit"));
}
// </FS:Ansariel>
if (lost_and_found_id == mUUID)
{
// This is the lost+found folder.
@ -4504,7 +4507,8 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
// Not sure what the right thing is to do here.
if (!isCOFFolder() && cat && (cat->getPreferredType() != LLFolderType::FT_OUTFIT))
{
if (!isInboxFolder()) // don't allow creation in inbox
if (!isInboxFolder() // don't allow creation in inbox
&& outfits_id != mUUID)
{
// Do not allow to create 2-level subfolder in the Calling Card/Friends folder. EXT-694.
if (!LLFriendCardsManager::instance().isCategoryInFriendFolder(cat))

View File

@ -31,6 +31,7 @@
#include "lluictrl.h"
#include "llframetimer.h"
#include "llnotificationptr.h"
class LLViewBorder;
class LLUICtrlFactory;
@ -145,7 +146,7 @@ public:
void setTextureSize(S32 width, S32 height);
void showNotification(boost::shared_ptr<class LLNotification> notify);
void showNotification(LLNotificationPtr notify);
void hideNotification();
void setTrustedContent(bool trusted);

View File

@ -256,7 +256,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
LLLineEditor* password_edit(getChild<LLLineEditor>("password_edit"));
password_edit->setKeystrokeCallback(onPassKey, this);
// STEAM-14: When user presses Enter with this field in focus, initiate login
password_edit->setCommitCallback(boost::bind(&LLPanelLogin::onClickConnect, this));
password_edit->setCommitCallback(boost::bind(&LLPanelLogin::onClickConnect, false));
// change z sort of clickable text to be behind buttons
sendChildToBack(getChildView("forgot_password_text"));
@ -267,7 +267,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
{
LLComboBox* favorites_combo = getChild<LLComboBox>("start_location_combo");
updateLocationSelectorsVisibility(); // separate so that it can be called from preferences
favorites_combo->setReturnCallback(boost::bind(&LLPanelLogin::onClickConnect, this));
favorites_combo->setReturnCallback(boost::bind(&LLPanelLogin::onClickConnect, false));
favorites_combo->setFocusLostCallback(boost::bind(&LLPanelLogin::onLocationSLURL, this));
LLComboBox* server_choice_combo = getChild<LLComboBox>("server_combo");
@ -999,12 +999,15 @@ void LLPanelLogin::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent ev
// Protected methods
//---------------------------------------------------------------------------
// static
void LLPanelLogin::onClickConnect(void *)
void LLPanelLogin::onClickConnect(bool commit_fields)
{
if (sInstance && sInstance->mCallback)
{
// JC - Make sure the fields all get committed.
sInstance->setFocus(FALSE);
if (commit_fields)
{
// JC - Make sure the fields all get committed.
sInstance->setFocus(FALSE);
}
LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo");
LLSD combo_val = combo->getSelectedValue();
@ -1127,7 +1130,7 @@ void LLPanelLogin::onUserListCommit(void*)
}
else
{
onClickConnect(NULL);
onClickConnect();
}
}
}

View File

@ -100,7 +100,7 @@ private:
static void setFields(LLPointer<LLCredential> credential);
static void onClickConnect(void*);
static void onClickConnect(bool commit_fields = true);
static void onClickNewAccount(void*);
static void onClickVersion(void*);
static void onClickForgotPassword(void*);

View File

@ -83,6 +83,8 @@
#include "llcallstack.h"
#include "llsettingsdaycycle.h"
#include <boost/regex.hpp>
// Firestorm includes
#include "lfsimfeaturehandler.h"
#include "llviewermenu.h"
@ -150,15 +152,22 @@ public:
// build a secondlife://{PLACE} SLurl from this SLapp
std::string url = "secondlife://";
boost::regex name_rx("[A-Za-z0-9()_%]+");
boost::regex coord_rx("[0-9]+");
for (int i = 0; i < num_params; i++)
{
if (i > 0)
{
url += "/";
}
if (!boost::regex_match(params[i].asString(), i > 0 ? coord_rx : name_rx))
{
return false;
}
url += params[i].asString();
}
// Process the SLapp as if it was a secondlife://{PLACE} SLurl
LLURLDispatcher::dispatch(url, "clicked", web, true);
return true;