From 616547993a6ad3135987d75eca9f753438984985 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 5 Mar 2025 23:00:47 +0200 Subject: #3654 Searchable disabled settings not readable when highlighted --- indra/llui/llscrolllistctrl.cpp | 2 +- indra/llui/llsearchablecontrol.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 93bd3c6bed..943aff1ca1 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -3394,7 +3394,7 @@ bool LLScrollListCtrl::highlightMatchingItems(const std::string& filter_str) bool res = false; - setHighlightedColor(LLUIColorTable::instance().getColor("SearchableControlHighlightColor", LLColor4::red)); + setHighlightedColor(LLUIColorTable::instance().getColor("SearchableControlHighlightColor", LLColor4::red4)); std::string filter_str_lc(filter_str); LLStringUtil::toLower(filter_str_lc); diff --git a/indra/llui/llsearchablecontrol.h b/indra/llui/llsearchablecontrol.h index 119852b763..7f1421dd19 100644 --- a/indra/llui/llsearchablecontrol.h +++ b/indra/llui/llsearchablecontrol.h @@ -45,7 +45,7 @@ namespace ll const LLColor4& getHighlightColor( ) const { - static LLUIColor highlight_color = LLUIColorTable::instance().getColor("SearchableControlHighlightColor", LLColor4::red); + static LLUIColor highlight_color = LLUIColorTable::instance().getColor("SearchableControlHighlightColor", LLColor4::red4); return highlight_color.get(); } -- cgit v1.2.3 From 3cc72641089aa8271141d3bdef3be7ad1809abda Mon Sep 17 00:00:00 2001 From: Rye Date: Thu, 6 Mar 2025 14:09:29 -0500 Subject: Fix preferences search not finding text defined in text boxes (#3653) --- indra/llui/lltextbox.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/lltextbox.h b/indra/llui/lltextbox.h index a3cde45cd0..500dc8669f 100644 --- a/indra/llui/lltextbox.h +++ b/indra/llui/lltextbox.h @@ -76,6 +76,12 @@ protected: LLUIString mText; callback_t mClickedCallback; bool mShowCursorHand; + +protected: + virtual std::string _getSearchText() const + { + return LLTextBase::_getSearchText() + mText.getString(); + } }; // Build time optimization, generate once in .cpp file -- cgit v1.2.3 From d915cf17dfb4ddd79830f3ff9fea004ba9d2b61c Mon Sep 17 00:00:00 2001 From: Rye Date: Mon, 14 Oct 2024 22:15:43 -0700 Subject: Try to parallelize xcode builds further and add more headers to PCH to reduce build time --- indra/llui/llfolderviewitem.cpp | 2 +- indra/llui/llui.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 18bde344a0..6d0cfcba95 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -23,7 +23,7 @@ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ -#include "../newview/llviewerprecompiledheaders.h" +#include "linden_common.h" #include "llflashtimer.h" diff --git a/indra/llui/llui.h b/indra/llui/llui.h index 375cd539b7..9890d3f7ef 100644 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -31,8 +31,6 @@ #include "llrect.h" #include "llcoord.h" #include "llcontrol.h" -#include "llcoord.h" -#include "llcontrol.h" #include "llinitparam.h" #include "llregistry.h" #include "llrender2dutils.h" -- cgit v1.2.3 From d2dd881a5c840b5132396d6e8353b38b79d69e23 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 20 Mar 2025 19:37:25 +0200 Subject: #3778 #3654 Split text and background selection colors --- indra/llui/llbutton.cpp | 2 +- indra/llui/llmenugl.cpp | 2 +- indra/llui/llscrolllistctrl.cpp | 2 +- indra/llui/llsearchablecontrol.h | 10 ++++++++-- indra/llui/lltextbase.cpp | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 1bce31edb1..d2534b3939 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -837,7 +837,7 @@ void LLButton::draw() // Highlight if needed if( ll::ui::SearchableControl::getHighlighted() ) - label_color = ll::ui::SearchableControl::getHighlightColor(); + label_color = ll::ui::SearchableControl::getHighlightFontColor(); // overlay with keyboard focus border if (hasFocus()) diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 69ffa9a94f..c11b42a348 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -508,7 +508,7 @@ void LLMenuItemGL::draw( void ) // Highlight if needed if( ll::ui::SearchableControl::getHighlighted() ) - color = ll::ui::SearchableControl::getHighlightColor(); + color = ll::ui::SearchableControl::getHighlightFontColor(); // Draw the text on top. if (mBriefItem) diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 943aff1ca1..245339b107 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -3394,7 +3394,7 @@ bool LLScrollListCtrl::highlightMatchingItems(const std::string& filter_str) bool res = false; - setHighlightedColor(LLUIColorTable::instance().getColor("SearchableControlHighlightColor", LLColor4::red4)); + setHighlightedColor(LLUIColorTable::instance().getColor("SearchableControlHighlightBgColor", LLColor4::red4)); std::string filter_str_lc(filter_str); LLStringUtil::toLower(filter_str_lc); diff --git a/indra/llui/llsearchablecontrol.h b/indra/llui/llsearchablecontrol.h index 7f1421dd19..bae85fe9a5 100644 --- a/indra/llui/llsearchablecontrol.h +++ b/indra/llui/llsearchablecontrol.h @@ -43,9 +43,15 @@ namespace ll virtual ~SearchableControl() { } - const LLColor4& getHighlightColor( ) const + const LLColor4& getHighlightBgColor( ) const { - static LLUIColor highlight_color = LLUIColorTable::instance().getColor("SearchableControlHighlightColor", LLColor4::red4); + static LLUIColor highlight_color = LLUIColorTable::instance().getColor("SearchableControlHighlightBgColor", LLColor4::red4); + return highlight_color.get(); + } + + const LLColor4& getHighlightFontColor() const + { + static LLUIColor highlight_color = LLUIColorTable::instance().getColor("SearchableControlHighlightFontColor", LLColor4::red4); return highlight_color.get(); } diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index fae22fd248..41e7094163 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1378,7 +1378,7 @@ void LLTextBase::draw() // Draw highlighted if needed if( ll::ui::SearchableControl::getHighlighted() ) { - const LLColor4& bg_color = ll::ui::SearchableControl::getHighlightColor(); + const LLColor4& bg_color = ll::ui::SearchableControl::getHighlightBgColor(); LLRect bg_rect = mVisibleTextRect; if( mScroller ) bg_rect.intersectWith( text_rect ); -- cgit v1.2.3 From 4e80ec7e962dde43c8d7379f0167a242704336ad Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 26 Mar 2025 19:51:59 +0200 Subject: #3814 Out of range exception in TextCmdRemove::execute --- indra/llui/lltexteditor.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 3537c764b9..77a4976f6b 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -209,8 +209,15 @@ public: } virtual bool execute( LLTextBase* editor, S32* delta ) { - mWString = editor->getWText().substr(getPosition(), mLen); - *delta = remove(editor, getPosition(), mLen ); + try + { + mWString = editor->getWText().substr(getPosition(), mLen); + *delta = remove(editor, getPosition(), mLen); + } + catch (std::out_of_range&) + { + return false; + } return (*delta != 0); } virtual S32 undo( LLTextBase* editor ) -- cgit v1.2.3 From 7d5a5e939a7427fb0cabc99e10f75d7d99c5f133 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Thu, 27 Mar 2025 18:02:19 +0200 Subject: #3820 crash at LLNotificationTemplate --- indra/llui/llnotifications.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 7405413a3d..6fc9b90fb8 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -1251,7 +1251,8 @@ LLNotifications::LLNotifications() void LLNotifications::clear() { - mDefaultChannels.clear(); + mDefaultChannels.clear(); + mTemplates.clear(); } // The expiration channel gets all notifications that are cancelled -- cgit v1.2.3 From 193cab14c2cf629e5bf012fc830cb1132389d101 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Sat, 29 Mar 2025 14:40:33 +0200 Subject: #3836 Fix crash at LLNotificationForm::getNumElements()/LLSD::size() --- indra/llui/llnotifications.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 6fc9b90fb8..634d8f71a2 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -614,6 +614,13 @@ void LLNotification::cancel() LLSD LLNotification::getResponseTemplate(EResponseTemplateType type) { LLSD response = LLSD::emptyMap(); + + if (!mForm) + { + LL_WARNS("Notifications") << "Null form when getting response template for notification " << getName() << LL_ENDL; + return response; + } + for (S32 element_idx = 0; element_idx < mForm->getNumElements(); ++element_idx) @@ -1465,6 +1472,13 @@ bool LLNotifications::templateExists(std::string_view name) void LLNotifications::forceResponse(const LLNotification::Params& params, S32 option) { LLNotificationPtr temp_notify(new LLNotification(params)); + + if (!temp_notify->getForm()) + { + LL_WARNS("Notifications") << "Cannot force response for notification with null form: " << (std::string)params.name << LL_ENDL; + return; + } + LLSD response = temp_notify->getResponseTemplate(); LLSD selected_item = temp_notify->getForm()->getElement(option); -- cgit v1.2.3 From e671cb54fee9cb7b7da39953eb96eabc9151f687 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 29 Mar 2025 22:40:59 +0200 Subject: #3795 Crash at getVolatileAPRPool() --- indra/llui/llcommandmanager.cpp | 2 ++ indra/llui/llnotifications.cpp | 18 +++++++++++++++++- indra/llui/llnotifications.h | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llcommandmanager.cpp b/indra/llui/llcommandmanager.cpp index 03717da80b..b10ec51f18 100644 --- a/indra/llui/llcommandmanager.cpp +++ b/indra/llui/llcommandmanager.cpp @@ -170,12 +170,14 @@ bool LLCommandManager::load() if (!parser.readXUI(commands_file, commandsParams)) { + LLError::LLUserWarningMsg::showMissingFiles(); LL_ERRS() << "Unable to load xml file: " << commands_file << LL_ENDL; return false; } if (!commandsParams.validateBlock()) { + LLError::LLUserWarningMsg::showMissingFiles(); LL_ERRS() << "Invalid commands file: " << commands_file << LL_ENDL; return false; } diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 634d8f71a2..a05feab1d9 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -1256,10 +1256,26 @@ LLNotifications::LLNotifications() LLInstanceTracker::instanceCount(); } + +LLNotifications::~LLNotifications() +{ + // Clear explicitly, something in ~LLNotifications() crashes so narrowing down suspects + pHistoryChannel = nullptr; + pExpirationChannel = nullptr; + mGlobalStrings.clear(); + mTemplates.clear(); + mVisibilityRules.clear(); + mUniqueNotifications.clear(); + mListener = nullptr; +} + void LLNotifications::clear() { mDefaultChannels.clear(); - mTemplates.clear(); + // At this point mTemplates still gets used by lingering notifications + // to do responses (ex: group notice will call forceResponse()), but + // since network should be down and everything save, it's questionable + // whether it should stay that way } // The expiration channel gets all notifications that are cancelled diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 46286457cf..138f1969d5 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -887,7 +887,7 @@ class LLNotifications : { LLSINGLETON(LLNotifications); LOG_CLASS(LLNotifications); - virtual ~LLNotifications() {} + virtual ~LLNotifications(); public: -- cgit v1.2.3