From 1dfbce8169dbb9916723031e23a80548d9c496c3 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 8 Apr 2021 16:17:00 +0300 Subject: [PATCH 1/5] SL-15082 fix for app/region SLURLS --- indra/llui/llurlentry.cpp | 2 +- indra/newview/llviewerregion.cpp | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 7250e6ca7e..06e7070f7e 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -1103,7 +1103,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"); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index f007aefc70..359930b2cd 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -82,6 +82,8 @@ #include "llcallstack.h" #include "llsettingsdaycycle.h" +#include + #ifdef LL_WINDOWS #pragma warning(disable:4355) #endif @@ -143,15 +145,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; From 0ad34bfb26aa1c14ab854dc6a86f8c0ea5f8ae51 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 9 Apr 2021 19:23:34 +0300 Subject: [PATCH 2/5] =?UTF-8?q?SL-15094=20FIXED=20=E2=80=98My=20last=20loc?= =?UTF-8?q?ation=E2=80=99=20is=20used=20instead=20of=20entered=20location?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- indra/newview/llpanellogin.cpp | 15 +++++++++------ indra/newview/llpanellogin.h | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 0e7634f1d2..d7462f50e2 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -254,7 +254,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, LLLineEditor* password_edit(getChild("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")); @@ -265,7 +265,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, { LLComboBox* favorites_combo = getChild("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("server_combo"); @@ -997,12 +997,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("server_combo"); LLSD combo_val = combo->getSelectedValue(); @@ -1125,7 +1128,7 @@ void LLPanelLogin::onUserListCommit(void*) } else { - onClickConnect(NULL); + onClickConnect(); } } } diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index c9b8e1b6fc..5871cae059 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -98,7 +98,7 @@ private: static void setFields(LLPointer credential); - static void onClickConnect(void*); + static void onClickConnect(bool commit_fields = true); static void onClickNewAccount(void*); static void onClickVersion(void*); static void onClickForgotPassword(void*); From 94ce45441d3e00a8ff2dac6c41be23fa04cee31b Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Sat, 10 Apr 2021 01:38:17 +0300 Subject: [PATCH 3/5] SL-15082 regexp fix --- indra/llui/llurlentry.cpp | 2 +- indra/llui/tests/llurlentry_test.cpp | 5 ----- indra/newview/llviewerregion.cpp | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 06e7070f7e..6ff1b0764e 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -1103,7 +1103,7 @@ std::string LLUrlEntryPlace::getLocation(const std::string &url) const // LLUrlEntryRegion::LLUrlEntryRegion() { - mPattern = boost::regex("secondlife:///app/region/[A-Za-z0-9]+(/\\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"); diff --git a/indra/llui/tests/llurlentry_test.cpp b/indra/llui/tests/llurlentry_test.cpp index 4a4fdb72e3..1a474cca90 100644 --- a/indra/llui/tests/llurlentry_test.cpp +++ b/indra/llui/tests/llurlentry_test.cpp @@ -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/", diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 359930b2cd..7628a6c7ef 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -145,7 +145,7 @@ public: // build a secondlife://{PLACE} SLurl from this SLapp std::string url = "secondlife://"; - boost::regex name_rx("[A-Za-z0-9]+"); + boost::regex name_rx("[A-Za-z0-9()_%]+"); boost::regex coord_rx("[0-9]+"); for (int i = 0; i < num_params; i++) { From 33b30fd7e0e5bc2c8e0e737402c3e19675a53c3f Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 14 Apr 2021 22:01:23 +0300 Subject: [PATCH 4/5] SL-15077 Mac Crash destroying LLNotificationSet Not a fix. Mac sometimes crashes when destroying mItems in LLPersistentNotificationChannel Decided to try cleaning mItems explicitly to see if it will change callstack, it won't fix the crash, but will help figuring out if source of the issue is in mItems or is LLPersistentNotificationChannel itself --- indra/llui/llnotificationptr.h | 3 +-- indra/llui/llnotifications.h | 15 +++++++++++---- indra/newview/llmediactrl.h | 3 ++- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/indra/llui/llnotificationptr.h b/indra/llui/llnotificationptr.h index acc047527f..580f353c7d 100644 --- a/indra/llui/llnotificationptr.h +++ b/indra/llui/llnotificationptr.h @@ -27,9 +27,8 @@ // Many classes just store a single LLNotificationPtr // and llnotifications.h is very large, so define this ligher header. -#include class LLNotification; -typedef boost::shared_ptr LLNotificationPtr; +typedef std::shared_ptr LLNotificationPtr; #endif diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 2f4578da17..39576ad86d 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -85,7 +85,6 @@ #include #include -#include #include #include #include @@ -304,7 +303,7 @@ typedef boost::shared_ptr LLNotificationVisibility */ class LLNotification : boost::noncopyable, - public boost::enable_shared_from_this + public std::enable_shared_from_this { LOG_CLASS(LLNotification); friend class LLNotifications; @@ -743,7 +742,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) @@ -873,6 +875,7 @@ class LLNotifications : { LLSINGLETON(LLNotifications); LOG_CLASS(LLNotifications); + virtual ~LLNotifications() {} public: @@ -1070,7 +1073,11 @@ public: LLPersistentNotificationChannel() : LLNotificationChannel("Persistent", "Visible", ¬ificationFilter) {} - virtual ~LLPersistentNotificationChannel() {} + + virtual ~LLPersistentNotificationChannel() + { + mHistory.clear(); + } typedef std::vector history_list_t; history_list_t::iterator beginHistory() { sortHistory(); return mHistory.begin(); } diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h index 958c76f261..bd24c47a4f 100644 --- a/indra/newview/llmediactrl.h +++ b/indra/newview/llmediactrl.h @@ -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 notify); + void showNotification(LLNotificationPtr notify); void hideNotification(); void setTrustedContent(bool trusted); From 56eda0385e91d6ede51f874321bbd8ebfd293c2f Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 16 Apr 2021 20:37:02 +0300 Subject: [PATCH 5/5] SL-13395 Allow creating outfit folders under My Outfits --- doc/contributions.txt | 1 + indra/newview/llinventorybridge.cpp | 9 ++++++++- indra/newview/skins/default/xui/en/menu_inventory.xml | 8 ++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index 2b77b58222..9bff7a5a82 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -226,6 +226,7 @@ Ansariel Hiller SL-13364 SL-13858 SL-13697 + SL-13395 Aralara Rajal Arare Chantilly CHUIBUG-191 diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index d35d8456be..a729b276d5 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3987,6 +3987,12 @@ 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); + + if (outfits_id == mUUID) + { + items.push_back(std::string("New Outfit")); + } if (lost_and_found_id == mUUID) { @@ -4085,7 +4091,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)) diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index eda9739976..5a35bbf121 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -151,6 +151,14 @@ function="Inventory.DoCreate" parameter="category" /> + + +