From 89ce328ba58db2a5443eb0035a8cb82726bb7e6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Thu, 26 Mar 2020 23:31:52 -0400 Subject: [PATCH 1/5] Fix script dialogs showing UI SLURLs when SinguReplaceLinks is false All interface SLURLs should be force replaced. Also fixes text boxes not respecting setting at all --- indra/newview/llnotify.cpp | 4 +++- indra/newview/llviewermessage.cpp | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/indra/newview/llnotify.cpp b/indra/newview/llnotify.cpp index 6866643ec..17a6b28ef 100644 --- a/indra/newview/llnotify.cpp +++ b/indra/newview/llnotify.cpp @@ -224,7 +224,9 @@ LLNotifyBox::LLNotifyBox(LLNotificationPtr notification) if (!mIsCaution || !mIsTip) // We could do some extra color math here to determine if bg's too close to link color, but let's just cross with the link color instead mText->setLinkColor(new LLColor4(lerp(text_color, gSavedSettings.getColor4("HTMLLinkColor"), 0.4f))); mText->setTabStop(FALSE); // can't tab to it (may be a problem for scrolling via keyboard) - mText->appendText(message,false,false,style,!layout_script_dialog); // Now we can set the text, since colors have been set. + mText->appendText(message,false,false,style); // Now we can set the text, since colors have been set. + if (is_textbox || layout_script_dialog) + mText->appendText(notification->getSubstitutions()["SCRIPT_MESSAGE"], false, true, style, false); addChild(mText); } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index e18c66c84..2a0758ba4 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -7020,7 +7020,8 @@ void process_script_dialog(LLMessageSystem* msg, void**) LLSD args; args["TITLE"] = object_name; - args["MESSAGE"] = message; + args["MESSAGE"] = LLStringUtil::null; + args["SCRIPT_MESSAGE"] = message; args["CHANNEL"] = chat_channel; LLNotificationPtr notification; char const* name = (is_group && !is_text_box) ? "GROUPNAME" : "NAME"; From 731283aa0bd3108b84cdb827968fa92357875e64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Fri, 27 Mar 2020 00:51:45 -0400 Subject: [PATCH 2/5] Friendship accepted notifications as tips with linked names --- indra/newview/llimprocessing.cpp | 2 +- indra/newview/skins/default/xui/en-us/notifications.xml | 4 ++-- indra/newview/skins/default/xui/fr/notifications.xml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index 226ab7769..5f30bcf94 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -1842,7 +1842,7 @@ void LLIMProcessing::processNewMessage(const LLUUID& from_id, strings.push_back(from_id.asString()); send_generic_message("requestonlinenotification", strings); - args["NAME"] = name; + args["NAME"] = LLAvatarActions::getSLURL(from_id); LLSD payload; payload["from_id"] = from_id; LLAvatarNameCache::get(from_id, boost::bind(¬ification_display_name_callback, _1, _2, "FriendshipAccepted", args, payload)); diff --git a/indra/newview/skins/default/xui/en-us/notifications.xml b/indra/newview/skins/default/xui/en-us/notifications.xml index 53bfad2b9..101dbabcf 100644 --- a/indra/newview/skins/default/xui/en-us/notifications.xml +++ b/indra/newview/skins/default/xui/en-us/notifications.xml @@ -7862,7 +7862,7 @@ Offer a teleport? icon="notify.tga" name="FriendshipAccepted" log_to_im="true" - type="notify"> + type="notifytip"> friendship [NAME] accepted your friendship offer. @@ -7872,7 +7872,7 @@ Offer a teleport? name="FriendshipDeclined" log_to_im="true" persist="true" - type="notify"> + type="notifytip"> friendship [NAME] declined your friendship offer. diff --git a/indra/newview/skins/default/xui/fr/notifications.xml b/indra/newview/skins/default/xui/fr/notifications.xml index d141ac555..2d8e0d1e2 100644 --- a/indra/newview/skins/default/xui/fr/notifications.xml +++ b/indra/newview/skins/default/xui/fr/notifications.xml @@ -3386,11 +3386,11 @@ L'objet [OBJECTFROMNAME] appartenant à un utilisateur inconnu vous a donné un( -[NAME_SLURL] a accepté votre amitié. [MESSAGE] +[NAME] a accepté votre amitié. -[NAME_SLURL] a refusé votre amitié. [MESSAGE] +[NAME] a refusé votre amitié. From 45f4f601bfdefb137a99dc8b136360613d0c4b18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Fri, 27 Mar 2020 02:35:06 -0400 Subject: [PATCH 3/5] nopaque --- .../skins/default/xui/en-us/floater_experienceprofile.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en-us/floater_experienceprofile.xml b/indra/newview/skins/default/xui/en-us/floater_experienceprofile.xml index e531d21ab..2a043b5f0 100644 --- a/indra/newview/skins/default/xui/en-us/floater_experienceprofile.xml +++ b/indra/newview/skins/default/xui/en-us/floater_experienceprofile.xml @@ -64,7 +64,6 @@ height="530" left="0" name="xp_scroll" - opaque="true" bottom="0" width="348"> Date: Sat, 28 Mar 2020 16:38:14 -0400 Subject: [PATCH 4/5] Clean up old Experience UI port code --- indra/newview/llpanelexperiencepicker.cpp | 5 ++--- indra/newview/llpanelexperiencepicker.h | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/indra/newview/llpanelexperiencepicker.cpp b/indra/newview/llpanelexperiencepicker.cpp index 00993d1ec..38772f5b6 100644 --- a/indra/newview/llpanelexperiencepicker.cpp +++ b/indra/newview/llpanelexperiencepicker.cpp @@ -62,13 +62,12 @@ const static std::string columnSpace = " "; /* Singu Note: We do not have injectors, so we'll have to call this function instead static LLPanelInjector t_panel_status("llpanelexperiencepicker"); */ -void* create_xp_picker(void* data) { return new LLPanelExperiencePicker(false); } -LLPanelExperiencePicker::LLPanelExperiencePicker(bool build) +LLPanelExperiencePicker::LLPanelExperiencePicker() :LLPanel() { //buildFromFile("panel_experience_search.xml"); - if (build) LLUICtrlFactory::getInstance()->buildPanel(this, "panel_experience_search.xml"); // Singu Note: Use filename in xml + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_experience_search.xml"); // Singu Note: Use filename in xml setDefaultFilters(); } diff --git a/indra/newview/llpanelexperiencepicker.h b/indra/newview/llpanelexperiencepicker.h index ba3e5d299..1af7fe108 100644 --- a/indra/newview/llpanelexperiencepicker.h +++ b/indra/newview/llpanelexperiencepicker.h @@ -32,7 +32,6 @@ class LLScrollListCtrl; class LLLineEditor; -void* create_xp_picker(void* data); class LLPanelExperiencePicker final : public LLPanel { public: @@ -44,7 +43,7 @@ public: typedef std::function filter_function; typedef std::vector filter_list; - LLPanelExperiencePicker(bool build = true); + LLPanelExperiencePicker(); virtual ~LLPanelExperiencePicker(); BOOL postBuild() override; From 407b527a5565af1064459a0e1ad8b516249f8b77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sun, 29 Mar 2020 00:43:21 -0400 Subject: [PATCH 5/5] [XPTools] Fix linux crash bug, make Cancel button close Experiences floater --- indra/newview/llpanelexperiencepicker.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/llpanelexperiencepicker.cpp b/indra/newview/llpanelexperiencepicker.cpp index 38772f5b6..d27393d25 100644 --- a/indra/newview/llpanelexperiencepicker.cpp +++ b/indra/newview/llpanelexperiencepicker.cpp @@ -32,6 +32,7 @@ #include "lllineeditor.h" #include "llfloaterexperienceprofile.h" +#include "llfloaterexperiences.h" //#include "llfloaterreg.h" #include "lluictrlfactory.h" #include "llscrolllistctrl.h" @@ -287,7 +288,7 @@ void LLPanelExperiencePicker::onBtnSelect() void LLPanelExperiencePicker::onBtnClose() { - LLFloater* floater = static_cast(getParent()); + LLFloater* floater = mSelectionCallback ? static_cast(getParent()) : LLFloaterExperiences::findInstance(); if (floater) { floater->close();