From 02b7e7ce07948a25bc1f58fdbfe3499dc917340f Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 17 Aug 2015 16:08:44 -0700 Subject: Adding llcorehttp to links --- indra/llui/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index 52738aeb6f..282df98974 100755 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -269,6 +269,7 @@ add_library (llui ${llui_SOURCE_FILES}) # Sort by high-level to low-level target_link_libraries(llui ${LLMESSAGE_LIBRARIES} + ${LLCOREHTTP_LIBRARIES} ${LLRENDER_LIBRARIES} ${LLWINDOW_LIBRARIES} ${LLIMAGE_LIBRARIES} @@ -289,6 +290,6 @@ if(LL_TESTS) ) LL_ADD_PROJECT_UNIT_TESTS(llui "${llui_TEST_SOURCE_FILES}") # INTEGRATION TESTS - set(test_libs llui llmessage llcommon ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES}) + set(test_libs llui llmessage llcorehttp llcommon ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES}) LL_ADD_INTEGRATION_TEST(llurlentry llurlentry.cpp "${test_libs}") endif(LL_TESTS) -- cgit v1.2.3 From 62527e6f18f0a035a234cf584e31f7eea93fd4a7 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 18 Aug 2015 17:05:29 -0400 Subject: MAINT-5506: Fix ugly timing bug in llurlentry static initialization. The problem was that class-static LLUrlEntryParcel::sRegionHost was being initialized by copying class-static LLHost::invalid. Naturally, these two statics are initialized in different source files. Since C++ makes no promises about the relative order in which objects in different object files are initialized, it seems we hit a case in which we were trying to initialize sRegionHost by copying a completely uninitialized LLHost::invalid. In general we might attempt to address such cross-translation-unit issues by introducing an LLSingleton. But in this particular case, the punch line is that LLHost::invalid is explicitly constructed identically to a default-constructed LLHost! In other words, LLHost::invalid provides nothing we couldn't get from LLHost(). All it gives us is an opportunity for glitches such as the above. Remove LLHost::invalid and all references, replacing with LLHost(). --- indra/llui/llurlentry.cpp | 4 ++-- indra/llui/tests/llurlentry_stub.cpp | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 6db0d88998..adefae6e2d 100755 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -957,7 +957,7 @@ std::string LLUrlEntryObjectIM::getLocation(const std::string &url) const // LLUrlEntryParcel statics. LLUUID LLUrlEntryParcel::sAgentID(LLUUID::null); LLUUID LLUrlEntryParcel::sSessionID(LLUUID::null); -LLHost LLUrlEntryParcel::sRegionHost(LLHost::invalid); +LLHost LLUrlEntryParcel::sRegionHost; bool LLUrlEntryParcel::sDisconnected(false); std::set LLUrlEntryParcel::sParcelInfoObservers; @@ -1006,7 +1006,7 @@ std::string LLUrlEntryParcel::getLabel(const std::string &url, const LLUrlLabelC void LLUrlEntryParcel::sendParcelInfoRequest(const LLUUID& parcel_id) { - if (sRegionHost == LLHost::invalid || sDisconnected) return; + if (sRegionHost == LLHost() || sDisconnected) return; LLMessageSystem *msg = gMessageSystem; msg->newMessage("ParcelInfoRequest"); diff --git a/indra/llui/tests/llurlentry_stub.cpp b/indra/llui/tests/llurlentry_stub.cpp index 5d3f9ac327..f01178c374 100755 --- a/indra/llui/tests/llurlentry_stub.cpp +++ b/indra/llui/tests/llurlentry_stub.cpp @@ -165,8 +165,6 @@ LLFontGL* LLFontGL::getFontDefault() char const* const _PREHASH_AgentData = (char *)"AgentData"; char const* const _PREHASH_AgentID = (char *)"AgentID"; -LLHost LLHost::invalid(INVALID_PORT,INVALID_HOST_IP_ADDRESS); - LLMessageSystem* gMessageSystem = NULL; // -- cgit v1.2.3 From f96237c963665201b01e565db4c69e6ca9a8c8f1 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 18 Aug 2015 15:18:09 -0700 Subject: Move the CoreHTTP libraries down --- indra/llui/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index 282df98974..95cf32ee4a 100755 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -268,12 +268,12 @@ add_library (llui ${llui_SOURCE_FILES}) # Libraries on which this library depends, needed for Linux builds # Sort by high-level to low-level target_link_libraries(llui - ${LLMESSAGE_LIBRARIES} - ${LLCOREHTTP_LIBRARIES} ${LLRENDER_LIBRARIES} ${LLWINDOW_LIBRARIES} ${LLIMAGE_LIBRARIES} ${LLINVENTORY_LIBRARIES} + ${LLMESSAGE_LIBRARIES} + ${LLCOREHTTP_LIBRARIES} ${LLVFS_LIBRARIES} # ugh, just for LLDir ${LLXUIXML_LIBRARIES} ${LLXML_LIBRARIES} -- cgit v1.2.3 From 250d94316b809bb94f42fec3896940e5c7da41ca Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 19 Aug 2015 11:29:47 -0700 Subject: Keep hunting these down. --- indra/llui/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index 95cf32ee4a..e2bbbb8285 100755 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -290,6 +290,6 @@ if(LL_TESTS) ) LL_ADD_PROJECT_UNIT_TESTS(llui "${llui_TEST_SOURCE_FILES}") # INTEGRATION TESTS - set(test_libs llui llmessage llcorehttp llcommon ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES}) + set(test_libs llui llmessage llcorehttp llcommon ${LLCOMMON_LIBRARIES} ${BOOST_COROUTINE_LIBRARY} ${BOOST_CONTEXT_LIBRARY} ${BOOST_SYSTEM_LIBRARY} ${WINDOWS_LIBRARIES}) LL_ADD_INTEGRATION_TEST(llurlentry llurlentry.cpp "${test_libs}") endif(LL_TESTS) -- cgit v1.2.3 From d3c2ab581763586718bc0cd86d6935bb46dc9d10 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 19 Aug 2015 12:39:51 -0700 Subject: Be sure the correct include is included. --- indra/llui/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llui') diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index e2bbbb8285..259fbde806 100755 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -8,6 +8,7 @@ include(LLImage) include(LLInventory) include(LLMath) include(LLMessage) +include(LLCoreHttp) include(LLRender) include(LLWindow) include(LLVFS) -- cgit v1.2.3 From 7c61728b4bae928b2461f0f933dd1c1fa34ef0aa Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 24 Aug 2015 14:19:30 -0700 Subject: MAINT-4952: Removed a bit of debug code that got included accidentally and change host == LLHost() to host.isInvalid() --- indra/llui/llurlentry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index adefae6e2d..eb7f98e618 100755 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -1006,7 +1006,7 @@ std::string LLUrlEntryParcel::getLabel(const std::string &url, const LLUrlLabelC void LLUrlEntryParcel::sendParcelInfoRequest(const LLUUID& parcel_id) { - if (sRegionHost == LLHost() || sDisconnected) return; + if (sRegionHost.isInvalid() || sDisconnected) return; LLMessageSystem *msg = gMessageSystem; msg->newMessage("ParcelInfoRequest"); -- cgit v1.2.3 From 96e343b49b0b5a0951ffab0beb2e1d09c37bbdc5 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 1 Sep 2015 16:13:52 -0700 Subject: MAINT-5575: Convert the Experience cache into a coro based singleton. --HG-- branch : MAINT-5575 --- indra/llui/CMakeLists.txt | 2 ++ indra/llui/llurlentry.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index 259fbde806..d192aac448 100755 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -11,11 +11,13 @@ include(LLMessage) include(LLCoreHttp) include(LLRender) include(LLWindow) +include(LLCoreHttp) include(LLVFS) include(LLXML) include_directories( ${LLCOMMON_INCLUDE_DIRS} + ${LLCOREHTTP_INCLUDE_DIRS} ${LLIMAGE_INCLUDE_DIRS} ${LLINVENTORY_INCLUDE_DIRS} ${LLMATH_INCLUDE_DIRS} diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index eb7f98e618..e76f2a1550 100755 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -1430,7 +1430,7 @@ std::string LLUrlEntryExperienceProfile::getLabel( const std::string &url, const return LLTrans::getString("ExperienceNameNull"); } - const LLSD& experience_details = LLExperienceCache::get(experience_id); + const LLSD& experience_details = LLExperienceCache::getInstance()->get(experience_id); if(!experience_details.isUndefined()) { std::string experience_name_string = experience_details[LLExperienceCache::NAME].asString(); @@ -1438,7 +1438,7 @@ std::string LLUrlEntryExperienceProfile::getLabel( const std::string &url, const } addObserver(experience_id_string, url, cb); - LLExperienceCache::get(experience_id, boost::bind(&LLUrlEntryExperienceProfile::onExperienceDetails, this, _1)); + LLExperienceCache::getInstance()->get(experience_id, boost::bind(&LLUrlEntryExperienceProfile::onExperienceDetails, this, _1)); return LLTrans::getString("LoadingData"); } -- cgit v1.2.3 From f0d911817369a4c5c55224df7021a0306b104990 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 1 Sep 2015 17:03:08 -0700 Subject: One of the tests defined a namespace in order to fake out the libraries. Removed it. --- indra/llui/tests/llurlentry_test.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/tests/llurlentry_test.cpp b/indra/llui/tests/llurlentry_test.cpp index 15f2354552..ba1cc436f9 100755 --- a/indra/llui/tests/llurlentry_test.cpp +++ b/indra/llui/tests/llurlentry_test.cpp @@ -37,17 +37,17 @@ #include -namespace LLExperienceCache -{ - const LLSD& get( const LLUUID& key) - { - static LLSD boo; - return boo; - } - - void get( const LLUUID& key, callback_slot_t slot ){} - -} +// namespace LLExperienceCache +// { +// const LLSD& get( const LLUUID& key) +// { +// static LLSD boo; +// return boo; +// } +// +// void get( const LLUUID& key, callback_slot_t slot ){} +// +// } typedef std::map settings_map_t; settings_map_t LLUI::sSettingGroups; -- cgit v1.2.3 From c5dc9b1a572f00e69b9cd3b5853f0a3d104af20f Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 1 Sep 2015 21:31:16 -0700 Subject: In Linux build skip url entry test --- indra/llui/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index d192aac448..7fb1db15fb 100755 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -282,6 +282,7 @@ target_link_libraries(llui ${LLXML_LIBRARIES} ${LLMATH_LIBRARIES} ${HUNSPELL_LIBRARY} + ${LLMESSAGE_LIBRARIES} ${LLCOMMON_LIBRARIES} # must be after llimage, llwindow, llrender ) @@ -294,5 +295,7 @@ if(LL_TESTS) LL_ADD_PROJECT_UNIT_TESTS(llui "${llui_TEST_SOURCE_FILES}") # INTEGRATION TESTS set(test_libs llui llmessage llcorehttp llcommon ${LLCOMMON_LIBRARIES} ${BOOST_COROUTINE_LIBRARY} ${BOOST_CONTEXT_LIBRARY} ${BOOST_SYSTEM_LIBRARY} ${WINDOWS_LIBRARIES}) - LL_ADD_INTEGRATION_TEST(llurlentry llurlentry.cpp "${test_libs}") + if(NOT LINUX) + LL_ADD_INTEGRATION_TEST(llurlentry llurlentry.cpp "${test_libs}") + endif(NOT LINUX) endif(LL_TESTS) -- cgit v1.2.3 From 8913ed6692fddc5d72ee01ecb92a21093c5d22ad Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 3 Sep 2015 16:59:00 -0700 Subject: Changes from code review with Nat --- indra/llui/llurlentry.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index e76f2a1550..72ff89f33c 100755 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -1430,7 +1430,7 @@ std::string LLUrlEntryExperienceProfile::getLabel( const std::string &url, const return LLTrans::getString("ExperienceNameNull"); } - const LLSD& experience_details = LLExperienceCache::getInstance()->get(experience_id); + const LLSD& experience_details = LLExperienceCache::instance().get(experience_id); if(!experience_details.isUndefined()) { std::string experience_name_string = experience_details[LLExperienceCache::NAME].asString(); @@ -1438,7 +1438,7 @@ std::string LLUrlEntryExperienceProfile::getLabel( const std::string &url, const } addObserver(experience_id_string, url, cb); - LLExperienceCache::getInstance()->get(experience_id, boost::bind(&LLUrlEntryExperienceProfile::onExperienceDetails, this, _1)); + LLExperienceCache::instance().get(experience_id, boost::bind(&LLUrlEntryExperienceProfile::onExperienceDetails, this, _1)); return LLTrans::getString("LoadingData"); } -- cgit v1.2.3 From ef2b007a6b5f487a946d9930341591f3f1d0437e Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 2 Feb 2016 15:52:38 +0200 Subject: MAINT-1632 FIXED Both radio-buttons are not selected Advanced tab of Preference --- indra/llui/llradiogroup.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/llradiogroup.cpp b/indra/llui/llradiogroup.cpp index b53bb16d97..8cf72928ff 100755 --- a/indra/llui/llradiogroup.cpp +++ b/indra/llui/llradiogroup.cpp @@ -179,6 +179,18 @@ BOOL LLRadioGroup::setSelectedIndex(S32 index, BOOL from_event) return FALSE; } + if (index < -1) + { + // less then minimum value + return FALSE; + } + + if (index < 0 && mSelectedIndex >= 0 && !mAllowDeselect) + { + // -1 is "nothing selected" + return FALSE; + } + if (mSelectedIndex >= 0) { LLRadioCtrl* old_radio_item = mRadioButtons[mSelectedIndex]; -- cgit v1.2.3 From 230fc28d8a72e75a8f2af2ab5fa5ee0e3ccca4a1 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 11 Mar 2016 20:16:03 +0200 Subject: MAINT-6097 FIXED On required update, clicking link to release notes opens browser behind menu --- indra/llui/llnotifications.cpp | 6 ++++++ indra/llui/llnotifications.h | 3 ++- indra/llui/llnotificationtemplate.h | 17 ++++++++++++----- indra/llui/lltextbase.cpp | 14 ++++++++++++-- indra/llui/lltextbase.h | 2 ++ indra/llui/llurlaction.cpp | 5 +++-- indra/llui/llurlaction.h | 2 +- 7 files changed, 38 insertions(+), 11 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 77e7d375c8..0cb959a315 100755 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -417,6 +417,7 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par mExpireOption(p.expire_option), mURLOption(p.url.option), mURLTarget(p.url.target), + mForceUrlsExternal(p.force_urls_external), mUnique(p.unique.isProvided()), mCombineBehavior(p.unique.combine), mPriority(p.priority), @@ -748,6 +749,11 @@ S32 LLNotification::getURLOpenExternally() const return(mTemplatep? mTemplatep->mURLTarget == "_external": -1); } +bool LLNotification::getForceUrlsExternal() const +{ + return (mTemplatep ? mTemplatep->mForceUrlsExternal : false); +} + bool LLNotification::hasUniquenessConstraints() const { return (mTemplatep ? mTemplatep->mUnique : false); diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 010e6caba2..354add0b82 100755 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -553,7 +553,8 @@ public: std::string getLabel() const; std::string getURL() const; S32 getURLOption() const; - S32 getURLOpenExternally() const; + S32 getURLOpenExternally() const; //for url responce option + bool getForceUrlsExternal() const; bool canLogToChat() const; bool canLogToIM() const; bool canShowToast() const; diff --git a/indra/llui/llnotificationtemplate.h b/indra/llui/llnotificationtemplate.h index c23fc53763..bed29254d8 100755 --- a/indra/llui/llnotificationtemplate.h +++ b/indra/llui/llnotificationtemplate.h @@ -177,7 +177,8 @@ struct LLNotificationTemplate Optional persist, log_to_im, show_toast, - log_to_chat; + log_to_chat, + force_urls_external; Optional functor, icon, label, @@ -201,6 +202,7 @@ struct LLNotificationTemplate log_to_im("log_to_im", false), show_toast("show_toast", true), log_to_chat("log_to_chat", true), + force_urls_external("force_urls_external", false), functor("functor"), icon("icon"), label("label"), @@ -284,11 +286,16 @@ struct LLNotificationTemplate // that URL. Obsolete this and eliminate the buttons for affected // messages when we allow clickable URLs in the UI U32 mURLOption; - - std::string mURLTarget; - //This is a flag that tells if the url needs to open externally dispite + + //This is a flag that tells if option url needs to open externally dispite //what the user setting is. - + std::string mURLTarget; + + // All links clicked inside notification will be opened in external browser + // Note: Some notifications block and exit viewer, yet they provide a link + // to click, we should be able to open such links in external browser. + bool mForceUrlsExternal; + // does this notification persist across sessions? if so, it will be // serialized to disk on first receipt and read on startup bool mPersist; diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 4309e6557e..4ccf1ef009 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -164,6 +164,7 @@ LLTextBase::Params::Params() trusted_content("trusted_content", true), use_ellipses("use_ellipses", false), parse_urls("parse_urls", false), + force_urls_external("force_urls_external", false), parse_highlights("parse_highlights", false) { addSynonym(track_end, "track_bottom"); @@ -216,6 +217,7 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p) mWordWrap(p.wrap), mUseEllipses( p.use_ellipses ), mParseHTML(p.parse_urls), + mForceUrlsExternal(p.force_urls_external), mParseHighlights(p.parse_highlights), mBGVisible(p.bg_visible), mScroller(NULL), @@ -1937,7 +1939,7 @@ void LLTextBase::createUrlContextMenu(S32 x, S32 y, const std::string &in_url) registrar.add("Url.Open", boost::bind(&LLUrlAction::openURL, url)); registrar.add("Url.OpenInternal", boost::bind(&LLUrlAction::openURLInternal, url)); registrar.add("Url.OpenExternal", boost::bind(&LLUrlAction::openURLExternal, url)); - registrar.add("Url.Execute", boost::bind(&LLUrlAction::executeSLURL, url)); + registrar.add("Url.Execute", boost::bind(&LLUrlAction::executeSLURL, url, true)); registrar.add("Url.Block", boost::bind(&LLUrlAction::blockObject, url)); registrar.add("Url.Teleport", boost::bind(&LLUrlAction::teleportToLocation, url)); registrar.add("Url.ShowProfile", boost::bind(&LLUrlAction::showProfile, url)); @@ -3227,7 +3229,15 @@ BOOL LLNormalTextSegment::handleMouseUp(S32 x, S32 y, MASK mask) // Only process the click if it's actually in this segment, not to the right of the end-of-line. if(mEditor.getSegmentAtLocalPos(x, y, false) == this) { - LLUrlAction::clickAction(getStyle()->getLinkHREF(), mEditor.isContentTrusted()); + std::string url = getStyle()->getLinkHREF(); + if (!mEditor.mForceUrlsExternal) + { + LLUrlAction::clickAction(url, mEditor.isContentTrusted()); + } + else if (!LLUrlAction::executeSLURL(url, mEditor.isContentTrusted())) + { + LLUrlAction::openURLExternal(url); + } return TRUE; } } diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index ac408bbe7a..7d87271b0e 100755 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -300,6 +300,7 @@ public: wrap, use_ellipses, parse_urls, + force_urls_external, parse_highlights, clip, clip_partial, @@ -654,6 +655,7 @@ protected: S32 mLineSpacingPixels; // padding between lines bool mBorderVisible; bool mParseHTML; // make URLs interactive + bool mForceUrlsExternal; // URLs from this textbox will be opened in external browser bool mParseHighlights; // highlight user-defined keywords bool mWordWrap; bool mUseEllipses; diff --git a/indra/llui/llurlaction.cpp b/indra/llui/llurlaction.cpp index 12537d9dd1..027a3e3a64 100755 --- a/indra/llui/llurlaction.cpp +++ b/indra/llui/llurlaction.cpp @@ -83,12 +83,13 @@ void LLUrlAction::openURLExternal(std::string url) } } -void LLUrlAction::executeSLURL(std::string url) +bool LLUrlAction::executeSLURL(std::string url, bool trusted_content) { if (sExecuteSLURLCallback) { - sExecuteSLURLCallback(url ,true); + return sExecuteSLURLCallback(url, trusted_content); } + return false; } void LLUrlAction::clickAction(std::string url, bool trusted_content) diff --git a/indra/llui/llurlaction.h b/indra/llui/llurlaction.h index 5f3626490c..5497e28bb4 100755 --- a/indra/llui/llurlaction.h +++ b/indra/llui/llurlaction.h @@ -57,7 +57,7 @@ public: static void openURLExternal(std::string url); /// execute the given secondlife: SLURL - static void executeSLURL(std::string url); + static bool executeSLURL(std::string url, bool trusted_content = true); /// if the Url specifies an SL location, teleport there static void teleportToLocation(std::string url); -- cgit v1.2.3 From 0e845dc845817dbf71a9a4f1d8072576f973c457 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 24 Mar 2016 17:09:39 +0200 Subject: MAINT-6214 Unable to add a space before closing curly brace in chatbar, notecards & scripts. --- indra/llui/lltexteditor.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 926326aaff..3c86b539c4 100755 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -1716,7 +1716,20 @@ void LLTextEditor::unindentLineBeforeCloseBrace() LLWString text = getWText(); if( ' ' == text[ mCursorPos - 1 ] ) { - removeCharOrTab(); + S32 line = getLineNumFromDocIndex(mCursorPos, false); + S32 line_start = getLineStart(line); + + // Jump over spaces in the current line + while ((' ' == text[line_start]) && (line_start < mCursorPos)) + { + line_start++; + } + + // Make sure there is nothing but ' ' before the Brace we are unindenting + if (line_start == mCursorPos) + { + removeCharOrTab(); + } } } } @@ -1800,7 +1813,7 @@ BOOL LLTextEditor::handleUnicodeCharHere(llwchar uni_char) // Handle most keys only if the text editor is writeable. if( !mReadOnly ) { - if( '}' == uni_char ) + if( mAutoIndent && '}' == uni_char ) { unindentLineBeforeCloseBrace(); } -- cgit v1.2.3 From 0e155c51a95f092dda4f1ee71b4de46c7e98c10d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 29 Mar 2016 18:52:54 +0300 Subject: MAINT-6257 Textures loading issues. --- indra/llui/lliconctrl.cpp | 11 ++++++++--- indra/llui/lliconctrl.h | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lliconctrl.cpp b/indra/llui/lliconctrl.cpp index f841901801..82b01e705d 100755 --- a/indra/llui/lliconctrl.cpp +++ b/indra/llui/lliconctrl.cpp @@ -83,7 +83,12 @@ void LLIconCtrl::draw() // virtual // value might be a string or a UUID -void LLIconCtrl::setValue(const LLSD& value ) +void LLIconCtrl::setValue(const LLSD& value) +{ + setValue(value, mPriority); +} + +void LLIconCtrl::setValue(const LLSD& value, S32 priority) { LLSD tvalue(value); if (value.isString() && LLUUID::validate(value.asString())) @@ -94,11 +99,11 @@ void LLIconCtrl::setValue(const LLSD& value ) LLUICtrl::setValue(tvalue); if (tvalue.isUUID()) { - mImagep = LLUI::getUIImageByID(tvalue.asUUID(), mPriority); + mImagep = LLUI::getUIImageByID(tvalue.asUUID(), priority); } else { - mImagep = LLUI::getUIImage(tvalue.asString(), mPriority); + mImagep = LLUI::getUIImage(tvalue.asString(), priority); } if(mImagep.notNull() diff --git a/indra/llui/lliconctrl.h b/indra/llui/lliconctrl.h index 7971cd44d3..dd83e78fd3 100755 --- a/indra/llui/lliconctrl.h +++ b/indra/llui/lliconctrl.h @@ -59,6 +59,8 @@ protected: LLIconCtrl(const Params&); friend class LLUICtrlFactory; + void setValue(const LLSD& value, S32 priority); + public: virtual ~LLIconCtrl(); -- cgit v1.2.3