From cfa2c4e4248f466968c294d8c0cf26a2410fa7b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 6 Nov 2019 06:42:13 -0500 Subject: [PATCH 001/281] Fix Beware's issue with SinguReplaceLinks being partially broken recently --- indra/newview/llfloaterchat.cpp | 4 +++- indra/newview/llviewermessage.cpp | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index e36a41975..38d94199b 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -225,12 +225,13 @@ void add_timestamped_line(LLViewerTextEditor* edit, LLChat chat, const LLColor4& style->setColor(color); style->mItalic = is_irc; style->mBold = chat.mChatType == CHAT_TYPE_SHOUT; - edit->appendText(line, false, prepend_newline, style, false); + edit->appendText(line, false, prepend_newline, style, chat.mSourceType == CHAT_SOURCE_SYSTEM); } void LLFloaterChat::addChatHistory(const std::string& str, bool log_to_file) { LLChat chat(str); + chat.mSourceType = CHAT_SOURCE_SYSTEM; addChatHistory(chat, log_to_file); } @@ -344,6 +345,7 @@ void LLFloaterChat::onClickToggleShowMute(bool show_mute, LLTextEditor* history_ void LLFloaterChat::addChat(const std::string& str, BOOL from_im, BOOL local_agent) { LLChat chat(str); + chat.mSourceType = CHAT_SOURCE_SYSTEM; addChat(chat, from_im, local_agent); } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index c23ffa186..02861ca42 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1419,6 +1419,8 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& return false; } + chat.mSourceType = CHAT_SOURCE_SYSTEM; // There's a slim potential of a user-editable field being a url here? + LLViewerInventoryCategory* catp = NULL; catp = gInventory.getCategory(mObjectID); LLViewerInventoryItem* itemp = NULL; From 927e86bdc962583bfdd8d5b119a7d172df4a28d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 6 Nov 2019 06:42:45 -0500 Subject: [PATCH 002/281] Feature Request: Link names in transaction messages --- indra/newview/llviewermessage.cpp | 55 +++++-------------------------- 1 file changed, 9 insertions(+), 46 deletions(-) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 02861ca42..b5d7ee252 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6436,39 +6436,6 @@ static std::string reason_from_transaction_type(S32 transaction_type, } } -static void money_balance_group_notify(const LLUUID& group_id, - const std::string& name, - bool is_group, - std::string message, - LLStringUtil::format_map_t args, - LLSD payload) -{ - bool no_transaction_clutter = gSavedSettings.getBOOL("LiruNoTransactionClutter"); - std::string notification = no_transaction_clutter ? "Payment" : "SystemMessage"; - args["NAME"] = name; - LLSD msg_args; - msg_args["MESSAGE"] = LLTrans::getString(message,args); - LLNotificationsUtil::add(notification,msg_args,payload); - - if (!no_transaction_clutter) LLFloaterChat::addChat(msg_args["MESSAGE"].asString()); // Alerts won't automatically log to chat. -} - -static void money_balance_avatar_notify(const LLUUID& agent_id, - const LLAvatarName& av_name, - std::string message, - LLStringUtil::format_map_t args, - LLSD payload) -{ - bool no_transaction_clutter = gSavedSettings.getBOOL("LiruNoTransactionClutter"); - std::string notification = no_transaction_clutter ? "Payment" : "SystemMessage"; - args["NAME"] = av_name.getNSName(); - LLSD msg_args; - msg_args["MESSAGE"] = LLTrans::getString(message,args); - LLNotificationsUtil::add(notification,msg_args,payload); - - if (!no_transaction_clutter) LLFloaterChat::addChat(msg_args["MESSAGE"].asString()); // Alerts won't automatically log to chat. -} - static void process_money_balance_reply_extended(LLMessageSystem* msg) { // Added in server 1.40 and viewer 2.1, support for localization @@ -6573,19 +6540,15 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg) // Despite using SLURLs, wait until the name is available before // showing the notification, otherwise the UI layout is strange and // the user sees a "Loading..." message - if (is_name_group) - { - gCacheName->getGroup(name_id, - boost::bind(&money_balance_group_notify, - _1, _2, _3, message, - args, payload)); - } - else { - LLAvatarNameCache::get(name_id, - boost::bind(&money_balance_avatar_notify, - _1, _2, message, - args, payload)); - } + // Singu Note: Wat? SLURLs resolve over time, not the end of the world. + bool no_transaction_clutter = gSavedSettings.getBOOL("LiruNoTransactionClutter"); + std::string notification = no_transaction_clutter ? "Payment" : "SystemMessage"; + args["NAME"] = is_name_group ? LLGroupActions::getSLURL(name_id) : LLAvatarActions::getSLURL(name_id); + LLSD msg_args; + msg_args["MESSAGE"] = LLTrans::getString(message,args); + LLNotificationsUtil::add(notification,msg_args,payload); + + if (!no_transaction_clutter) LLFloaterChat::addChat(msg_args["MESSAGE"].asString()); // Alerts won't automatically log to chat. } bool handle_prompt_for_maturity_level_change_callback(const LLSD& notification, const LLSD& response) From 573934e50539c84c29adb59f63175f67751fbefd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Thu, 7 Nov 2019 06:30:37 -0500 Subject: [PATCH 003/281] Disable Breakpad symbol generation, not needed for crashpad --- indra/newview/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 57ad1b0b2..b42aa525e 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1840,7 +1840,7 @@ if (INSTALL) include(${CMAKE_CURRENT_SOURCE_DIR}/ViewerInstall.cmake) endif (INSTALL) -if (PACKAGE AND USE_CRASHPAD) +if (FALSE) # Breakpad symbol-file generation set(SYMBOL_NAME ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${VIEWER_CHANNEL_NOSPACE}-${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}-symbols) From a6623184173575bee1e2b42ca396a3c617bcd444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Thu, 7 Nov 2019 09:24:14 -0500 Subject: [PATCH 004/281] We must download LibVLC during installation --- .../installers/windows/installer_template.nsi | 13 +++++++++++++ indra/newview/viewer_manifest.py | 2 ++ 2 files changed, 15 insertions(+) diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index b2d52808a..e268a4b28 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -408,6 +408,19 @@ Section "Viewer" ;This placeholder is replaced by the complete list of all the files in the installer, by viewer_manifest.py %%INSTALL_FILES%% + + ;Download LibVLC +!ifdef WIN64_BIN_BUILD + NSISdl::download "http://download.videolan.org/pub/videolan/vlc/2.2.8/win64/vlc-2.2.8-win64.7z" "$INSTDIR\libvlc.7z" +!else + NSISdl::download "http://download.videolan.org/pub/videolan/vlc/2.2.8/win32/vlc-2.2.8-win32.7z" "$INSTDIR\libvlc.7z" +!endif + Nsis7z::Extract "$INSTDIR\libvlc.7z" + Rename "$INSTDIR\vlc-2.2.8\libvlc.dll" "$INSTDIR\llplugin\libvlc.dll" + Rename "$INSTDIR\vlc-2.2.8\libvlccore.dll" "$INSTDIR\llplugin\libvlccore.dll" + Rename "$INSTDIR\vlc-2.2.8\plugins" "$INSTDIR\llplugin\plugins" + RMDir /r "$INSTDIR\vlc-2.2.8" + Delete "$INSTDIR\libvlc.7z" ;Pass the installer's language to the client to use as a default StrCpy $SHORTCUT_LANG_PARAM "--set InstallLanguage $(LanguageCode)" diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 30eef53ea..94f51e662 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -660,6 +660,8 @@ class WindowsManifest(ViewerManifest): out_path = None for pkg_file in dest_files: rel_file = os.path.normpath(pkg_file.replace(self.get_dst_prefix()+os.path.sep,'')) + if install and rel_file.startswith(("llplugin\\libvlc", "llplugin\\plugins\\")): + continue installed_dir = wpath(os.path.join('$INSTDIR', os.path.dirname(rel_file))) pkg_file = wpath(os.path.normpath(pkg_file)) if installed_dir != out_path: From 5035f9c3d6a67fddd582fb98f29c840003f99ef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Thu, 7 Nov 2019 11:33:27 -0500 Subject: [PATCH 005/281] Fix Track item in slurl menus being broken --- indra/newview/llviewermenu.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 171abfce2..0c6a26832 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -9456,6 +9456,7 @@ struct MenuSLURLDict : public LLSingleton insert("RequestTeleport", LLAvatarActions::teleportRequest); void teleport_to(const LLUUID& id); insert("TeleportTo", teleport_to, is_nearby); + insert("Track", track_av, is_nearby); insert("Focus", LLFloaterAvatarList::setFocusAvatar, is_nearby); insert("ParcelEject", [](const LLUUID& id) { confirm_eject(uuid_vec_t(1, id)); }, is_nearby); insert("Freeze", [](const LLUUID& id) { confirm_freeze(uuid_vec_t(1, id)); }, is_nearby); From 16a352c70a43ca7cc65287cd2b3a4a74dc799ec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Thu, 7 Nov 2019 12:30:11 -0500 Subject: [PATCH 006/281] Fix Bridge Autodetach yet again, thanks for the report Beware! --- indra/newview/llattachmentsmgr.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/indra/newview/llattachmentsmgr.cpp b/indra/newview/llattachmentsmgr.cpp index 5395d42df..2be3da1d4 100644 --- a/indra/newview/llattachmentsmgr.cpp +++ b/indra/newview/llattachmentsmgr.cpp @@ -481,13 +481,6 @@ void LLAttachmentsMgr::onAttachmentArrived(const LLUUID& inv_item_id) bool expected = mAttachmentRequests.getTime(inv_item_id, timer); LLInventoryItem *item = gInventory.getItem(inv_item_id); - if (item && boost::algorithm::contains(item->getName(), " Bridge v") && gSavedSettings.getBOOL("SGDetachBridge")) - { - LL_INFOS() << "Bridge detected! detaching" << LL_ENDL; - LLVOAvatarSelf::detachAttachmentIntoInventory(item->getUUID()); - return; - } - if (!expected) { LL_WARNS() << "ATT Attachment was unexpected or arrived after " << MAX_ATTACHMENT_REQUEST_LIFETIME << " seconds: " @@ -505,6 +498,13 @@ void LLAttachmentsMgr::onAttachmentArrived(const LLUUID& inv_item_id) mCOFLinkBatchTimer.reset(); } mRecentlyArrivedAttachments.insert(inv_item_id); + + static const LLCachedControl detach_bridge("SGDetachBridge"); + if (detach_bridge && item && boost::algorithm::contains(item->getName(), " Bridge v")) + { + LL_INFOS() << "Bridge detected! detaching" << LL_ENDL; + LLVOAvatarSelf::detachAttachmentIntoInventory(item->getUUID()); + } } void LLAttachmentsMgr::onDetachRequested(const LLUUID& inv_item_id) From b527918350b330b4789fc3a004ac17be3c60771f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Thu, 7 Nov 2019 12:47:59 -0500 Subject: [PATCH 007/281] Shorten format string --- indra/newview/llfloaterregioninfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 792f28cb2..fb12e4b24 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -4130,7 +4130,7 @@ void handlePseudoISO8601(const std::string& date_str, LLSD& column, const std::s else { std::tm time = {}; - if (std::istringstream(date_str) >> std::get_time(&time, "%Y-%m-%d %T")) + if (std::istringstream(date_str) >> std::get_time(&time, "%F %T")) { column["value"] = LLDate(mktime(&time)); column["type"] = "date"; From 4e39027958f0f7040fc20a126570cadf39e7eff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Thu, 7 Nov 2019 13:23:50 -0500 Subject: [PATCH 008/281] Fix Linux build, thanks Router~ --- indra/newview/llfloaterregioninfo.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index fb12e4b24..b6aeadc68 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -4121,6 +4121,27 @@ const std::string& getNAString() return na; } +#if defined(__GNUC__) && __GNUC__ < 5 // On GCC 4, implement std::get_time using strptime +#include + +namespace std +{ + struct get_time + { + tm* mTime; + const char* mFmt; + get_time(tm* time, const char* fmt) : mTime(time), mFmt(fmt) {} + }; + + istringstream& operator>>(istringstream&& str, get_time&& rhs) + { + if (!strptime(str.str().data(), rhs.mFmt, rhs.mTime)) + str.setstate(ios_base::failbit); + return str; + } +} +#endif + void handlePseudoISO8601(const std::string& date_str, LLSD& column, const std::string& fmt) { if (date_str.front() == '0') // server returns the "0000-00-00 00:00:00" date in case it doesn't know it From b78807e5ed4e2bfff4c04076a28845addc354ee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Thu, 7 Nov 2019 13:55:07 -0500 Subject: [PATCH 009/281] Merge llnameui changes from future branch to use lighter rlv headers --- indra/newview/llnameui.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/newview/llnameui.cpp b/indra/newview/llnameui.cpp index 3c3a50a14..bd31a11da 100644 --- a/indra/newview/llnameui.cpp +++ b/indra/newview/llnameui.cpp @@ -40,7 +40,8 @@ #include "llgroupactions.h" #include "lltrans.h" -#include "rlvhandler.h" +#include "rlvactions.h" +#include "rlvcommon.h" // statics std::set LLNameUI::sInstances; @@ -97,7 +98,7 @@ void LLNameUI::setNameText() if (!mIsGroup && got_name && mRLVSensitive) // Filter if needed { - if ((gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) + if ((RlvActions::hasBehaviour(RLV_BHVR_SHOWNAMES) || RlvActions::hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) && mNameID != gAgentID && RlvUtil::isNearbyAgent(mNameID)) { mAllowInteract = false; From 60e71f5724571da42e7b03afc2cb31e35a2ffacc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sat, 16 Nov 2019 03:49:47 -0500 Subject: [PATCH 010/281] Fix Beware's issue with SinguReplaceLinks failing for system messages Fixes Teleport Offers in local being links Fixes System Messages in IMs not enforcing link replacement Fixes IM Chat History being loaded with replacement support, at the log point, we can only consider it text from an outside source. Changes IM Chat History color from hard coded grey to SystemChatColor --- indra/newview/llagent.cpp | 1 + indra/newview/llimpanel.cpp | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index f5ea77a9d..22ba22f9e 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -4973,6 +4973,7 @@ void LLAgent::onFoundLureDestination(LLSimInfo *siminfo) msg.append(llformat(" (%s)", maturity.c_str())); } LLChat chat(msg); + chat.mSourceType = CHAT_SOURCE_SYSTEM; LLFloaterChat::addChat(chat); } else diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 7d1dedbda..5f7a0d083 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -813,16 +813,19 @@ void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, LLColor4 incol std::string show_name = name; bool is_irc = false; + bool system = name.empty(); // 'name' is a sender name that we want to hotlink so that clicking on it opens a profile. - if (!name.empty()) // If name exists, then add it to the front of the message. + if (!system) // If name exists, then add it to the front of the message. { // Don't hotlink any messages from the system (e.g. "Second Life:"), so just add those in plain text. if (name == SYSTEM_FROM) { + system = true; mHistoryEditor->appendColoredText(name,false,prepend_newline,incolor); } else { + system = !from_user; // IRC style text starts with a colon here; empty names and system messages aren't irc style. static const LLCachedControl italicize("LiruItalicizeActions"); is_irc = italicize && utf8msg[0] != ':'; @@ -831,7 +834,7 @@ void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, LLColor4 incol // Convert the name to a hotlink and add to message. LLStyleSP source_style = LLStyleMap::instance().lookupAgent(source); source_style->mItalic = is_irc; - mHistoryEditor->appendText(show_name,false,prepend_newline,source_style, false); + mHistoryEditor->appendText(show_name,false,prepend_newline,source_style, system); } prepend_newline = false; } @@ -842,7 +845,7 @@ void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, LLColor4 incol style->setColor(incolor); style->mItalic = is_irc; style->mBold = from_user && gSavedSettings.getBOOL("SingularityBoldGroupModerator") && isModerator(source); - mHistoryEditor->appendText(utf8msg, false, prepend_newline, style, false); + mHistoryEditor->appendText(utf8msg, false, prepend_newline, style, system); } if (log_to_file @@ -1667,7 +1670,8 @@ void LLFloaterIMPanel::chatFromLogFile(LLLogChat::ELogLineType type, std::string } //self->addHistoryLine(line, LLColor4::grey, FALSE); - self->mHistoryEditor->appendColoredText(message, false, true, LLColor4::grey); + LLStyleSP style(new LLStyle(gSavedSettings.getColor4("SystemChatColor"))); + self->mHistoryEditor->appendText(message, false, true, style, false); } void LLFloaterIMPanel::showSessionStartError( From fc649854ff3439823b8b77d77e7fb6d88f4cac05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sat, 16 Nov 2019 09:14:19 -0500 Subject: [PATCH 011/281] Add Selected Avatars submenu to minimap menu Minimap refactor, make it an LFIDBearer! Moves listeners to cpp file, no need for header exposure Removes duplicate ToggleControl listener just for minimap Removes excess code from ToggleOverlay, we can use two on_clicks instead Caches direction labels instead of looking them up each frame Removes weird userdata look up on camera center menu item, fixing it Respect RLVa by hiding the submenu, shortcutting lookups per child --- indra/newview/llnetmap.cpp | 380 +++++++++--------- indra/newview/llnetmap.h | 145 +------ .../skins/default/xui/en-us/menu_mini_map.xml | 46 +-- 3 files changed, 233 insertions(+), 338 deletions(-) diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 53463dea8..318c20b34 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -84,6 +84,82 @@ // [/RLVa:KB] using namespace LLOldEvents; +typedef LLMemberListener view_listener_t; + +class LLScaleMap : public view_listener_t +{ +public: + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); +}; + +class LLChatRings : public view_listener_t +{ +public: + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); +}; + +class LLCheckChatRings : public view_listener_t +{ +public: + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); +}; + +class LLStopTracking : public view_listener_t +{ +public: + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); +}; + +class LLIsTracking : public view_listener_t +{ +public: + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); +}; + +//moymod - Custom minimap markers :o +class mmsetred : public view_listener_t //moymod +{ +public: + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); +}; +class mmsetgreen : public view_listener_t //moymod +{ +public: + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); +}; +class mmsetblue : public view_listener_t //moymod +{ +public: + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); +}; +class mmsetyellow : public view_listener_t //moymod +{ +public: + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); +}; +class mmsetcustom : public view_listener_t //moymod +{ +public: + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); +}; +class mmsetunmark : public view_listener_t //moymod +{ +public: + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); +}; +class mmenableunmark : public view_listener_t //moymod +{ +public: + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); +}; + +// [SL:KB] - Patch: World-MiniMap | Checked: 2012-07-08 (Catznip-3.3.0) +class OverlayToggle : public view_listener_t +{ +public: + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); +}; +// [/SL:KB] const F32 LLNetMap::MAP_SCALE_MIN = 32; const F32 LLNetMap::MAP_SCALE_MID = 256; @@ -103,7 +179,7 @@ const S32 CIRCLE_STEPS = 100; const F64 COARSEUPDATE_MAX_Z = 1020.0f; std::map LLNetMap::mClosestAgentsToCursor; // -static std::map mClosestAgentsAtLastClick; // +uuid_vec_t LLNetMap::mClosestAgentsAtLastClick; // LLNetMap::LLNetMap(const std::string& name) : LLPanel(name), @@ -144,26 +220,29 @@ LLNetMap::~LLNetMap() BOOL LLNetMap::postBuild() { + mELabel = getChild("e_label"); + mNLabel = getChild("n_label"); + mWLabel = getChild("w_label"); + mSLabel = getChild("s_label"); + mNELabel = getChild("ne_label"); + mNWLabel = getChild("nw_label"); + mSWLabel = getChild("sw_label"); + mSELabel = getChild("se_label"); + // Register event listeners for popup menu - (new LLScaleMap())->registerListener(this, "MiniMap.ZoomLevel"); - (new LLCenterMap())->registerListener(this, "MiniMap.Center"); - (new LLCheckCenterMap())->registerListener(this, "MiniMap.CheckCenter"); - (new LLChatRings())->registerListener(this, "MiniMap.ChatRings"); - (new LLCheckChatRings())->registerListener(this, "MiniMap.CheckChatRings"); - (new LLStopTracking())->registerListener(this, "MiniMap.StopTracking"); - (new LLEnableTracking())->registerListener(this, "MiniMap.EnableTracking"); - (new LLShowAgentProfile())->registerListener(this, "MiniMap.ShowProfile"); - (new LLEnableProfile())->registerListener(this, "MiniMap.EnableProfile"); - (new LLCamFollow())->registerListener(this, "MiniMap.CamFollow"); //moymod - add cam follow crap thingie - (new mmsetred())->registerListener(this, "MiniMap.setred"); - (new mmsetgreen())->registerListener(this, "MiniMap.setgreen"); - (new mmsetblue())->registerListener(this, "MiniMap.setblue"); - (new mmsetyellow())->registerListener(this, "MiniMap.setyellow"); - (new mmsetcustom())->registerListener(this, "MiniMap.setcustom"); - (new mmsetunmark())->registerListener(this, "MiniMap.setunmark"); - (new mmenableunmark())->registerListener(this, "MiniMap.enableunmark"); - (new LLToggleControl())->registerListener(this, "MiniMap.ToggleControl"); - (new OverlayToggle())->registerListener(this, "Minimap.ToggleOverlay"); + (new LLScaleMap())->registerListener(gMenuHolder, "MiniMap.ZoomLevel"); + (new LLChatRings())->registerListener(gMenuHolder, "MiniMap.ChatRings"); + (new LLCheckChatRings())->registerListener(gMenuHolder, "MiniMap.CheckChatRings"); + (new LLStopTracking())->registerListener(gMenuHolder, "StopTracking"); + (new LLIsTracking())->registerListener(gMenuHolder, "IsTracking"); + (new mmsetred())->registerListener(gMenuHolder, "MiniMap.setred"); + (new mmsetgreen())->registerListener(gMenuHolder, "MiniMap.setgreen"); + (new mmsetblue())->registerListener(gMenuHolder, "MiniMap.setblue"); + (new mmsetyellow())->registerListener(gMenuHolder, "MiniMap.setyellow"); + (new mmsetcustom())->registerListener(gMenuHolder, "MiniMap.setcustom"); + (new mmsetunmark())->registerListener(gMenuHolder, "MiniMap.setunmark"); + (new mmenableunmark())->registerListener(gMenuHolder, "MiniMap.enableunmark"); + (new OverlayToggle())->registerListener(gMenuHolder, "Minimap.ToggleOverlay"); // [SL:KB] - Patch: World-MinimapOverlay | Checked: 2012-06-20 (Catznip-3.3.0) LLViewerParcelMgr::instance().setCollisionUpdateCallback(boost::bind(&LLNetMap::refreshParcelOverlay, this)); @@ -257,8 +336,8 @@ void LLNetMap::draw() } // [/SL:KB] - static LLUICachedControl center("MiniMapCenter"); - if (center != MAP_CENTER_NONE) + static const LLUICachedControl center("MiniMapCenter"); + if (center) { mCurPan = lerp(mCurPan, mTargetPan, LLSmoothInterpolation::getInterpolant(0.1f)); } @@ -558,14 +637,14 @@ void LLNetMap::draw() gmSelected = LLFloaterAvatarList::instance().getSelectedIDs(); // Draw avatars - for(LLWorld::pos_map_t::const_iterator iter = positions.cbegin(), iter_end = positions.cend(); iter != iter_end; ++iter) + for(const auto& pair : positions) { - const LLUUID& uuid = iter->first; + const LLUUID& uuid = pair.first; static const LLCachedControl standard_color("MapAvatar",LLColor4(0.f,1.f,0.f,1.f)); LLColor4 color = standard_color; // TODO: it'd be very cool to draw these in sorted order from lowest Z to highest. // just be careful to sort the avatar IDs along with the positions. -MG - const LLVector3d& position = iter->second; + const LLVector3d& position = pair.second; pos_map = globalPosToView(position); if (position.mdV[VZ] == 0.f || position.mdV[VZ] == COARSEUPDATE_MAX_Z) { @@ -732,15 +811,15 @@ void LLNetMap::draw() gGL.popUIMatrix(); // Rotation of 0 means that North is up - setDirectionPos( getChild("e_label"), rotation); - setDirectionPos( getChild("n_label"), rotation + F_PI_BY_TWO); - setDirectionPos( getChild("w_label"), rotation + F_PI); - setDirectionPos( getChild("s_label"), rotation + F_PI + F_PI_BY_TWO); + setDirectionPos(mELabel, rotation); + setDirectionPos(mNLabel, rotation + F_PI_BY_TWO); + setDirectionPos(mWLabel, rotation + F_PI); + setDirectionPos(mSLabel, rotation + F_PI + F_PI_BY_TWO); - setDirectionPos( getChild("ne_label"), rotation + F_PI_BY_TWO / 2); - setDirectionPos( getChild("nw_label"), rotation + F_PI_BY_TWO + F_PI_BY_TWO / 2); - setDirectionPos( getChild("sw_label"), rotation + F_PI + F_PI_BY_TWO / 2); - setDirectionPos( getChild("se_label"), rotation + F_PI + F_PI_BY_TWO + F_PI_BY_TWO / 2); + setDirectionPos(mNELabel, rotation + F_PI_BY_TWO / 2); + setDirectionPos(mNWLabel, rotation + F_PI_BY_TWO + F_PI_BY_TWO / 2); + setDirectionPos(mSWLabel, rotation + F_PI + F_PI_BY_TWO / 2); + setDirectionPos(mSELabel, rotation + F_PI + F_PI_BY_TWO + F_PI_BY_TWO / 2); LLUICtrl::draw(); } @@ -858,8 +937,8 @@ BOOL LLNetMap::handleScrollWheel(S32 x, S32 y, S32 clicks) setScale(new_scale); - static LLUICachedControl center("MiniMapCenter"); - if (center == MAP_CENTER_NONE) + static const LLUICachedControl center("MiniMapCenter"); + if (!center) { // Adjust pan to center the zoom on the mouse pointer LLVector2 zoom_offset; @@ -888,7 +967,7 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, std::string& tool_tip, LLRect* stick sticky_rect.mRight = sticky_rect.mLeft + 2 * SLOP; sticky_rect.mTop = sticky_rect.mBottom + 2 * SLOP; - tool_tip.assign(""); + tool_tip.clear(); if (region->mMapAvatarIDs.size()) { @@ -902,10 +981,10 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, std::string& tool_tip, LLRect* stick std::map::iterator current = mClosestAgentsToCursor.begin(); std::map::iterator end = mClosestAgentsToCursor.end(); - for (; current != end; ++current) + for (const auto& target : mClosestAgentsToCursor) { - LLUUID targetUUID = (*current).first; - LLVector3d targetPosition = (*current).second; + const auto& targetUUID = target.first; + auto targetPosition = target.second; std::string fullName; if (targetUUID.notNull() && LLAvatarNameCache::getNSName(targetUUID, fullName)) @@ -932,7 +1011,7 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, std::string& tool_tip, LLRect* stick tool_tip.append(llformat(" (%.02fm)\n", distance)); } } - tool_tip.append("\n"); + tool_tip += '\n'; } } // [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-04 (RLVa-1.0.0a) | Modified: RLVa-0.2.0b @@ -940,9 +1019,9 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, std::string& tool_tip, LLRect* stick // [/RLVa:KB] //tool_tip.append("\n\n" + region->getName()); - tool_tip.append("\n" + region->getHost().getHostName()); - tool_tip.append("\n" + region->getHost().getString()); - tool_tip.append("\n" + getToolTip()); + tool_tip.append('\n' + region->getHost().getHostName()); + tool_tip.append('\n' + region->getHost().getString()); + tool_tip.append('\n' + getToolTip()); } else { @@ -971,19 +1050,16 @@ void LLNetMap::setDirectionPos( LLTextBox* text_box, F32 rotation ) void LLNetMap::updateMinorDirections() { - if (getChild("ne_label", TRUE, FALSE) == NULL) - { - return; - } + if (!mNELabel) return; // Hide minor directions if they cover too much of the map - bool show_minors = getChild("ne_label")->getRect().getHeight() < MAP_MINOR_DIR_THRESHOLD * + bool show_minors = mNELabel->getRect().getHeight() < MAP_MINOR_DIR_THRESHOLD * llmin(getRect().getWidth(), getRect().getHeight()); - getChild("ne_label")->setVisible(show_minors); - getChild("nw_label")->setVisible(show_minors); - getChild("sw_label")->setVisible(show_minors); - getChild("se_label")->setVisible(show_minors); + mNELabel->setVisible(show_minors); + mNWLabel->setVisible(show_minors); + mSWLabel->setVisible(show_minors); + mSELabel->setVisible(show_minors); } void LLNetMap::renderScaledPointGlobal( const LLVector3d& pos, const LLColor4U &color, F32 radius_meters ) @@ -1283,29 +1359,29 @@ BOOL LLNetMap::handleMouseUp( S32 x, S32 y, MASK mask ) } // [SL:KB] - Patch: World-MiniMap | Checked: 2012-07-08 (Catznip-3.3.0) -bool LLNetMap::OverlayToggle::handleEvent(LLPointer event, const LLSD& sdParam) +bool OverlayToggle::handleEvent(LLPointer event, const LLSD& sdParam) { - // Toggle the setting - const std::string strControl = sdParam.asString(); - BOOL fCurValue = gSavedSettings.getBOOL(strControl); - gSavedSettings.setBOOL(strControl, !fCurValue); - // Force an overlay update - mPtr->mUpdateParcelImage = true; + LFIDBearer::getActive()->mUpdateParcelImage = true; return true; } // [/SL:KB] BOOL LLNetMap::handleRightMouseDown(S32 x, S32 y, MASK mask) { - mClosestAgentsAtLastClick = mClosestAgentsToCursor; + mClosestAgentsAtLastClick.clear(); + mClosestAgentsAtLastClick.reserve(mClosestAgentsToCursor.size()); + for (const auto& pair : mClosestAgentsToCursor) + mClosestAgentsAtLastClick.push_back(pair.first); mClosestAgentAtLastRightClick = mClosestAgentToCursor; if (mPopupMenu) { - // Singu TODO: It'd be spectacular to address multiple avatars from here. - mPopupMenu->buildDrawLabels(); - mPopupMenu->updateParent(LLMenuGL::sMenuContainer); - LLMenuGL::showPopup(this, mPopupMenu, x, y); + showMenu(this, mPopupMenu, x, y); + mPopupMenu->getChildView("avs_menu")->setVisible(!mClosestAgentsAtLastClick.empty() && +// [RLVa:LF] - 2019 + !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) +// [/RLVa:LF] + ); } return TRUE; } @@ -1396,22 +1472,22 @@ BOOL LLNetMap::handleHover( S32 x, S32 y, MASK mask ) } // static -bool LLNetMap::LLScaleMap::handleEvent(LLPointer event, const LLSD& userdata) +bool LLScaleMap::handleEvent(LLPointer event, const LLSD& userdata) { - LLNetMap *self = mPtr; + LLNetMap *self = LFIDBearer::getActive(); S32 level = userdata.asInteger(); switch(level) { case 0: - self->setScale(MAP_SCALE_MIN); + self->setScale(LLNetMap::MAP_SCALE_MIN); break; case 1: - self->setScale(MAP_SCALE_MID); + self->setScale(LLNetMap::MAP_SCALE_MID); break; case 2: - self->setScale(MAP_SCALE_MAX); + self->setScale(LLNetMap::MAP_SCALE_MAX); break; default: break; @@ -1423,149 +1499,85 @@ bool LLNetMap::LLScaleMap::handleEvent(LLPointer event, const LLSD& use //moymod - minimap color shit void markMassAgents(const LLColor4& color) { - std::map::iterator current = mClosestAgentsAtLastClick.begin(); - std::map::iterator end = mClosestAgentsAtLastClick.end(); - for(; current != end; ++current) LLNetMap::mm_setcolor((*current).first, color); + auto self = LFIDBearer::getActive(); + for (const auto& id : self->getSelectedIDs()) + self->mm_setcolor(id, color); } -bool LLNetMap::mmsetred::handleEvent(LLPointer, const LLSD&) +bool mmsetred::handleEvent(LLPointer, const LLSD&) { - markMassAgents(LLColor4::red); return true; -} -bool LLNetMap::mmsetgreen::handleEvent(LLPointer, const LLSD&) -{ - markMassAgents(LLColor4::green); return true; -} -bool LLNetMap::mmsetblue::handleEvent(LLPointer, const LLSD&) -{ - markMassAgents(LLColor4::blue); return true; -} -bool LLNetMap::mmsetyellow::handleEvent(LLPointer, const LLSD&) -{ - markMassAgents(LLColor4::yellow); return true; -} -bool LLNetMap::mmsetcustom::handleEvent(LLPointer, const LLSD&) -{ - markMassAgents(gSavedSettings.getColor4("MoyMiniMapCustomColor")); return true; -} -bool LLNetMap::mmsetunmark::handleEvent(LLPointer, const LLSD&) -{ - std::map::iterator it = mClosestAgentsAtLastClick.begin(); - std::map::iterator end = mClosestAgentsAtLastClick.end(); - for(; it!= end; ++it) mm_MarkerColors.erase((*it).first); + markMassAgents(LLColor4::red); return true; } -bool LLNetMap::mmenableunmark::handleEvent(LLPointer, const LLSD& userdata) +bool mmsetgreen::handleEvent(LLPointer, const LLSD&) +{ + markMassAgents(LLColor4::green); + return true; +} +bool mmsetblue::handleEvent(LLPointer, const LLSD&) +{ + markMassAgents(LLColor4::blue); + return true; +} +bool mmsetyellow::handleEvent(LLPointer, const LLSD&) +{ + markMassAgents(LLColor4::yellow); + return true; +} +bool mmsetcustom::handleEvent(LLPointer, const LLSD&) +{ + markMassAgents(gSavedSettings.getColor4("MoyMiniMapCustomColor")); + return true; +} +bool mmsetunmark::handleEvent(LLPointer, const LLSD&) +{ + for (const auto& id : LFIDBearer::getActiveSelectedIDs()) + mm_MarkerColors.erase(id); + return true; +} +bool mmenableunmark::handleEvent(LLPointer, const LLSD& userdata) { bool enabled(false); - std::map::iterator it = mClosestAgentsAtLastClick.begin(); - std::map::iterator end = mClosestAgentsAtLastClick.end(); - for(; it != end && !enabled; ++it) enabled = mm_MarkerColors.find((*it).first) != mm_MarkerColors.end(); + for (const auto& id : LFIDBearer::getActiveSelectedIDs()) + if (enabled = mm_MarkerColors.find(id) != mm_MarkerColors.end()) + break; mPtr->findControl(userdata["control"].asString())->setValue(enabled); return true; } -bool LLNetMap::LLCenterMap::handleEvent(LLPointer event, const LLSD& userdata) +bool LLChatRings::handleEvent(LLPointer event, const LLSD& userdata) { - EMiniMapCenter center = (EMiniMapCenter)userdata.asInteger(); + auto whisper = gSavedSettings.getControl("MiniMapWhisperRing"); + auto chat = gSavedSettings.getControl("MiniMapChatRing"); + auto shout = gSavedSettings.getControl("MiniMapShoutRing"); + bool all_enabled = whisper->get() && chat->get() && shout->get(); - if (gSavedSettings.getS32("MiniMapCenter") == center) - { - gSavedSettings.setS32("MiniMapCenter", MAP_CENTER_NONE); - } - else - { - gSavedSettings.setS32("MiniMapCenter", userdata.asInteger()); - } + whisper->set(!all_enabled); + chat->set(!all_enabled); + shout->set(!all_enabled); return true; } -bool LLNetMap::LLCheckCenterMap::handleEvent(LLPointer event, const LLSD& userdata) +bool LLCheckChatRings::handleEvent(LLPointer event, const LLSD& userdata) { - LLNetMap *self = mPtr; - EMiniMapCenter center = (EMiniMapCenter)userdata["data"].asInteger(); - BOOL enabled = (gSavedSettings.getS32("MiniMapCenter") == center); + bool all_enabled = gSavedSettings.getBOOL("MiniMapWhisperRing") + && gSavedSettings.getBOOL("MiniMapChatRing") + && gSavedSettings.getBOOL("MiniMapShoutRing"); - self->findControl(userdata["control"].asString())->setValue(enabled); + mPtr->findControl(userdata["control"].asString())->setValue(all_enabled); return true; } -bool LLNetMap::LLChatRings::handleEvent(LLPointer event, const LLSD& userdata) -{ - BOOL whisper_enabled = gSavedSettings.getBOOL("MiniMapWhisperRing"); - BOOL chat_enabled = gSavedSettings.getBOOL("MiniMapChatRing"); - BOOL shout_enabled = gSavedSettings.getBOOL("MiniMapShoutRing"); - BOOL all_enabled = whisper_enabled && chat_enabled && shout_enabled; - - gSavedSettings.setBOOL("MiniMapWhisperRing", !all_enabled); - gSavedSettings.setBOOL("MiniMapChatRing", !all_enabled); - gSavedSettings.setBOOL("MiniMapShoutRing", !all_enabled); - - return true; -} - -bool LLNetMap::LLCheckChatRings::handleEvent(LLPointer event, const LLSD& userdata) -{ - BOOL whisper_enabled = gSavedSettings.getBOOL("MiniMapWhisperRing"); - BOOL chat_enabled = gSavedSettings.getBOOL("MiniMapChatRing"); - BOOL shout_enabled = gSavedSettings.getBOOL("MiniMapShoutRing"); - BOOL all_enabled = whisper_enabled && chat_enabled && shout_enabled; - - LLNetMap *self = mPtr; - self->findControl(userdata["control"].asString())->setValue(all_enabled); - return true; -} - -bool LLNetMap::LLStopTracking::handleEvent(LLPointer event, const LLSD& userdata) +bool LLStopTracking::handleEvent(LLPointer event, const LLSD& userdata) { LLTracker::stopTracking(false); return true; } -bool LLNetMap::LLEnableTracking::handleEvent(LLPointer event, const LLSD& userdata) +bool LLIsTracking::handleEvent(LLPointer event, const LLSD& userdata) { - LLNetMap *self = mPtr; - self->findControl(userdata["control"].asString())->setValue(LLTracker::isTracking()); + mPtr->findControl(userdata["control"].asString())->setValue(LLTracker::isTracking()); return true; } - -bool LLNetMap::LLCamFollow::handleEvent(LLPointer event, const LLSD& userdata) -{ - LLNetMap *self = mPtr; - LLFloaterAvatarList::lookAtAvatar(self->mClosestAgentAtLastRightClick); - return true; -} - - -bool LLNetMap::LLShowAgentProfile::handleEvent(LLPointer event, const LLSD& userdata) -{ - LLNetMap *self = mPtr; -// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.0b - if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) - { - LLAvatarActions::showProfile(self->mClosestAgentAtLastRightClick); - } -// [/RLVa:KB] - //LLAvatarActions::showProfile(self->mClosestAgentAtLastRightClick); - return true; -} - -bool LLNetMap::LLEnableProfile::handleEvent(LLPointer event, const LLSD& userdata) -{ - LLNetMap *self = mPtr; -// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.0b - self->findControl(userdata["control"].asString())->setValue( - (self->isAgentUnderCursor()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ); -// [/RLVa:KB] - //self->findControl(userdata["control"].asString())->setValue(self->isAgentUnderCursor()); - return true; -} - -bool LLNetMap::LLToggleControl::handleEvent(LLPointer event, const LLSD& userdata) -{ - std::string control_name = userdata.asString(); - gSavedSettings.setBOOL(control_name, !gSavedSettings.getBOOL(control_name)); - return true; -} diff --git a/indra/newview/llnetmap.h b/indra/newview/llnetmap.h index 0b291b5bc..b5e102889 100644 --- a/indra/newview/llnetmap.h +++ b/indra/newview/llnetmap.h @@ -33,33 +33,20 @@ #ifndef LL_LLNETMAP_H #define LL_LLNETMAP_H -#include "llmath.h" +#include "lfidbearer.h" #include "llpanel.h" -#include "llmemberlistener.h" -#include "v3math.h" -#include "v3dmath.h" -#include "v4color.h" -#include "llpointer.h" -#include "llcoord.h" class LLTextBox; class LLImageRaw; class LLViewerTexture; class LLFloaterMap; -class LLMenuGL; // [SL:KB] - Patch: World-MinimapOverlay | Checked: 2012-06-20 (Catznip-3.3.0) class LLViewerRegion; class LLAvatarName; // [/SL:KB] -enum EMiniMapCenter -{ - MAP_CENTER_NONE = 0, - MAP_CENTER_CAMERA = 1 -}; - -class LLNetMap : public LLPanel +class LLNetMap : public LLPanel, public LFIDBearer { public: LLNetMap(const std::string& name); @@ -81,6 +68,10 @@ public: /*virtual*/ BOOL handleRightMouseDown( S32 x, S32 y, MASK mask ); /*virtual*/ BOOL handleDoubleClick( S32 x, S32 y, MASK mask ); + LLUUID getStringUUIDSelectedItem() const override { return mClosestAgentAtLastRightClick; } + uuid_vec_t getSelectedIDs() const override { return mClosestAgentsAtLastClick; } + S32 getNumSelected() const override { return mClosestAgentsAtLastClick.size(); } + static void mm_setcolor(LLUUID key,LLColor4 col); //moymod @@ -127,6 +118,15 @@ protected: private: // [/SL:KB] + LLTextBox *mELabel = nullptr, + *mNLabel = nullptr, + *mWLabel = nullptr, + *mSLabel = nullptr, + *mNELabel = nullptr, + *mNWLabel = nullptr, + *mSWLabel = nullptr, + *mSELabel = nullptr; + F32 mScale; // Size of a region in pixels F32 mPixelsPerMeter; // world meters to map pixels F32 mObjectMapTPM; // texels per meter on map @@ -152,125 +152,12 @@ private: // [/SL:KB] static std::map mClosestAgentsToCursor; // + static uuid_vec_t mClosestAgentsAtLastClick; // LLUUID mClosestAgentToCursor; LLUUID mClosestAgentAtLastRightClick; - static void showAgentProfile(void*); BOOL isAgentUnderCursor() { return mClosestAgentToCursor.notNull(); } - - class LLScaleMap : public LLMemberListener - { - public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); - }; - - class LLCenterMap : public LLMemberListener - { - public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); - }; - - class LLCheckCenterMap : public LLMemberListener - { - public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); - }; - - class LLChatRings : public LLMemberListener - { - public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); - }; - - class LLCheckChatRings : public LLMemberListener - { - public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); - }; - - class LLStopTracking : public LLMemberListener - { - public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); - }; - - class LLEnableTracking : public LLMemberListener - { - public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); - }; - - class LLShowAgentProfile : public LLMemberListener - { - public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); - }; - - class LLCamFollow : public LLMemberListener //moymod - { - public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); - }; - - //moymod - Custom minimap markers :o - class mmsetred : public LLMemberListener //moymod - { - public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); - }; - class mmsetgreen : public LLMemberListener //moymod - { - public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); - }; - class mmsetblue : public LLMemberListener //moymod - { - public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); - }; - class mmsetyellow : public LLMemberListener //moymod - { - public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); - }; - class mmsetcustom : public LLMemberListener //moymod - { - public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); - }; - class mmsetunmark : public LLMemberListener //moymod - { - public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); - }; - class mmenableunmark : public LLMemberListener //moymod - { - public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); - }; - - - class LLEnableProfile : public LLMemberListener - { - public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); - }; - - class LLToggleControl : public LLMemberListener - { - public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); - }; - -// [SL:KB] - Patch: World-MiniMap | Checked: 2012-07-08 (Catznip-3.3.0) - class OverlayToggle : public LLMemberListener - { - public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); - }; -// [/SL:KB] - LLMenuGL* mPopupMenu; }; diff --git a/indra/newview/skins/default/xui/en-us/menu_mini_map.xml b/indra/newview/skins/default/xui/en-us/menu_mini_map.xml index 9e43a178a..7b0322702 100644 --- a/indra/newview/skins/default/xui/en-us/menu_mini_map.xml +++ b/indra/newview/skins/default/xui/en-us/menu_mini_map.xml @@ -12,11 +12,11 @@ - - + + - + @@ -35,8 +35,9 @@ label="Property Lines" name="Property Lines"> + @@ -44,8 +45,9 @@ label="Parcels for Sale" name="Parcels for Sale"> + @@ -69,30 +71,23 @@ - + - + - + - - - - - - - - - - + + + @@ -109,13 +104,14 @@ + + + + + - - - - - + From 78fbc214ca45e7c997fdeda6c8464c8ec11c0cd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sat, 16 Nov 2019 10:02:01 -0500 Subject: [PATCH 012/281] Make chat loaded from log file be in LogChatColor instead of hardcoded grey --- indra/newview/app_settings/settings.xml | 18 ++++++++++++++++++ indra/newview/llfloaterchat.cpp | 2 +- indra/newview/llimpanel.cpp | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index e1ba77b93..cc0f350ea 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2079,6 +2079,24 @@ This should be as low as possible, but too low may break functionality IsCOA 1 + LogChatColor + + Comment + Color of chat messages loaded from your log + Persist + 1 + Type + Color4 + Value + + 0.5 + 0.5 + 0.5 + 1.0 + + IsCOA + 1 + UISndAlert Comment diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index 38d94199b..a2c7a2d12 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -277,7 +277,7 @@ void LLFloaterChat::addChatHistory(LLChat& chat, bool log_to_file) LLColor4 color = get_text_color(chat); - if (!log_to_file) color = LLColor4::grey; //Recap from log file. + if (!log_to_file) color = gSavedSettings.getColor("LogChatColor"); //Recap from log file. if (chat.mChatType == CHAT_TYPE_DEBUG_MSG) { diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 5f7a0d083..9bc06a915 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1670,7 +1670,7 @@ void LLFloaterIMPanel::chatFromLogFile(LLLogChat::ELogLineType type, std::string } //self->addHistoryLine(line, LLColor4::grey, FALSE); - LLStyleSP style(new LLStyle(gSavedSettings.getColor4("SystemChatColor"))); + LLStyleSP style(new LLStyle(true, gSavedSettings.getColor4("LogChatColor"), LLStringUtil::null)); self->mHistoryEditor->appendText(message, false, true, style, false); } From 89abfe6f86f66cc5ca7911cd830d76a945c39df5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sat, 16 Nov 2019 10:47:13 -0500 Subject: [PATCH 013/281] Fix group names on certain group profiles sometimes never Loading in --- indra/newview/llnamebox.cpp | 4 +++- indra/newview/llnameui.cpp | 26 +++++++++++++++----------- indra/newview/llnameui.h | 3 ++- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/indra/newview/llnamebox.cpp b/indra/newview/llnamebox.cpp index 28a465a57..ca2c398cf 100644 --- a/indra/newview/llnamebox.cpp +++ b/indra/newview/llnamebox.cpp @@ -86,7 +86,9 @@ void LLNameBox::initFromXML(LLXMLNodePtr node, LLView* parent) node->getAttributeString("initial_value", mInitialValue); setText(mInitialValue); node->getAttribute_bool("rlv_sensitive", mRLVSensitive); - node->getAttribute_bool("is_group", mIsGroup); + bool is_group; + node->getAttribute_bool("is_group", is_group); + setIsGroup(is_group); } // static diff --git a/indra/newview/llnameui.cpp b/indra/newview/llnameui.cpp index bd31a11da..10e113a04 100644 --- a/indra/newview/llnameui.cpp +++ b/indra/newview/llnameui.cpp @@ -47,10 +47,21 @@ std::set LLNameUI::sInstances; LLNameUI::LLNameUI(const std::string& loading, bool rlv_sensitive, const LLUUID& id, bool is_group) -: mNameID(id), mRLVSensitive(rlv_sensitive), mIsGroup(is_group), mAllowInteract(false) +: mNameID(id), mRLVSensitive(rlv_sensitive), mIsGroup(!is_group), mAllowInteract(false) , mInitialValue(!loading.empty() ? loading : LLTrans::getString("LoadingData")) { - if (mIsGroup) sInstances.insert(this); + setIsGroup(is_group); +} + +void LLNameUI::setIsGroup(bool is_group) +{ + if (mIsGroup != is_group) + { + if (mIsGroup = is_group) + sInstances.insert(this); + else + sInstances.erase(this); + } } void LLNameUI::setNameID(const LLUUID& name_id, bool is_group) @@ -58,14 +69,7 @@ void LLNameUI::setNameID(const LLUUID& name_id, bool is_group) mNameID = name_id; mConnection.disconnect(); - if (mIsGroup != is_group) - { - if (is_group) - sInstances.insert(this); - else - sInstances.erase(this); - } - mIsGroup = is_group; + setIsGroup(is_group); if (mAllowInteract = mNameID.notNull()) { @@ -139,4 +143,4 @@ void LLNameUI::showProfile() LLGroupActions::show(mNameID); else LLAvatarActions::showProfile(mNameID); -} \ No newline at end of file +} diff --git a/indra/newview/llnameui.h b/indra/newview/llnameui.h index 3d392675c..4bf53ae46 100644 --- a/indra/newview/llnameui.h +++ b/indra/newview/llnameui.h @@ -51,6 +51,7 @@ struct LLNameUI : public LFIDBearer uuid_vec_t getSelectedIDs() const override final { return { mNameID }; } S32 getNumSelected() const override final { return 1; } + void setIsGroup(bool is_group); void setNameID(const LLUUID& name_id, bool is_group); void setNameText(); // Sets the name to whatever the name cache has at the moment void refresh(const LLUUID& id, const std::string& full_name, bool is_group); @@ -84,4 +85,4 @@ protected: bool mIsGroup; bool mAllowInteract; std::string mInitialValue; -}; \ No newline at end of file +}; From d93bed216a99667a08f95e1c7c743e33309b5ced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sat, 16 Nov 2019 12:34:36 -0500 Subject: [PATCH 014/281] Fix careless mistake breaking item properties floater --- indra/newview/llnamebox.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/indra/newview/llnamebox.cpp b/indra/newview/llnamebox.cpp index ca2c398cf..b3aa72fad 100644 --- a/indra/newview/llnamebox.cpp +++ b/indra/newview/llnamebox.cpp @@ -86,9 +86,12 @@ void LLNameBox::initFromXML(LLXMLNodePtr node, LLView* parent) node->getAttributeString("initial_value", mInitialValue); setText(mInitialValue); node->getAttribute_bool("rlv_sensitive", mRLVSensitive); - bool is_group; - node->getAttribute_bool("is_group", is_group); - setIsGroup(is_group); + if (node->hasAttribute("is_group")) + { + bool is_group; + node->getAttribute_bool("is_group", is_group); + setIsGroup(is_group); + } } // static From 0b4f576c548181933ba44ce0fa108d3b870114b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sat, 16 Nov 2019 15:36:11 -0500 Subject: [PATCH 015/281] Touch up merge for llurlentry --- indra/llui/llurlentry.cpp | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index a737c446f..75d1c3b3e 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -1,5 +1,3 @@ -// This is an open source non-commercial project. Dear PVS-Studio, please check it. -// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com /** * @file llurlentry.cpp * @author Martin Reddy @@ -72,7 +70,7 @@ std::string LLUrlEntryBase::getIcon(const std::string &url) LLStyleSP LLUrlEntryBase::getStyle() const { - static LLUICachedControl color("HTMLLinkColor"); + static const LLUICachedControl color("HTMLLinkColor"); LLStyleSP style_params(new LLStyle(true, color, LLStringUtil::null)); //style_params->mUnderline = true; // Singu Note: We're not gonna bother here, underlining on hover return style_params; @@ -230,7 +228,7 @@ static std::string getStringAfterToken(const std::string& str, const std::string size_t pos = str.find(token); if (pos == std::string::npos) { - return std::string(); + return LLStringUtil::null; } pos += token.size(); @@ -385,9 +383,9 @@ bool LLUrlEntryInvalidSLURL::isSLURLvalid(const std::string &url) const if (path_parts == actual_parts) { // handle slurl with (X,Y,Z) coordinates - LLStringUtil::convertToS32(path_array[path_parts-3],x); - LLStringUtil::convertToS32(path_array[path_parts-2],y); - LLStringUtil::convertToS32(path_array[path_parts-1],z); + LLStringUtil::convertToS32(path_array[path_parts-3].asString(),x); + LLStringUtil::convertToS32(path_array[path_parts-2].asString(),y); + LLStringUtil::convertToS32(path_array[path_parts-1].asString(),z); if((x>= 0 && x<= 256) && (y>= 0 && y<= 256) && (z>= 0)) { @@ -398,8 +396,8 @@ bool LLUrlEntryInvalidSLURL::isSLURLvalid(const std::string &url) const { // handle slurl with (X,Y) coordinates - LLStringUtil::convertToS32(path_array[path_parts-2],x); - LLStringUtil::convertToS32(path_array[path_parts-1],y); + LLStringUtil::convertToS32(path_array[path_parts-2].asString(),x); + LLStringUtil::convertToS32(path_array[path_parts-1].asString(),y); ; if((x>= 0 && x<= 256) && (y>= 0 && y<= 256)) { @@ -409,7 +407,7 @@ bool LLUrlEntryInvalidSLURL::isSLURLvalid(const std::string &url) const else if (path_parts == (actual_parts-2)) { // handle slurl with (X) coordinate - LLStringUtil::convertToS32(path_array[path_parts-1],x); + LLStringUtil::convertToS32(path_array[path_parts-1].asString(),x); if(x>= 0 && x<= 256) { return TRUE; @@ -427,6 +425,7 @@ LLUrlEntrySLURL::LLUrlEntrySLURL() // see http://slurl.com/about.php for details on the SLURL format mPattern = boost::regex("https?://(maps.secondlife.com|slurl.com)/secondlife/[^ /]+(/\\d+){0,3}(/?(\\?\\S*)?)?", boost::regex::perl|boost::regex::icase); + mIcon = "Hand"; mMenuName = "menu_url_slurl.xml"; mTooltip = LLTrans::getString("TooltipSLURL"); } @@ -643,10 +642,11 @@ bool LLUrlEntryAgent::underlineOnHoverOnly(const std::string &string) const std::string LLUrlEntryAgent::getLabel(const std::string &url, const LLUrlLabelCallback &cb) { + static std::string name_wait_str = LLTrans::getString("LoadingData"); if (!gCacheName) { // probably at the login screen, use short string for layout - return LLTrans::getString("LoadingData"); + return name_wait_str; } std::string agent_id_string = getIDStringFromUrl(url); @@ -679,13 +679,13 @@ std::string LLUrlEntryAgent::getLabel(const std::string &url, const LLUrlLabelCa mAvatarNameCacheConnections.emplace(agent_id, connection); addObserver(agent_id_string, url, cb); } - return LLTrans::getString("LoadingData"); + return name_wait_str; } } LLStyleSP LLUrlEntryAgent::getStyle() const { - static LLUICachedControl color("HTMLAgentColor"); + static const LLUICachedControl color("HTMLAgentColor"); LLStyleSP style_params(new LLStyle(true, color, LLStringUtil::null)); return style_params; } @@ -762,10 +762,11 @@ void LLUrlEntryAgentName::onAvatarNameCache(const LLUUID& id, std::string LLUrlEntryAgentName::getLabel(const std::string &url, const LLUrlLabelCallback &cb) { + static std::string name_wait_str = LLTrans::getString("LoadingData"); if (!gCacheName) { // probably at the login screen, use short string for layout - return LLTrans::getString("LoadingData"); + return name_wait_str; } std::string agent_id_string = getIDStringFromUrl(url); @@ -794,13 +795,13 @@ std::string LLUrlEntryAgentName::getLabel(const std::string &url, const LLUrlLab mAvatarNameCacheConnections.emplace(agent_id, connection); addObserver(agent_id_string, url, cb); } - return LLTrans::getString("LoadingData"); + return name_wait_str; } } LLStyleSP LLUrlEntryAgentName::getStyle() const { - static LLUICachedControl color("HTMLAgentColor"); + static const LLUICachedControl color("HTMLAgentColor"); LLStyleSP style_params(new LLStyle(true, color, LLStringUtil::null)); return style_params; } @@ -1084,11 +1085,8 @@ void LLUrlEntryParcel::processParcelInfo(const LLParcelData& parcel_data) parcel_data.sim_name.c_str(), region_x, region_y, region_z); } - for (std::set::iterator iter = sParcelInfoObservers.begin(); - iter != sParcelInfoObservers.end(); - ++iter) + for (auto url_entry : sParcelInfoObservers) { - LLUrlEntryParcel* url_entry = *iter; if (url_entry) { url_entry->onParcelInfoReceived(parcel_data.parcel_id.asString(), label); From 7d0cbf6d02d85164ed23a440f89ed881a05d5ab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sat, 16 Nov 2019 15:46:36 -0500 Subject: [PATCH 016/281] Add a tiny hack to support tag --- indra/llui/lltexteditor.cpp | 8 +++++++- indra/llui/llurlentry.cpp | 6 +++--- indra/llui/llurlmatch.cpp | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 25400455b..344666112 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -4295,6 +4295,12 @@ void LLTextEditor::appendTextImpl(const std::string &new_text, const LLStyleSP s }; auto append_link = [&](const std::string& link, LLStyleSP link_style) { + if (!link_style->isLink()) + { + appendAndHighlightText(link, part, style); + return; + } + if (style) // Respect styling { const auto& text_style = *style; @@ -4432,7 +4438,7 @@ void LLTextEditor::appendAndHighlightText(const std::string& new_text, S32 highl std::string::size_type start = 0; /*std::string::size_type pos = new_text.find('\n',start); - while(pos!=-1) + while(pos != std::string::npos) { if(pos!=start) { diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 75d1c3b3e..debf53b2e 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -1430,8 +1430,9 @@ std::string LLUrlEntryNoLink::getLabel(const std::string &url, const LLUrlLabelC LLStyleSP LLUrlEntryNoLink::getStyle() const { // Don't render as URL (i.e. no context menu or hand cursor). - // Singu Note: What the heck? No, that's misleading!! - return LLUrlEntryBase::getStyle(); + LLStyleSP style(new LLStyle()); + style->setLinkHREF(" "); + return style; } @@ -1536,4 +1537,3 @@ std::string LLUrlEntryJira::getUrl(const std::string &url) const } // - diff --git a/indra/llui/llurlmatch.cpp b/indra/llui/llurlmatch.cpp index 717db6280..240e04ef0 100644 --- a/indra/llui/llurlmatch.cpp +++ b/indra/llui/llurlmatch.cpp @@ -58,7 +58,7 @@ void LLUrlMatch::setValues(U32 start, U32 end, const std::string &url, const std mTooltip = tooltip; mIcon = icon; mStyle = style; - mStyle->setLinkHREF(url); + mStyle->setLinkHREF(mStyle->isLink() ? LLStringUtil::null : url); // Singu Note: This hack exists in lieu of no link flag mMenuName = menu; mLocation = location; mID = id; From cfdcb8b3df7548dc4bda4f7ed476641fcf810110 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sun, 17 Nov 2019 22:33:03 -0500 Subject: [PATCH 017/281] Some finals --- indra/newview/llnamebox.h | 2 +- indra/newview/llnamelistctrl.h | 4 ++-- indra/newview/llnetmap.h | 8 ++++---- indra/newview/llviewertexteditor.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/indra/newview/llnamebox.h b/indra/newview/llnamebox.h index 52992d0eb..2d991ecec 100644 --- a/indra/newview/llnamebox.h +++ b/indra/newview/llnamebox.h @@ -36,7 +36,7 @@ #include "llnameui.h" #include "lltextbox.h" -class LLNameBox +class LLNameBox final : public LLTextBox , public LLNameUI { diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h index 4a2bf209a..ba0e6ebb4 100644 --- a/indra/newview/llnamelistctrl.h +++ b/indra/newview/llnamelistctrl.h @@ -39,7 +39,7 @@ class LLAvatarName; * We don't use LLScrollListItem to be able to override getUUID(), which is needed * because the name list item value is not simply an UUID but a map (uuid, is_group). */ -class LLNameListItem : public LLScrollListItem, public LLHandleProvider +class LLNameListItem final : public LLScrollListItem, public LLHandleProvider { public: enum ENameType @@ -86,7 +86,7 @@ private: }; -class LLNameListCtrl +class LLNameListCtrl final : public LLScrollListCtrl, public LLInstanceTracker { public: diff --git a/indra/newview/llnetmap.h b/indra/newview/llnetmap.h index b5e102889..47c32438b 100644 --- a/indra/newview/llnetmap.h +++ b/indra/newview/llnetmap.h @@ -46,7 +46,7 @@ class LLViewerRegion; class LLAvatarName; // [/SL:KB] -class LLNetMap : public LLPanel, public LFIDBearer +class LLNetMap final : public LLPanel, public LFIDBearer { public: LLNetMap(const std::string& name); @@ -68,9 +68,9 @@ public: /*virtual*/ BOOL handleRightMouseDown( S32 x, S32 y, MASK mask ); /*virtual*/ BOOL handleDoubleClick( S32 x, S32 y, MASK mask ); - LLUUID getStringUUIDSelectedItem() const override { return mClosestAgentAtLastRightClick; } - uuid_vec_t getSelectedIDs() const override { return mClosestAgentsAtLastClick; } - S32 getNumSelected() const override { return mClosestAgentsAtLastClick.size(); } + LLUUID getStringUUIDSelectedItem() const override final { return mClosestAgentAtLastRightClick; } + uuid_vec_t getSelectedIDs() const override final { return mClosestAgentsAtLastClick; } + S32 getNumSelected() const override final { return mClosestAgentsAtLastClick.size(); } static void mm_setcolor(LLUUID key,LLColor4 col); //moymod diff --git a/indra/newview/llviewertexteditor.h b/indra/newview/llviewertexteditor.h index a7741502f..9b5edcc88 100644 --- a/indra/newview/llviewertexteditor.h +++ b/indra/newview/llviewertexteditor.h @@ -39,7 +39,7 @@ // // Classes // -class LLViewerTextEditor : public LLTextEditor +class LLViewerTextEditor final : public LLTextEditor { public: From c5bf72f0b36715b4946050e48b4742f8b873b1d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sun, 17 Nov 2019 22:34:44 -0500 Subject: [PATCH 018/281] Merge NameBox initialization up to NameEditor's initialization --- indra/newview/llnamebox.cpp | 39 ++++++++++++++++++++----------------- indra/newview/llnamebox.h | 10 +++++----- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/indra/newview/llnamebox.cpp b/indra/newview/llnamebox.cpp index b3aa72fad..399e47c88 100644 --- a/indra/newview/llnamebox.cpp +++ b/indra/newview/llnamebox.cpp @@ -37,11 +37,20 @@ static LLRegisterWidget r("name_box"); -LLNameBox::LLNameBox(const std::string& name) -: LLNameUI() +LLNameBox::LLNameBox(const std::string& name, + const LLUUID& name_id, + bool is_group, + const std::string& loading, + bool rlv_sensitive) +: LLNameUI(loading, rlv_sensitive, name_id, is_group) , LLTextBox(name, LLRect(), LLStringUtil::null, nullptr, TRUE) { setClickedCallback(boost::bind(&LLNameUI::showProfile, this)); + if (!name_id.isNull()) + { + setNameID(name_id, is_group); + } + else setText(mInitialValue); } void LLNameBox::displayAsLink(bool link) @@ -79,25 +88,19 @@ BOOL LLNameBox::handleHover(S32 x, S32 y, MASK mask) return handled; } -// virtual -void LLNameBox::initFromXML(LLXMLNodePtr node, LLView* parent) -{ - LLTextBox::initFromXML(node, parent); - node->getAttributeString("initial_value", mInitialValue); - setText(mInitialValue); - node->getAttribute_bool("rlv_sensitive", mRLVSensitive); - if (node->hasAttribute("is_group")) - { - bool is_group; - node->getAttribute_bool("is_group", is_group); - setIsGroup(is_group); - } -} - // static LLView* LLNameBox::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) { - LLNameBox* name_box = new LLNameBox("name_box"); + bool is_group = false; + node->getAttribute_bool("is_group", is_group); + LLUUID id; + node->getAttributeUUID("id", id); + std::string loading; + node->getAttributeString("initial_value", loading); + bool rlv_sensitive = false; + node->getAttribute_bool("rlv_sensitive", rlv_sensitive); + LLNameBox* name_box = new LLNameBox("name_box", id, is_group, loading, rlv_sensitive); name_box->initFromXML(node,parent); + return name_box; } diff --git a/indra/newview/llnamebox.h b/indra/newview/llnamebox.h index 2d991ecec..2c7ea3e83 100644 --- a/indra/newview/llnamebox.h +++ b/indra/newview/llnamebox.h @@ -41,7 +41,6 @@ class LLNameBox final , public LLNameUI { public: - virtual void initFromXML(LLXMLNodePtr node, LLView* parent); static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); void displayAsLink(bool link) override final; @@ -52,10 +51,11 @@ public: BOOL handleRightMouseDown(S32 x, S32 y, MASK mask) override final; BOOL handleHover(S32 x, S32 y, MASK mask) override final; -protected: - LLNameBox(const std::string& name); - - friend class LLUICtrlFactory; + LLNameBox(const std::string& name, + const LLUUID& name_id = LLUUID::null, + bool is_group = false, + const std::string& loading = LLStringUtil::null, + bool rlv_sensitive = false); }; #endif From fb20751330204ea63973c5f10b0f536d6a4a3e16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sun, 17 Nov 2019 22:42:53 -0500 Subject: [PATCH 019/281] Create LFIDBearer default virtual functions for IDs and counts for 0/1 ID --- indra/llui/lfidbearer.h | 4 ++-- indra/newview/llnameui.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/indra/llui/lfidbearer.h b/indra/llui/lfidbearer.h index 8b4c7684d..90a485b30 100644 --- a/indra/llui/lfidbearer.h +++ b/indra/llui/lfidbearer.h @@ -28,8 +28,8 @@ struct LFIDBearer { virtual ~LFIDBearer() { if (sActive == this) sActive = nullptr; } virtual LLUUID getStringUUIDSelectedItem() const = 0; - virtual uuid_vec_t getSelectedIDs() const = 0; - virtual S32 getNumSelected() const = 0; + virtual uuid_vec_t getSelectedIDs() const { return { getStringUUIDSelectedItem() }; } + virtual S32 getNumSelected() const { return getStringUUIDSelectedItem().notNull(); } template static T* getActive() { return static_cast(sActive); } static LLUUID getActiveSelectedID() { return sActive->getStringUUIDSelectedItem(); } diff --git a/indra/newview/llnameui.h b/indra/newview/llnameui.h index 4bf53ae46..15012fd08 100644 --- a/indra/newview/llnameui.h +++ b/indra/newview/llnameui.h @@ -48,7 +48,6 @@ struct LLNameUI : public LFIDBearer } LLUUID getStringUUIDSelectedItem() const override final { return mNameID; } - uuid_vec_t getSelectedIDs() const override final { return { mNameID }; } S32 getNumSelected() const override final { return 1; } void setIsGroup(bool is_group); From d9ff42ab3c24fbae2a918f8e49fc4a47637b789d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sat, 23 Nov 2019 22:37:50 -0500 Subject: [PATCH 020/281] Add name_system attribute to NameBoxes and NameEditors Uses the main one by default. Removes old show complete names on profile setting in favor of ProfileNameSystem, which is now offered under Adv. Chat->Chat UI Forces nameui to refresh on name setting update, or should, not important though --- .../newview/app_settings/settings_ascent.xml | 22 +++++++++---------- indra/newview/ascentprefschat.cpp | 2 ++ indra/newview/ascentprefschat.h | 1 + indra/newview/ascentprefsvan.cpp | 2 -- indra/newview/ascentprefsvan.h | 1 - indra/newview/llnamebox.cpp | 9 +++++--- indra/newview/llnamebox.h | 3 ++- indra/newview/llnameeditor.cpp | 8 +++++-- indra/newview/llnameeditor.h | 3 ++- indra/newview/llnameui.cpp | 17 +++++++++----- indra/newview/llnameui.h | 11 +++++----- indra/newview/llpanelavatar.cpp | 5 +---- .../de/panel_preferences_ascent_vanity.xml | 1 - .../skins/default/xui/en-us/panel_avatar.xml | 2 +- .../en-us/panel_preferences_ascent_chat.xml | 7 ++++++ .../en-us/panel_preferences_ascent_vanity.xml | 1 - .../es/panel_preferences_ascent_vanity.xml | 1 - .../fr/panel_preferences_ascent_vanity.xml | 1 - 18 files changed, 55 insertions(+), 42 deletions(-) diff --git a/indra/newview/app_settings/settings_ascent.xml b/indra/newview/app_settings/settings_ascent.xml index 65398b513..b0b90b0b4 100644 --- a/indra/newview/app_settings/settings_ascent.xml +++ b/indra/newview/app_settings/settings_ascent.xml @@ -91,6 +91,17 @@ Value 1 + ProfileNameSystem + + Comment + For a name displayed on its profile. 0 = Old Style, 1 = Display Names and Username, 2 = Displayname only, 3 = Old Style (Display Name) + Persist + 1 + Type + S32 + Value + 1 + RadarNameSystem Comment @@ -840,17 +851,6 @@ Value /open - SinguCompleteNameProfiles - - Comment - Use the complete name "Display Name (legacy.name)" in profiles, instead of following the choice set by PhoenixNameSystem. - Persist - 1 - Type - Boolean - Value - 0 - SinguDefaultEaseIn Comment diff --git a/indra/newview/ascentprefschat.cpp b/indra/newview/ascentprefschat.cpp index 084cc448f..a32eef090 100644 --- a/indra/newview/ascentprefschat.cpp +++ b/indra/newview/ascentprefschat.cpp @@ -257,6 +257,7 @@ void LLPrefsAscentChat::refreshValues() mFriendNames = gSavedSettings.getS32("FriendNameSystem"); mGroupMembersNames = gSavedSettings.getS32("GroupMembersNameSystem"); mLandManagementNames = gSavedSettings.getS32("LandManagementNameSystem"); + mProfileNames = gSavedSettings.getS32("ProfileNameSystem"); mRadarNames = gSavedSettings.getS32("RadarNameSystem"); mSpeakerNames = gSavedSettings.getS32("SpeakerNameSystem"); @@ -454,6 +455,7 @@ void LLPrefsAscentChat::cancel() gSavedSettings.setS32("FriendNameSystem", mFriendNames); gSavedSettings.setS32("GroupMembersNameSystem", mGroupMembersNames); gSavedSettings.setS32("LandManagementNameSystem", mLandManagementNames); + gSavedSettings.setS32("ProfileNameSystem", mProfileNames); gSavedSettings.setS32("RadarNameSystem", mRadarNames); gSavedSettings.setS32("SpeakerNameSystem", mSpeakerNames); diff --git a/indra/newview/ascentprefschat.h b/indra/newview/ascentprefschat.h index 2521b2039..0f0dc9baa 100644 --- a/indra/newview/ascentprefschat.h +++ b/indra/newview/ascentprefschat.h @@ -91,6 +91,7 @@ private: S32 mFriendNames; S32 mGroupMembersNames; S32 mLandManagementNames; + S32 mProfileNames; S32 mRadarNames; S32 mSpeakerNames; diff --git a/indra/newview/ascentprefsvan.cpp b/indra/newview/ascentprefsvan.cpp index 0c6216647..0bb200636 100644 --- a/indra/newview/ascentprefsvan.cpp +++ b/indra/newview/ascentprefsvan.cpp @@ -130,7 +130,6 @@ void LLPrefsAscentVan::refreshValues() mAnnounceStreamMetadata = gSavedSettings.getBOOL("AnnounceStreamMetadata"); mInactiveFloaterTransparency = gSavedSettings.getF32("InactiveFloaterTransparency"); mActiveFloaterTransparency = gSavedSettings.getF32("ActiveFloaterTransparency"); - mCompleteNameProfiles = gSavedSettings.getBOOL("SinguCompleteNameProfiles"); mScriptErrorsStealFocus = gSavedSettings.getBOOL("LiruScriptErrorsStealFocus"); mConnectToNeighbors = gSavedSettings.getBOOL("AlchemyConnectToNeighbors"); mRestartMinimized = gSavedSettings.getBOOL("LiruRegionRestartMinimized"); @@ -205,7 +204,6 @@ void LLPrefsAscentVan::cancel() gSavedSettings.setBOOL("AnnounceStreamMetadata", mAnnounceStreamMetadata); gSavedSettings.setF32("InactiveFloaterTransparency", mInactiveFloaterTransparency); gSavedSettings.setF32("ActiveFloaterTransparency", mActiveFloaterTransparency); - gSavedSettings.setBOOL("SinguCompleteNameProfiles", mCompleteNameProfiles); gSavedSettings.setBOOL("LiruScriptErrorsStealFocus", mScriptErrorsStealFocus); gSavedSettings.setBOOL("AlchemyConnectToNeighbors", mConnectToNeighbors); gSavedSettings.setBOOL("LiruRegionRestartMinimized", mRestartMinimized); diff --git a/indra/newview/ascentprefsvan.h b/indra/newview/ascentprefsvan.h index d8e27338e..b29f5147d 100644 --- a/indra/newview/ascentprefsvan.h +++ b/indra/newview/ascentprefsvan.h @@ -63,7 +63,6 @@ private: bool mAnnounceSnapshots; bool mAnnounceStreamMetadata; F32 mInactiveFloaterTransparency, mActiveFloaterTransparency; - bool mCompleteNameProfiles; bool mScriptErrorsStealFocus; bool mConnectToNeighbors; bool mRestartMinimized; diff --git a/indra/newview/llnamebox.cpp b/indra/newview/llnamebox.cpp index 399e47c88..023fcc426 100644 --- a/indra/newview/llnamebox.cpp +++ b/indra/newview/llnamebox.cpp @@ -41,8 +41,9 @@ LLNameBox::LLNameBox(const std::string& name, const LLUUID& name_id, bool is_group, const std::string& loading, - bool rlv_sensitive) -: LLNameUI(loading, rlv_sensitive, name_id, is_group) + bool rlv_sensitive, + const std::string& name_system) +: LLNameUI(loading, rlv_sensitive, name_id, is_group, name_system) , LLTextBox(name, LLRect(), LLStringUtil::null, nullptr, TRUE) { setClickedCallback(boost::bind(&LLNameUI::showProfile, this)); @@ -99,7 +100,9 @@ LLView* LLNameBox::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *f node->getAttributeString("initial_value", loading); bool rlv_sensitive = false; node->getAttribute_bool("rlv_sensitive", rlv_sensitive); - LLNameBox* name_box = new LLNameBox("name_box", id, is_group, loading, rlv_sensitive); + std::string name_system; + node->getAttributeString("name_system", name_system); + LLNameBox* name_box = new LLNameBox("name_box", id, is_group, loading, rlv_sensitive, name_system); name_box->initFromXML(node,parent); return name_box; diff --git a/indra/newview/llnamebox.h b/indra/newview/llnamebox.h index 2c7ea3e83..564970f26 100644 --- a/indra/newview/llnamebox.h +++ b/indra/newview/llnamebox.h @@ -55,7 +55,8 @@ public: const LLUUID& name_id = LLUUID::null, bool is_group = false, const std::string& loading = LLStringUtil::null, - bool rlv_sensitive = false); + bool rlv_sensitive = false, + const std::string& name_system = LLStringUtil::null); }; #endif diff --git a/indra/newview/llnameeditor.cpp b/indra/newview/llnameeditor.cpp index e69161cbe..c2706c297 100644 --- a/indra/newview/llnameeditor.cpp +++ b/indra/newview/llnameeditor.cpp @@ -45,10 +45,11 @@ LLNameEditor::LLNameEditor(const std::string& name, const LLRect& rect, bool is_group, const std::string& loading, bool rlv_sensitive, + const std::string& name_system, bool click_for_profile, const LLFontGL* glfont, S32 max_text_length) -: LLNameUI(loading, rlv_sensitive, name_id, is_group) +: LLNameUI(loading, rlv_sensitive, name_id, is_group, name_system) , LLLineEditor(name, rect, LLStringUtil::null, glfont, max_text_length) , mClickForProfile(click_for_profile) { @@ -124,6 +125,7 @@ LLXMLNodePtr LLNameEditor::getXML(bool save_children) const node->createChild("label", TRUE)->setStringValue(mInitialValue); node->createChild("rlv_sensitive", TRUE)->setBoolValue(mRLVSensitive); node->createChild("click_for_profile", TRUE)->setBoolValue(mClickForProfile); + node->createChild("name_system", TRUE)->setStringValue(mNameSystem); return node; } @@ -145,10 +147,12 @@ LLView* LLNameEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory node->getAttribute_bool("rlv_sensitive", rlv_sensitive); bool click_for_profile = true; node->getAttribute_bool("click_for_profile", click_for_profile); + std::string name_system; + node->getAttributeString("name_system", name_system); LLNameEditor* line_editor = new LLNameEditor("name_editor", rect, - id, is_group, loading, rlv_sensitive, + id, is_group, loading, rlv_sensitive, name_system, click_for_profile, LLView::selectFont(node), max_text_length); diff --git a/indra/newview/llnameeditor.h b/indra/newview/llnameeditor.h index 3453906c2..65b542a7c 100644 --- a/indra/newview/llnameeditor.h +++ b/indra/newview/llnameeditor.h @@ -36,7 +36,7 @@ #include "lllineeditor.h" #include "llnameui.h" -class LLNameEditor +class LLNameEditor final : public LLLineEditor , public LLNameUI { @@ -47,6 +47,7 @@ public: bool is_group = false, const std::string& loading = LLStringUtil::null, bool rlv_sensitive = false, + const std::string& name_system = LLStringUtil::null, bool click_for_profile = true, const LLFontGL* glfont = nullptr, S32 max_text_length = 254); diff --git a/indra/newview/llnameui.cpp b/indra/newview/llnameui.cpp index 10e113a04..dcdf2de41 100644 --- a/indra/newview/llnameui.cpp +++ b/indra/newview/llnameui.cpp @@ -46,29 +46,34 @@ // statics std::set LLNameUI::sInstances; -LLNameUI::LLNameUI(const std::string& loading, bool rlv_sensitive, const LLUUID& id, bool is_group) +LLNameUI::LLNameUI(const std::string& loading, bool rlv_sensitive, const LLUUID& id, bool is_group, const std::string& name_system) : mNameID(id), mRLVSensitive(rlv_sensitive), mIsGroup(!is_group), mAllowInteract(false) -, mInitialValue(!loading.empty() ? loading : LLTrans::getString("LoadingData")) +, mNameSystem(name_system.empty() ? "PhoenixNameSystem" : name_system), mInitialValue(!loading.empty() ? loading : LLTrans::getString("LoadingData")) { setIsGroup(is_group); } void LLNameUI::setIsGroup(bool is_group) { + // Disconnect active connections if needed + for (auto& connection : mConnections) + connection.disconnect(); + if (mIsGroup != is_group) { if (mIsGroup = is_group) sInstances.insert(this); else + { sInstances.erase(this); + mConnections[1] = gSavedSettings.getControl(mNameSystem)->getCommitSignal()->connect(boost::bind(&LLNameUI::setNameText, this)); + } } } void LLNameUI::setNameID(const LLUUID& name_id, bool is_group) { mNameID = name_id; - mConnection.disconnect(); - setIsGroup(is_group); if (mAllowInteract = mNameID.notNull()) @@ -95,9 +100,9 @@ void LLNameUI::setNameText() { LLAvatarName av_name; if (got_name = LLAvatarNameCache::get(mNameID, &av_name)) - name = mShowCompleteName ? av_name.getCompleteName() : av_name.getNSName(); + name = mNameSystem.empty() ? av_name.getNSName() : av_name.getNSName(gSavedSettings.getS32(mNameSystem)); else - mConnection = LLAvatarNameCache::get(mNameID, boost::bind(&LLNameUI::setNameText, this)); + mConnections[0] = LLAvatarNameCache::get(mNameID, boost::bind(&LLNameUI::setNameText, this)); } if (!mIsGroup && got_name && mRLVSensitive) // Filter if needed diff --git a/indra/newview/llnameui.h b/indra/newview/llnameui.h index 15012fd08..d5854fb0a 100644 --- a/indra/newview/llnameui.h +++ b/indra/newview/llnameui.h @@ -38,13 +38,13 @@ struct LLNameUI : public LFIDBearer { - LLNameUI(const std::string& loading = LLStringUtil::null, bool rlv_sensitive = false, const LLUUID& id = LLUUID::null, bool is_group = false); + LLNameUI(const std::string& loading = LLStringUtil::null, bool rlv_sensitive = false, const LLUUID& id = LLUUID::null, bool is_group = false, const std::string& name_system = LLStringUtil::null); virtual ~LLNameUI() { if (mIsGroup) sInstances.erase(this); - else - mConnection.disconnect(); + for (auto& connection : mConnections) + connection.disconnect(); } LLUUID getStringUUIDSelectedItem() const override final { return mNameID; } @@ -56,7 +56,6 @@ struct LLNameUI : public LFIDBearer void refresh(const LLUUID& id, const std::string& full_name, bool is_group); static void refreshAll(const LLUUID& id, const std::string& full_name, bool is_group); - void setShowCompleteName(bool show) { mShowCompleteName = show; } void showProfile(); virtual void displayAsLink(bool link) = 0; // Override to make the name display as a link @@ -75,8 +74,7 @@ struct LLNameUI : public LFIDBearer private: static std::set sInstances; - boost::signals2::connection mConnection; - bool mShowCompleteName = false; + std::array mConnections; protected: LLUUID mNameID; @@ -84,4 +82,5 @@ protected: bool mIsGroup; bool mAllowInteract; std::string mInitialValue; + std::string mNameSystem; }; diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 9fe61950d..c48abdf58 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -1236,13 +1236,12 @@ void LLPanelAvatar::setOnlineStatus(EOnlineStatus online_status) void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id) { - auto dnname = getChild("dnname"); if (avatar_id != mAvatarID) { if (mAvatarID.notNull()) LLAvatarPropertiesProcessor::getInstance()->removeObserver(mAvatarID, this); mAvatarID = avatar_id; - dnname->setNameID(avatar_id, false); + getChild("dnname")->setNameID(avatar_id, false); } if (avatar_id.isNull()) return; @@ -1271,8 +1270,6 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id) if (LLDropTarget* drop_target = findChild("drop_target_rect")) drop_target->setEntityID(mAvatarID); - dnname->setShowCompleteName(gSavedSettings.getBOOL("SinguCompleteNameProfiles")); - if (auto key_edit = getChildView("avatar_key")) key_edit->setValue(mAvatarID.asString()); diff --git a/indra/newview/skins/default/xui/de/panel_preferences_ascent_vanity.xml b/indra/newview/skins/default/xui/de/panel_preferences_ascent_vanity.xml index c403b9c11..3a170dae1 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_ascent_vanity.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_ascent_vanity.xml @@ -11,7 +11,6 @@ - diff --git a/indra/newview/skins/default/xui/en-us/panel_avatar.xml b/indra/newview/skins/default/xui/en-us/panel_avatar.xml index 48ca5fa16..e9294626f 100644 --- a/indra/newview/skins/default/xui/en-us/panel_avatar.xml +++ b/indra/newview/skins/default/xui/en-us/panel_avatar.xml @@ -30,7 +30,7 @@ border_thickness="1" bottom="-48" enabled="false" follows="left|top" font="SansSerifSmall" height="16" is_unicode="false" left_delta="75" max_length="254" mouse_opaque="false" name="dnname" - width="181" click_for_profile="false"/> + width="181" name_system="ProfileNameSystem" click_for_profile="false"/> Display Names only Old Names (w/Display) + Profiles: + + Old Names + Display Names (w/Username) + Display Names only + Old Names (w/Display) + Radar: Old Names diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_vanity.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_vanity.xml index 6dd9e25ae..fd1df667a 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_vanity.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_vanity.xml @@ -12,7 +12,6 @@ - diff --git a/indra/newview/skins/default/xui/es/panel_preferences_ascent_vanity.xml b/indra/newview/skins/default/xui/es/panel_preferences_ascent_vanity.xml index 23b963c4e..360841340 100644 --- a/indra/newview/skins/default/xui/es/panel_preferences_ascent_vanity.xml +++ b/indra/newview/skins/default/xui/es/panel_preferences_ascent_vanity.xml @@ -12,7 +12,6 @@ - diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_ascent_vanity.xml b/indra/newview/skins/default/xui/fr/panel_preferences_ascent_vanity.xml index e2e3fcc2d..8ee7b129a 100644 --- a/indra/newview/skins/default/xui/fr/panel_preferences_ascent_vanity.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_ascent_vanity.xml @@ -12,7 +12,6 @@ - From b3231883f61c99ada2a64262b7ab82afe7abba72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sat, 23 Nov 2019 22:38:08 -0500 Subject: [PATCH 021/281] Remove unused menu_url_agent_mini.xml --- .../default/xui/en-us/menu_url_agent_mini.xml | 129 ------------------ .../default/xui/es/menu_url_agent_mini.xml | 34 ----- 2 files changed, 163 deletions(-) delete mode 100644 indra/newview/skins/default/xui/en-us/menu_url_agent_mini.xml delete mode 100644 indra/newview/skins/default/xui/es/menu_url_agent_mini.xml diff --git a/indra/newview/skins/default/xui/en-us/menu_url_agent_mini.xml b/indra/newview/skins/default/xui/en-us/menu_url_agent_mini.xml deleted file mode 100644 index bbddfcce3..000000000 --- a/indra/newview/skins/default/xui/en-us/menu_url_agent_mini.xml +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/indra/newview/skins/default/xui/es/menu_url_agent_mini.xml b/indra/newview/skins/default/xui/es/menu_url_agent_mini.xml deleted file mode 100644 index b60df7db3..000000000 --- a/indra/newview/skins/default/xui/es/menu_url_agent_mini.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From ab207727fda6d1c238db65827263ff005f4c0aab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sat, 23 Nov 2019 22:44:35 -0500 Subject: [PATCH 022/281] Buncha loopy changes --- indra/newview/llavataractions.cpp | 18 +++++++++++------- indra/newview/llgroupactions.cpp | 7 +++++++ indra/newview/llgroupactions.h | 1 + indra/newview/llnamebox.cpp | 13 +++++++++++++ indra/newview/llnamebox.h | 1 + indra/newview/llviewermenu.cpp | 6 ++---- 6 files changed, 35 insertions(+), 11 deletions(-) diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index f7eb591ac..8f37e6d49 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -374,8 +374,8 @@ void LLAvatarActions::showProfile(const LLUUID& id, bool web) // static void LLAvatarActions::showProfiles(const uuid_vec_t& ids, bool web) { - for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it) - showProfile(*it, web); + for (const auto& id : ids) + showProfile(id, web); } //static @@ -1245,27 +1245,31 @@ bool LLAvatarActions::isAgentMappable(const LLUUID& agent_id) ); } -// static -void LLAvatarActions::copyUUIDs(const uuid_vec_t& ids) +void copy_from_ids(const uuid_vec_t& ids, std::function func) { std::string ids_string; const std::string& separator = LLTrans::getString("words_separator"); - for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it) + for (const auto& id : ids) { - const LLUUID& id = *it; if (id.isNull()) continue; if (!ids_string.empty()) ids_string.append(separator); - ids_string.append(id.asString()); + ids_string.append(func(id)); } if (!ids_string.empty()) gViewerWindow->getWindow()->copyTextToClipboard(utf8str_to_wstring(ids_string)); } +// static +void LLAvatarActions::copyUUIDs(const uuid_vec_t& ids) +{ + copy_from_ids(ids, [](const LLUUID& id) { return id.asString(); }); +} + std::string LLAvatarActions::getSLURL(const LLUUID& id) { return llformat("secondlife:///app/agent/%s/about", id.asString().c_str()); diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index 317998558..91141253c 100644 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -400,6 +400,13 @@ void LLGroupActions::show(const LLUUID& group_id) openGroupProfile(group_id); } +// static +void LLGroupActions::showProfiles(const uuid_vec_t& ids) +{ + for (const auto& id : ids) + show(id); +} + // static void LLGroupActions::showTab(const LLUUID& group_id, const std::string& tab_name) { diff --git a/indra/newview/llgroupactions.h b/indra/newview/llgroupactions.h index ac2b0f10d..dc4ff4fe5 100644 --- a/indra/newview/llgroupactions.h +++ b/indra/newview/llgroupactions.h @@ -58,6 +58,7 @@ public: * Show group information panel. */ static void show(const LLUUID& group_id); + static void showProfiles(const uuid_vec_t& group_ids); /** * Show group information panel, with specific tab open. diff --git a/indra/newview/llnamebox.cpp b/indra/newview/llnamebox.cpp index 023fcc426..1e6331e4a 100644 --- a/indra/newview/llnamebox.cpp +++ b/indra/newview/llnamebox.cpp @@ -89,6 +89,19 @@ BOOL LLNameBox::handleHover(S32 x, S32 y, MASK mask) return handled; } +// virtual +LLXMLNodePtr LLNameBox::getXML(bool save_children) const +{ + LLXMLNodePtr node = LLTextBox::getXML(); + + node->setName("name_box"); + node->createChild("initial_value", TRUE)->setStringValue(mInitialValue); + node->createChild("rlv_sensitive", TRUE)->setBoolValue(mRLVSensitive); + node->createChild("name_system", TRUE)->setStringValue(mNameSystem); + + return node; +} + // static LLView* LLNameBox::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) { diff --git a/indra/newview/llnamebox.h b/indra/newview/llnamebox.h index 564970f26..a6b6bcc8c 100644 --- a/indra/newview/llnamebox.h +++ b/indra/newview/llnamebox.h @@ -41,6 +41,7 @@ class LLNameBox final , public LLNameUI { public: + LLXMLNodePtr getXML(bool save_children = true) const override final; static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); void displayAsLink(bool link) override final; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 0c6a26832..47a6e2223 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -9423,8 +9423,7 @@ class ListToggleMute : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - const uuid_vec_t& ids = LFIDBearer::getActiveSelectedIDs(); - for (const auto& id : ids) + for (const auto& id : LFIDBearer::getActiveSelectedIDs()) LLAvatarActions::toggleBlock(id); return true; } @@ -9901,9 +9900,8 @@ void initialize_menus() void region_change() { // Remove current dynamic items - for (custom_menu_item_list_t::iterator i = gCustomMenuItems.begin(); i != gCustomMenuItems.end(); ++i) + for (auto item : gCustomMenuItems) { - LLMenuItemCallGL* item = (*i); item->getParent()->removeChild(item); delete item; } From 5a561e03b86019965e68854cc0beac4dcd66c540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sat, 23 Nov 2019 23:05:33 -0500 Subject: [PATCH 023/281] Introduce Types for ID Bearer IDs --- indra/llui/lfidbearer.h | 13 +++++++++++++ indra/newview/llimpanel.cpp | 2 +- indra/newview/llnamelistctrl.cpp | 26 ++++++++++++++++++++++++++ indra/newview/llnamelistctrl.h | 2 ++ indra/newview/llnameui.h | 1 + indra/newview/llpanelavatar.cpp | 2 +- indra/newview/llpanelgroup.cpp | 5 +++-- indra/newview/llviewermenu.cpp | 25 +++++++++++++++++-------- 8 files changed, 64 insertions(+), 12 deletions(-) diff --git a/indra/llui/lfidbearer.h b/indra/llui/lfidbearer.h index 90a485b30..e56ba8560 100644 --- a/indra/llui/lfidbearer.h +++ b/indra/llui/lfidbearer.h @@ -1,6 +1,7 @@ /* Copyright (C) 2019 Liru Færs * * LFIDBearer is a class that holds an ID or IDs that menus can use + * This class also bears the type of ID/IDs that it is holding * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -26,15 +27,27 @@ class LLView; struct LFIDBearer { + enum Type : S8 + { + MULTIPLE = -2, + NONE = -1, + AVATAR = 0, + GROUP, + OBJECT, + COUNT + }; + virtual ~LFIDBearer() { if (sActive == this) sActive = nullptr; } virtual LLUUID getStringUUIDSelectedItem() const = 0; virtual uuid_vec_t getSelectedIDs() const { return { getStringUUIDSelectedItem() }; } virtual S32 getNumSelected() const { return getStringUUIDSelectedItem().notNull(); } + virtual Type getSelectedType() const { return AVATAR; } template static T* getActive() { return static_cast(sActive); } static LLUUID getActiveSelectedID() { return sActive->getStringUUIDSelectedItem(); } static uuid_vec_t getActiveSelectedIDs() { return sActive->getSelectedIDs(); } static S32 getActiveNumSelected() { return sActive->getNumSelected(); } + static Type getActiveType() { return sActive->getSelectedType(); } void showMenu(LLView* self, LLMenuGL* menu, S32 x, S32 y); static void addCommonMenu(LLMenuGL* menu) { sMenus.push_back(menu); } diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 9bc06a915..16c605dfa 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1128,7 +1128,7 @@ void LLFloaterIMPanel::removeDynamicFocus() findChild("instant_message_flyout")->remove(getString("focus")); } -void copy_profile_uri(const LLUUID& id, bool group = false); +void copy_profile_uri(const LLUUID& id, LFIDBearer::Type type = LFIDBearer::AVATAR); void LLFloaterIMPanel::onFlyoutCommit(LLComboBox* flyout, const LLSD& value) { diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index cf9e47390..2cb3ba96b 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -142,6 +142,32 @@ BOOL LLNameListCtrl::handleDoubleClick(S32 x, S32 y, MASK mask) return handled; } +#define CONVERT_TO_RETTYPE(nametype, rettype) \ +nametype: \ +{ \ + if (ret == NONE) \ + ret = rettype; \ + else if (ret != rettype) \ + return MULTIPLE; \ + break; \ +} + +LFIDBearer::Type LLNameListCtrl::getSelectedType() const +{ + auto ret = NONE; + for (const auto& item : getAllSelected()) + { + switch (static_cast(item)->getNameType()) + { + CONVERT_TO_RETTYPE(case LLNameListItem::INDIVIDUAL, AVATAR); + CONVERT_TO_RETTYPE(case LLNameListItem::GROUP, GROUP) + CONVERT_TO_RETTYPE(default, COUNT) // Invalid, but just use count instead + } + } + return ret; +} +#undef CONVERT_TO_RETTYPE + // public void LLNameListCtrl::addGroupNameItem(const LLUUID& group_id, EAddPosition pos, BOOL enabled) diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h index ba0e6ebb4..4cb426dfe 100644 --- a/indra/newview/llnamelistctrl.h +++ b/indra/newview/llnamelistctrl.h @@ -149,6 +149,8 @@ public: std::string& tooltip_msg); BOOL handleDoubleClick(S32 x, S32 y, MASK mask) override; + Type getSelectedType() const override final; + void setAllowCallingCardDrop(BOOL b) { mAllowCallingCardDrop = b; } void sortByName(BOOL ascending); diff --git a/indra/newview/llnameui.h b/indra/newview/llnameui.h index d5854fb0a..842f79712 100644 --- a/indra/newview/llnameui.h +++ b/indra/newview/llnameui.h @@ -49,6 +49,7 @@ struct LLNameUI : public LFIDBearer LLUUID getStringUUIDSelectedItem() const override final { return mNameID; } S32 getNumSelected() const override final { return 1; } + Type getSelectedType() const override final { return mIsGroup ? GROUP : AVATAR; } void setIsGroup(bool is_group); void setNameID(const LLUUID& name_id, bool is_group); diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index c48abdf58..dfad5f071 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -1399,7 +1399,7 @@ void LLPanelAvatar::onClickCopy(const LLSD& val) } else { - void copy_profile_uri(const LLUUID& id, bool group = false); + void copy_profile_uri(const LLUUID& id, LFIDBearer::Type type = LFIDBearer::AVATAR); copy_profile_uri(mAvatarID); } } diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 4e65628bb..55841cd17 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -34,6 +34,7 @@ #include "llpanelgroup.h" // Library includes +#include "lfidbearer.h" #include "llbutton.h" #include "lltabcontainer.h" #include "lltextbox.h" @@ -129,7 +130,7 @@ void LLPanelGroupTab::handleClickHelp() } } -void copy_profile_uri(const LLUUID& id, bool group); +void copy_profile_uri(const LLUUID& id, LFIDBearer::Type type); LLPanelGroup::LLPanelGroup(const LLUUID& group_id) : LLPanel("PanelGroup", LLRect(), FALSE), @@ -161,7 +162,7 @@ LLPanelGroup::LLPanelGroup(const LLUUID& group_id) LLGroupMgr::getInstance()->addObserver(this); - mCommitCallbackRegistrar.add("Group.CopyURI", boost::bind(copy_profile_uri, boost::ref(mID), true)); + mCommitCallbackRegistrar.add("Group.CopyURI", boost::bind(copy_profile_uri, boost::ref(mID), LFIDBearer::GROUP)); // Pass on construction of this panel to the control factory. LLUICtrlFactory::getInstance()->buildPanel(this, "panel_group.xml", &getFactoryMap()); } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 47a6e2223..1d5dcad4b 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -94,6 +94,7 @@ #include "llframestats.h" #include "llavataractions.h" #include "llgivemoney.h" +#include "llgroupactions.h" #include "llgroupmgr.h" #include "llhoverview.h" #include "llhudeffecttrail.h" @@ -9034,16 +9035,19 @@ template T* get_focused() return t; } -const LLWString get_slurl_for(const LLUUID& id, bool group) +const std::string get_slurl_for(const LLUUID& id, LFIDBearer::Type type) { - std::string str("secondlife:///app/"); - str += group ? "group/" : "agent/"; - return utf8str_to_wstring(str + id.asString() + "/about"); + return type == LFIDBearer::GROUP ? LLGroupActions::getSLURL(id) : LLAvatarActions::getSLURL(id); } -void copy_profile_uri(const LLUUID& id, bool group) +const LLWString get_wslurl_for(const LLUUID& id, LFIDBearer::Type type) { - gViewerWindow->getWindow()->copyTextToClipboard(get_slurl_for(id, group)); + return utf8str_to_wstring(get_slurl_for(id, type)); +} + +void copy_profile_uri(const LLUUID& id, LFIDBearer::Type type) +{ + gViewerWindow->getWindow()->copyTextToClipboard(get_wslurl_for(id, type)); } class ListEnableAnySelected : public view_listener_t @@ -9145,7 +9149,7 @@ class ListCopySLURL : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - copy_profile_uri(LFIDBearer::getActiveSelectedID(), false); + copy_profile_uri(LFIDBearer::getActiveSelectedID(), LFIDBearer::getActiveType()); return true; } }; @@ -9242,7 +9246,12 @@ class ListShowProfile : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - LLAvatarActions::showProfiles(LFIDBearer::getActiveSelectedIDs()); + switch (LFIDBearer::getActiveType()) + { + case LFIDBearer::AVATAR: LLAvatarActions::showProfiles(LFIDBearer::getActiveSelectedIDs()); break; + case LFIDBearer::GROUP: LLGroupActions::showProfiles(LFIDBearer::getActiveSelectedIDs()); break; + default: break; + } return true; } }; From f5c19b9e5c03adee8ba6be2fd78e92eefd082867 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sat, 23 Nov 2019 23:07:13 -0500 Subject: [PATCH 024/281] Add List.EnableUnmute and List.CopyNames to menu callbacks --- indra/newview/llviewermenu.cpp | 62 +++++++++++++++++-- .../skins/default/xui/en-us/menu_avs_list.xml | 9 ++- 2 files changed, 63 insertions(+), 8 deletions(-) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 1d5dcad4b..e5891e8fb 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -9104,15 +9104,39 @@ class ListEnableIsNotFriend : public view_listener_t } }; +class ListEnableUnmute : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool are_blocked = false; + for (const auto& id : LFIDBearer::getActiveSelectedIDs()) + if (are_blocked = LLAvatarActions::isBlocked(id)) // If any are blocked, allow unblocking + break; + + gMenuHolder->findControl(userdata["control"].asString())->setValue(are_blocked); + return true; + } +}; + class ListEnableMute : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - const uuid_vec_t& ids = LFIDBearer::getActiveSelectedIDs(); - bool can_block = true; - for (uuid_vec_t::const_iterator it = ids.begin(); can_block && it != ids.end(); ++it) - can_block = LLAvatarActions::canBlock(*it); - gMenuHolder->findControl(userdata["control"].asString())->setValue(can_block); + bool blockable = false; + for (const auto& id : LFIDBearer::getActiveSelectedIDs()) + { + if (!LLAvatarActions::canBlock(id)) // Exit early only when someone is unblockable + { + blockable = false; + break; + } + else if (blockable) // At least one is unblocked, keep looking for unblockables + continue; + + blockable = !LLAvatarActions::isBlocked(id); + } + + gMenuHolder->findControl(userdata["control"].asString())->setValue(blockable); return true; } }; @@ -9145,6 +9169,32 @@ class ListBanFromGroup : public view_listener_t } }; +void copy_from_ids(const uuid_vec_t & ids, std::function func); + +class ListCopyNames : public view_listener_t +{ + static std::string getGroupName(const LLUUID& id) + { + std::string ret; + gCacheName->getGroupName(id, ret); + return ret; + } + + static std::string getAvatarName(const LLUUID& id) + { + std::string ret; + LLAvatarNameCache::getNSName(id, ret); + return ret; + } + + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLWString str; + copy_from_ids(LFIDBearer::getActiveSelectedIDs(), LFIDBearer::getActiveType() == LFIDBearer::GROUP ? getGroupName : getAvatarName); + if (!str.empty()) LLView::getWindow()->copyTextToClipboard(str); + return true; + } +}; class ListCopySLURL : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) @@ -9845,10 +9895,12 @@ void initialize_menus() addMenu(new ListEnableCall(), "List.EnableCall"); addMenu(new ListEnableIsFriend(), "List.EnableIsFriend"); addMenu(new ListEnableIsNotFriend(), "List.EnableIsNotFriend"); + addMenu(new ListEnableUnmute(), "List.EnableUnmute"); addMenu(new ListEnableMute(), "List.EnableMute"); addMenu(new ListEnableOfferTeleport(), "List.EnableOfferTeleport"); addMenu(new ListVisibleWebProfile(), "List.VisibleWebProfile"); addMenu(new ListBanFromGroup(), "List.BanFromGroup"); + addMenu(new ListCopyNames(), "List.CopyNames"); addMenu(new ListCopySLURL(), "List.CopySLURL"); addMenu(new ListCopyUUIDs(), "List.CopyUUIDs"); addMenu(new ListInviteToGroup(), "List.InviteToGroup"); diff --git a/indra/newview/skins/default/xui/en-us/menu_avs_list.xml b/indra/newview/skins/default/xui/en-us/menu_avs_list.xml index acec8e1b8..9d8fa3b76 100644 --- a/indra/newview/skins/default/xui/en-us/menu_avs_list.xml +++ b/indra/newview/skins/default/xui/en-us/menu_avs_list.xml @@ -87,10 +87,13 @@ - + - - + + + + + From 1b913443add59bf97384df61d2807ca2bc4637a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sun, 24 Nov 2019 00:27:19 -0500 Subject: [PATCH 025/281] Add in menus for groups, and rework LFIDBearer to handle its menus Also allow List.StartIM for multiselect Add IsInGroup, NotInGroup, Leave, Join, and Activate "List." menu options --- indra/llui/lfidbearer.cpp | 25 ++++++- indra/llui/lfidbearer.h | 7 +- indra/llui/llscrolllistctrl.cpp | 17 +++-- indra/llui/llscrolllistctrl.h | 5 +- indra/newview/llnamebox.cpp | 5 +- indra/newview/llnameeditor.cpp | 7 +- indra/newview/llviewermenu.cpp | 70 +++++++++++++++++-- .../default/xui/en-us/menu_groups_list.xml | 44 ++++++++++++ .../xui/en-us/menu_nameeditor_group.xml | 3 + 9 files changed, 161 insertions(+), 22 deletions(-) create mode 100644 indra/newview/skins/default/xui/en-us/menu_groups_list.xml create mode 100644 indra/newview/skins/default/xui/en-us/menu_nameeditor_group.xml diff --git a/indra/llui/lfidbearer.cpp b/indra/llui/lfidbearer.cpp index cc7a3f988..b9c2154c4 100644 --- a/indra/llui/lfidbearer.cpp +++ b/indra/llui/lfidbearer.cpp @@ -20,10 +20,33 @@ #include "linden_common.h" #include "lfidbearer.h" #include "llmenugl.h" +#include "lluictrlfactory.h" + +const std::array LFIDBearer::sMenuStrings +{ + "menu_avs_list.xml" // 0 +, "menu_groups_list.xml" // 1 // Singu TODO +, "menu_objects_list.xml" // 2 // Singu TODO +}; +std::array LFIDBearer::sMenus {}; -std::vector LFIDBearer::sMenus = {}; LFIDBearer* LFIDBearer::sActive = nullptr; +void LFIDBearer::buildMenus() +{ + auto& factory = LLUICtrlFactory::instance(); + for (auto i = 0; i < COUNT; ++i) + sMenus[i] = factory.buildMenu(sMenuStrings[i], LLMenuGL::sMenuContainer); +} + +LLMenuGL* LFIDBearer::showMenu(LLView* self, const std::string& menu_name, S32 x, S32 y, std::function on_menu_built) +{ + auto menu = LLUICtrlFactory::instance().buildMenu(menu_name, LLMenuGL::sMenuContainer); + if (on_menu_built) on_menu_built(menu); + showMenu(self, menu, x, y); + return menu; +} + void LFIDBearer::showMenu(LLView* self, LLMenuGL* menu, S32 x, S32 y) { sActive = this; // Menu listeners rely on this diff --git a/indra/llui/lfidbearer.h b/indra/llui/lfidbearer.h index e56ba8560..1cff25565 100644 --- a/indra/llui/lfidbearer.h +++ b/indra/llui/lfidbearer.h @@ -49,10 +49,13 @@ struct LFIDBearer static S32 getActiveNumSelected() { return sActive->getNumSelected(); } static Type getActiveType() { return sActive->getSelectedType(); } + static void buildMenus(); + LLMenuGL* showMenu(LLView* self, const std::string& menu_name, S32 x, S32 y, std::function on_menu_built = nullptr); void showMenu(LLView* self, LLMenuGL* menu, S32 x, S32 y); - static void addCommonMenu(LLMenuGL* menu) { sMenus.push_back(menu); } protected: - static std::vector sMenus; // Menus that recur, such as general avatars or groups menus + // Menus that recur, such as general avatars or groups menus + static const std::array sMenuStrings; + static std::array sMenus; static LFIDBearer* sActive; }; diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index f46775f6f..72c61f819 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -2036,6 +2036,11 @@ void LLScrollListCtrl::setFilter(const std::string& filter) adjustScrollbar(unfiltered_count); } +void LLScrollListCtrl::setContextMenu(const std::string& menu) +{ + setContextMenu(LLUICtrlFactory::instance().buildMenu(menu, LLMenuGL::sMenuContainer)); +} + BOOL LLScrollListCtrl::handleHover(S32 x,S32 y,MASK mask) { @@ -2695,17 +2700,17 @@ void LLScrollListCtrl::setScrollListParameters(LLXMLNodePtr node) if (node->hasAttribute("menu_num")) { - // Some scroll lists use common menus identified by number - // 0 is menu_avs_list.xml, 1 will be for groups, 2 could be for lists of objects + // Some UI uses common menus identified by number + // 0 is avatars, 1 will be for groups, others could be for lists of objects or locations or experiences S32 menu_num; node->getAttributeS32("menu_num", menu_num); - setContextMenu(menu_num); + mPopupMenu = sMenus[menu_num]; } else if (node->hasAttribute("menu_file")) { - std::string menu_file; - node->getAttributeString("menu_file", menu_file); - mPopupMenu = LLUICtrlFactory::getInstance()->buildMenu(menu_file, LLMenuGL::sMenuContainer); + std::string menu; + node->getAttributeString("menu_file", menu); + if (!menu.empty()) setContextMenu(menu); } } diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index c09af350a..97917ad5e 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -254,9 +254,10 @@ public: bool filterItem(LLScrollListItem* item); void setFilter(const std::string& filter); - // support right-click context menus for avatar/group lists + // Context Menus void setContextMenu(LLMenuGL* menu) { mPopupMenu = menu; } - void setContextMenu(S32 index) { mPopupMenu = sMenus[index]; } + void setContextMenu(U8 index) { mPopupMenu = sMenus[index]; } + void setContextMenu(const std::string& menu); // Overridden from LLView /*virtual*/ void draw(); diff --git a/indra/newview/llnamebox.cpp b/indra/newview/llnamebox.cpp index 1e6331e4a..be90f20f5 100644 --- a/indra/newview/llnamebox.cpp +++ b/indra/newview/llnamebox.cpp @@ -67,10 +67,9 @@ BOOL LLNameBox::handleRightMouseDown(S32 x, S32 y, MASK mask) auto handled = LLTextBox::handleRightMouseDown(x, y, mask); if (mAllowInteract && !handled) { - // Singu TODO: Generic menus for groups - if (!mIsGroup && mNameID.notNull()) + if (mNameID.notNull()) { - showMenu(this, sMenus[0], x, y); + showMenu(this, sMenus[getSelectedType()], x, y); handled = true; } } diff --git a/indra/newview/llnameeditor.cpp b/indra/newview/llnameeditor.cpp index c2706c297..1d6aa59c2 100644 --- a/indra/newview/llnameeditor.cpp +++ b/indra/newview/llnameeditor.cpp @@ -76,15 +76,14 @@ BOOL LLNameEditor::handleRightMouseDown(S32 x, S32 y, MASK mask) { bool simple_menu = mContextMenuHandle.get()->getName() == "rclickmenu"; std::string new_menu; - // Singu TODO: Generic menus for groups - bool needs_simple = mIsGroup || !mAllowInteract || mNameID.isNull(); // Need simple if no ID or blocking interaction + bool needs_simple = !mAllowInteract || mNameID.isNull(); // Need simple if no ID or blocking interaction if (!simple_menu && needs_simple) // Switch to simple menu { new_menu = "menu_texteditor.xml"; } - else if (!needs_simple && simple_menu) + else // TODO: This is lazy, but I cannot recall a name editor that switches between group and avatar, so logic is not needed yet. { - new_menu = "menu_nameeditor_avatar.xml"; + new_menu = mIsGroup ? "menu_nameeditor_group.xml" : "menu_nameeditor_avatar.xml"; } if (!new_menu.empty()) setContextMenu(LLUICtrlFactory::instance().buildMenu(new_menu, LLMenuGL::sMenuContainer)); sActive = this; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index e5891e8fb..288af7934 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -749,8 +749,7 @@ void init_menus() gMenuHolder->addChild(gLoginMenuBarView); // Singu Note: Initialize common ScrollListMenus here - LFIDBearer::addCommonMenu(LLUICtrlFactory::getInstance()->buildMenu("menu_avs_list.xml", gMenuHolder)); // 0 - //LFIDBearer::addCommonMenu(LLUICtrlFactory::getInstance()->buildMenu("menu_groups_list.xml")); // 1 // Singu TODO + LFIDBearer::buildMenus(); LLView* ins = gMenuBarView->getChildView("insert_world", true, false); ins->setVisible(false); @@ -9328,7 +9327,7 @@ class ListStartCall : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - LLAvatarActions::startCall(LFIDBearer::getActiveSelectedID()); + (LFIDBearer::getActiveType == LFIDBearer::GROUP ? LLGroupActions::startCall : LLAvatarActions::startCall)(LFIDBearer::getActiveSelectedID()); return true; } }; @@ -9346,7 +9345,9 @@ class ListStartIM : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - LLAvatarActions::startIM(LFIDBearer::getActiveSelectedID()); + const auto&& im = LFIDBearer::getActiveType() == LFIDBearer::GROUP ? [](const LLUUID& id) { LLGroupActions::startIM(id); } : LLAvatarActions::startIM; + for (const auto& id : LFIDBearer::getActiveSelectedIDs()) + im(id); return true; } }; @@ -9542,6 +9543,62 @@ struct MenuSLURLDict : public LLSingleton } }; +class ListIsInGroup : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + auto in_group = false; + for (const auto& id : LFIDBearer::getActiveSelectedIDs()) + if (!(in_group = LLGroupActions::isInGroup(id))) + break; + gMenuHolder->findControl(userdata["control"].asString())->setValue(in_group); + return true; + } +}; + +class ListNotInGroup : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + auto in_group = true; + for (const auto& id : LFIDBearer::getActiveSelectedIDs()) + if (in_group = LLGroupActions::isInGroup(id)) + break; + gMenuHolder->findControl(userdata["control"].asString())->setValue(!in_group); + return true; + } +}; + +class ListLeave : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + for (const auto& id : LFIDBearer::getActiveSelectedIDs()) + LLGroupActions::leave(id); + return true; + } +}; + +class ListJoin : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + for (const auto& id : LFIDBearer::getActiveSelectedIDs()) + LLGroupActions::join(id); + return true; + } +}; + +class ListActivate : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + for (const auto& id : LFIDBearer::getActiveSelectedIDs()) + LLGroupActions::activate(id); + return true; + } +}; + class MediaCtrlCopyURL : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) @@ -9925,6 +9982,11 @@ void initialize_menus() addMenu(new ListEstateBan(), "List.EstateBan"); addMenu(new ListEstateEject(), "List.EstateEject"); addMenu(new ListToggleMute(), "List.ToggleMute"); + addMenu(new ListIsInGroup, "List.IsInGroup"); + addMenu(new ListNotInGroup, "List.NotInGroup"); + addMenu(new ListLeave, "List.Leave"); + addMenu(new ListJoin, "List.Join"); + addMenu(new ListActivate, "List.Activate"); add_radar_listeners(); diff --git a/indra/newview/skins/default/xui/en-us/menu_groups_list.xml b/indra/newview/skins/default/xui/en-us/menu_groups_list.xml new file mode 100644 index 000000000..0a8713753 --- /dev/null +++ b/indra/newview/skins/default/xui/en-us/menu_groups_list.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en-us/menu_nameeditor_group.xml b/indra/newview/skins/default/xui/en-us/menu_nameeditor_group.xml new file mode 100644 index 000000000..cd237eee9 --- /dev/null +++ b/indra/newview/skins/default/xui/en-us/menu_nameeditor_group.xml @@ -0,0 +1,3 @@ + + + From 84081286f0de93421157e781ace2a53a3d6f38fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sun, 24 Nov 2019 00:32:58 -0500 Subject: [PATCH 026/281] Buncha assorted changes --- indra/newview/llfavoritesbar.cpp | 2 +- indra/newview/llfloateravatarlist.cpp | 2 +- indra/newview/llfloatermarketplacelistings.cpp | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 3ed58db98..254d750cb 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -1130,7 +1130,7 @@ BOOL LLFavoritesBarCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask) show_navbar_context_menu(this,x,y); handled = true; }*/ - + return handled; } void copy_slurl_to_clipboard_cb(std::string& slurl) diff --git a/indra/newview/llfloateravatarlist.cpp b/indra/newview/llfloateravatarlist.cpp index 0f90007f0..7f4e8a8a3 100644 --- a/indra/newview/llfloateravatarlist.cpp +++ b/indra/newview/llfloateravatarlist.cpp @@ -1246,7 +1246,7 @@ void LLFloaterAvatarList::removeFocusFromAll() // static void LLFloaterAvatarList::setFocusAvatar(const LLUUID& id) { - if (!gAgentCamera.lookAtObject(id, false) && !lookAtAvatar(id)) return; + if (/*!gAgentCamera.lookAtObject(id, false) &&*/ !lookAtAvatar(id)) return; if (auto inst = getIfExists()) inst->setFocusAvatarInternal(id); } diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index b91e719e8..7081aa5bc 100644 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -53,6 +53,8 @@ static LLPanelInjector t_panel_status("llpanelmarket LLPanelMarketplaceListings::LLPanelMarketplaceListings() : mRootFolder(NULL) +, mAuditBtn(nullptr) +, mFilterEditor(nullptr) , mSortOrder(LLInventoryFilter::SO_FOLDERS_BY_NAME) , mFilterListingFoldersOnly(false) { From ef5c9f017504e156ba775bfecf07b4f81a79cdff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sun, 24 Nov 2019 00:33:50 -0500 Subject: [PATCH 027/281] Make sure that when we open pictures they stay on screen --- indra/newview/llpanelpick.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/newview/llpanelpick.cpp b/indra/newview/llpanelpick.cpp index ba1384797..99d5f0c91 100644 --- a/indra/newview/llpanelpick.cpp +++ b/indra/newview/llpanelpick.cpp @@ -66,7 +66,9 @@ void show_picture(const LLUUID& id, const std::string& name) S32 left, top; gFloaterView->getNewFloaterPosition(&left, &top); LLRect rect = gSavedSettings.getRect("PreviewTextureRect"); - (new LLPreviewTexture("preview texture", rect.translate(left - rect.mLeft, rect.mTop - top), name, id))->setFocus(true); + auto preview = new LLPreviewTexture("preview texture", rect.translate(left - rect.mLeft, rect.mTop - top), name, id); + preview->setFocus(true); + gFloaterView->adjustToFitScreen(preview, false); } //static From f0db784b461b2919168707dfe727c80d722d59fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sun, 24 Nov 2019 00:42:42 -0500 Subject: [PATCH 028/281] Oh, this change is needed for the future. --- indra/newview/llnetmap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 318c20b34..7c25f1887 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -1377,9 +1377,9 @@ BOOL LLNetMap::handleRightMouseDown(S32 x, S32 y, MASK mask) if (mPopupMenu) { showMenu(this, mPopupMenu, x, y); - mPopupMenu->getChildView("avs_menu")->setVisible(!mClosestAgentsAtLastClick.empty() && + mPopupMenu->getChildView("avs_menu")->setVisible(!mClosestAgentsAtLastClick.empty() && ! // [RLVa:LF] - 2019 - !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) + gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) // [/RLVa:LF] ); } From 79e1830ba95e32097be693bec0ac6898918cd82e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sun, 24 Nov 2019 02:54:23 -0500 Subject: [PATCH 029/281] Fix compile --- indra/llcommon/llsd.h | 6 +++--- indra/newview/llparticipantlist.cpp | 2 +- indra/newview/llviewermenu.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/indra/llcommon/llsd.h b/indra/llcommon/llsd.h index e9fcb8b47..1af6749b7 100644 --- a/indra/llcommon/llsd.h +++ b/indra/llcommon/llsd.h @@ -385,9 +385,9 @@ public: using an arbitrary pointer or scalar type to std::string. */ //@{ - LLSD(const void*); ///< construct from aribrary pointers - void assign(const void*); ///< assign from arbitrary pointers - LLSD& operator=(const void*); ///< assign from arbitrary pointers + LLSD(const void*) = delete; ///< construct from aribrary pointers + void assign(const void*) = delete; ///< assign from arbitrary pointers + LLSD& operator=(const void*) = delete; ///< assign from arbitrary pointers bool has(Integer) const; ///< has() only works for Maps //@} diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index d4693dee8..872b90514 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -78,7 +78,7 @@ void LLParticipantList::setupContextMenu() static LLMenuGL* menu = LLUICtrlFactory::getInstance()->buildMenu("menu_local_avs.xml", gMenuHolder); mAvatarList->setContextMenu(menu); } - else mAvatarList->setContextMenu(0); + else mAvatarList->setContextMenu(LFIDBearer::AVATAR); } BOOL LLParticipantList::postBuild() diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 288af7934..cb11edd25 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -9327,7 +9327,7 @@ class ListStartCall : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - (LFIDBearer::getActiveType == LFIDBearer::GROUP ? LLGroupActions::startCall : LLAvatarActions::startCall)(LFIDBearer::getActiveSelectedID()); + (LFIDBearer::getActiveType() == LFIDBearer::GROUP ? LLGroupActions::startCall : LLAvatarActions::startCall)(LFIDBearer::getActiveSelectedID()); return true; } }; From 6d5df7c9af0515a28bdf4d80b4450b033d3ddd82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sun, 24 Nov 2019 06:03:46 -0500 Subject: [PATCH 030/281] Make TextEditor an IDBearer, via slurl segments! --- indra/llui/lltexteditor.cpp | 160 +++--------------- indra/llui/lltexteditor.h | 18 +- indra/newview/llviewermenu.cpp | 56 +----- .../default/xui/en-us/menu_url_agent.xml | 97 +++++------ .../default/xui/en-us/menu_url_experience.xml | 2 +- .../default/xui/en-us/menu_url_group.xml | 4 +- .../default/xui/en-us/menu_url_objectim.xml | 2 +- 7 files changed, 81 insertions(+), 258 deletions(-) diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 344666112..29095cf90 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -244,8 +244,6 @@ private: /////////////////////////////////////////////////////////////////// -LLTextEditor::is_friend_signal_t* LLTextEditor::mIsFriendSignal = nullptr; -LLTextEditor::is_blocked_signal_t* LLTextEditor::mIsObjectBlockedSignal = nullptr; LLTextEditor::LLTextEditor( const std::string& name, @@ -372,9 +370,6 @@ LLTextEditor::~LLTextEditor() menu->die(); mPopupMenuHandle.markDead(); } - /* Singu Note: Static this, we'll use it wherever we can! - delete mIsFriendSignal; - delete mIsObjectBlockedSignal;*/ } const std::string& LLTextEditor::getMenuSegmentUrl() const @@ -384,24 +379,36 @@ const std::string& LLTextEditor::getMenuSegmentUrl() const return style ? style->getLinkHREF() : LLStringUtil::null; } -static LLTextEditor* get_focused_text_editor() +static LFIDBearer::Type get_type_from_url(const std::string& url) { - auto* te = -#ifdef SHOW_ASSERT - dynamic_cast -#else - static_cast -#endif - (gFocusMgr.getKeyboardFocus()); - llassert(te); // This listener only applies to text editors - return te; + auto pos = url.find("/app/"); + if (pos != std::string::npos && pos + 10 <= url.size()) + { + auto type = url.substr(pos + 5, 5); + return type == "agent" ? LFIDBearer::AVATAR + : type == "group" ? LFIDBearer::GROUP + : LFIDBearer::OBJECT; + } + return LFIDBearer::NONE; +} + +LLUUID LLTextEditor::getStringUUIDSelectedItem() const +{ + const auto& url = getMenuSegmentUrl(); + const auto& type = get_type_from_url(url); + return type == LFIDBearer::NONE ? LLUUID::null : LLUUID(type == OBJECT ? LLUrlAction::getObjectId(url) : LLUrlAction::getUserID(url)); +} + +LFIDBearer::Type LLTextEditor::getSelectedType() const +{ + return get_type_from_url(getMenuSegmentUrl()); } class CopyRawText : public LLMemberListener { bool handleEvent(LLPointer, const LLSD& userdata) override { - get_focused_text_editor()->copyRaw(); + LFIDBearer::getActive()->copyRaw(); return true; } }; @@ -415,16 +422,11 @@ class TextEditorVisible : public LLMemberListener } }; -static const std::string& get_focused_url() -{ - return get_focused_text_editor()->getMenuSegmentUrl(); -} - class ContextUrl : public LLMemberListener { bool handleEvent(LLPointer, const LLSD& userdata) override { - const auto& url = get_focused_url(); + const auto& url = LFIDBearer::getActive()->getMenuSegmentUrl(); const auto& op = userdata.asStringRef(); if (op == "Open") LLUrlAction::openURL(url); else if (op == "OpenInternal") LLUrlAction::openURLInternal(url); @@ -433,10 +435,6 @@ class ContextUrl : public LLMemberListener else if (op == "Block") LLUrlAction::blockObject(url); else if (op == "Unblock") LLUrlAction::unblockObject(url); else if (op == "Teleport") LLUrlAction::teleportToLocation(url); - else if (op == "ShowProfile") LLUrlAction::showProfile(url); - else if (op == "AddFriend") LLUrlAction::addFriend(url); - else if (op == "RemoveFriend") LLUrlAction::removeFriend(url); - else if (op == "SendIM") LLUrlAction::sendIM(url); else if (op == "ShowOnMap") LLUrlAction::showLocationOnMap(url); else if (op == "CopyLabel") LLUrlAction::copyLabelToClipboard(url); else if (op == "CopyUrl") LLUrlAction::copyURLToClipboard(url); @@ -444,67 +442,15 @@ class ContextUrl : public LLMemberListener } }; -class ContextIDUrl : public LLMemberListener -{ -protected: - std::string getID(const std::string& type) const - { - const auto& url = get_focused_url(); - // Empty works like avatar and group, "object" is an object (you needed to be told this) - return type.empty() ? LLUrlAction::getUserID(url) : LLUrlAction::getObjectId(url); - } -}; - -class ContextUrlCopy : public ContextIDUrl +class ContextUrlCopy : public LLMemberListener { bool handleEvent(LLPointer, const LLSD& userdata) override { - LLView::getWindow()->copyTextToClipboard(utf8str_to_wstring(getID(userdata.asStringRef()))); + LLView::getWindow()->copyTextToClipboard(utf8str_to_wstring(LFIDBearer::getActiveSelectedID().asString())); return true; } }; -class ContextUrlExt : public ContextIDUrl -{ - bool handleEvent(LLPointer, const LLSD& userdata) override - { - std::string cmd = userdata.asStringRef(); - std::string type; - const auto sep = cmd.find(','); - if (sep != std::string::npos) - { - type = cmd.substr(sep); - cmd = cmd.substr(0, sep); - } - mExtCallback(cmd, LLUUID(getID(type))); - return true; - } - LLTextEditor::ext_slurl_cb mExtCallback; -public: - ContextUrlExt(LLTextEditor::ext_slurl_cb cb) : mExtCallback(cb) {} -}; - -class ContextUrlExtVisible : public ContextIDUrl -{ - bool handleEvent(LLPointer, const LLSD& userdata) override - { - std::string cmd = userdata["data"]; - std::string type; - const auto sep = cmd.find(','); - if (sep != std::string::npos) - { - type = cmd.substr(sep); - cmd = cmd.substr(0, sep); - } - - LLMenuGL::sMenuContainer->findControl(userdata["control"].asString())->setValue(mExtVCB(cmd, LLUUID(getID(type)))); - return true; - } - LLTextEditor::ext_slurl_visible_cb mExtVCB; -public: - ContextUrlExtVisible(LLTextEditor::ext_slurl_visible_cb vcb) : mExtVCB(vcb) {} -}; - void LLTextEditor::spell_correct(void* data) { @@ -581,14 +527,12 @@ void LLTextEditor::spell_add(void* data) } //static -void LLTextEditor::addMenuListeners(ext_slurl_cb cb, ext_slurl_visible_cb vcb) +void LLTextEditor::addMenuListeners() { (new CopyRawText)->registerListener(LLMenuGL::sMenuContainer, "CopyRawText"); (new TextEditorVisible)->registerListener(LLMenuGL::sMenuContainer, "TextEditorVisible"); (new ContextUrl)->registerListener(LLMenuGL::sMenuContainer, "Text.Url"); (new ContextUrlCopy)->registerListener(LLMenuGL::sMenuContainer, "Text.Url.CopyUUID"); - (new ContextUrlExt(cb))->registerListener(LLMenuGL::sMenuContainer, "Text.Url.Ext"); - (new ContextUrlExtVisible(vcb))->registerListener(LLMenuGL::sMenuContainer, "Text.Url.ExtVisible"); } void LLTextEditor::setTrackColor( const LLColor4& color ) @@ -767,34 +711,6 @@ LLMenuGL* LLTextEditor::createUrlContextMenu(S32 x, S32 y, const std::string &in // create and return the context menu from the XUI file llassert(LLMenuGL::sMenuContainer != NULL); auto menu = LLUICtrlFactory::instance().buildMenu(xui_file, LLMenuGL::sMenuContainer); - if (menu) - { - if (mIsFriendSignal) - { - bool isFriend = *(*mIsFriendSignal)(LLUUID(LLUrlAction::getUserID(url))); - LLView* addFriendButton = menu->findChild("add_friend"); - LLView* removeFriendButton = menu->findChild("remove_friend"); - - if (addFriendButton && removeFriendButton) - { - addFriendButton->setVisible(!isFriend); - removeFriendButton->setVisible(isFriend); - } - } - - if (mIsObjectBlockedSignal) - { - bool is_blocked = *(*mIsObjectBlockedSignal)(LLUUID(LLUrlAction::getObjectId(url)), LLUrlAction::getObjectName(url)); - LLView* blockButton = menu->findChild("block_object"); - LLView* unblockButton = menu->findChild("unblock_object"); - - if (blockButton && unblockButton) - { - blockButton->setVisible(!is_blocked); - unblockButton->setVisible(is_blocked); - } - } - } return menu; } @@ -1575,9 +1491,7 @@ BOOL LLTextEditor::handleRightMouseDown( S32 x, S32 y, MASK mask ) mLastContextMenuX = x; mLastContextMenuY = y; - menu->buildDrawLabels(); - menu->updateParent(LLMenuGL::sMenuContainer); - LLMenuGL::showPopup(this, menu, x, y); + showMenu(this, menu, x, y); } return TRUE; } @@ -5179,24 +5093,6 @@ BOOL LLTextEditor::exportBuffer(std::string &buffer ) return TRUE; } -boost::signals2::connection LLTextEditor::setIsFriendCallback(const is_friend_signal_t::slot_type& cb) -{ - if (!mIsFriendSignal) - { - mIsFriendSignal = new is_friend_signal_t(); - } - return mIsFriendSignal->connect(cb); -} - -boost::signals2::connection LLTextEditor::setIsObjectBlockedCallback(const is_blocked_signal_t::slot_type& cb) -{ - if (!mIsObjectBlockedSignal) - { - mIsObjectBlockedSignal = new is_blocked_signal_t(); - } - return mIsObjectBlockedSignal->connect(cb); -} - ////////////////////////////////////////////////////////////////////////// // LLTextSegment diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index a18907749..692e43147 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -43,6 +43,7 @@ #include "lleditmenuhandler.h" #include "llpreeditor.h" +#include "lfidbearer.h" class LLFontGL; class LLKeywordToken; @@ -50,6 +51,7 @@ class LLMenuGL; class LLTextCmd; class LLTextEditor : public LLUICtrl, LLEditMenuHandler, protected LLPreeditor +, public LFIDBearer { public: // @@ -71,16 +73,12 @@ public: const std::string& getMenuSegmentUrl() const; + LLUUID getStringUUIDSelectedItem() const override final; + Type getSelectedType() const override final; + typedef boost::signals2::signal keystroke_signal_t; - typedef boost::signals2::signal is_friend_signal_t; - typedef boost::signals2::signal is_blocked_signal_t; - static boost::signals2::connection setIsFriendCallback(const is_friend_signal_t::slot_type& cb); - static boost::signals2::connection setIsObjectBlockedCallback(const is_blocked_signal_t::slot_type& cb); - - typedef std::function ext_slurl_cb; - typedef std::function ext_slurl_visible_cb; - static void addMenuListeners(ext_slurl_cb cb, ext_slurl_visible_cb vcb); + static void addMenuListeners(); void setKeystrokeCallback(const keystroke_signal_t::slot_type& callback); @@ -468,10 +466,6 @@ protected: void (*mOnScrollEndCallback)(void*); void *mOnScrollEndData; - // Used to check if user with given ID is avatar's friend - static is_friend_signal_t* mIsFriendSignal; - static is_blocked_signal_t* mIsObjectBlockedSignal; - LLWString mPreeditWString; LLWString mPreeditOverwrittenWString; std::vector mPreeditPositions; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index cb11edd25..f758902a3 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -9489,60 +9489,6 @@ class ListToggleMute : public view_listener_t } }; -struct MenuSLURLDict : public LLSingleton -{ - typedef std::function cb; - typedef std::function vcb; - typedef std::map> slurl_menu_map; - slurl_menu_map mEntries; - MenuSLURLDict() - { - // Text Editor menus - LLTextEditor::setIsObjectBlockedCallback(boost::bind(&LLMuteList::isMuted, LLMuteList::getInstance(), _1, _2, 0)); - LLTextEditor::setIsFriendCallback(LLAvatarActions::isFriend); - LLTextEditor::addMenuListeners(boost::bind(&MenuSLURLDict::action, this, _1, _2), boost::bind(&MenuSLURLDict::visible, this, _1, _2)); - - // Add the entries - insert("ShowWebProfile", boost::bind(LLAvatarActions::showProfile, _1, true), boost::bind(can_show_web_profile)); - insert("Pay", LLAvatarActions::pay); - insert("Call", LLAvatarActions::startCall); - insert("Share", LLAvatarActions::share); - insert("AbuseReport", LLFloaterReporter::showFromObject); - insert("InviteToGroup", [](const LLUUID& id) { LLAvatarActions::inviteToGroup(id); }); - insert("BanFromGroup", [](const LLUUID& id) { ban_from_group(uuid_vec_t(1, id)); }); - insert("ShowLog", [](const LLUUID& id) { show_log_browser(id); }); - insert("OfferTeleport", [](const LLUUID& id) { LLAvatarActions::offerTeleport(id); }, [](const LLUUID& id) { return LLAvatarActions::canOfferTeleport(id); }); - insert("RequestTeleport", LLAvatarActions::teleportRequest); - void teleport_to(const LLUUID& id); - insert("TeleportTo", teleport_to, is_nearby); - insert("Track", track_av, is_nearby); - insert("Focus", LLFloaterAvatarList::setFocusAvatar, is_nearby); - insert("ParcelEject", [](const LLUUID& id) { confirm_eject(uuid_vec_t(1, id)); }, is_nearby); - insert("Freeze", [](const LLUUID& id) { confirm_freeze(uuid_vec_t(1, id)); }, is_nearby); - insert("EstateBan", [](const LLUUID& id) { confirm_estate_ban(uuid_vec_t(1, id)); }, is_nearby); - insert("EstateEject", [](const LLUUID & id) { confirm_estate_kick(uuid_vec_t(1, id)); }, is_nearby); - insert("Mute", LLAvatarActions::toggleBlock, [](const LLUUID& id) { return LLAvatarActions::canBlock(id) && !LLAvatarActions::isBlocked(id); }); - insert("Unmute", LLAvatarActions::toggleBlock, LLAvatarActions::isBlocked); - } - - void insert(const std::string& key, cb callback, vcb vcallback = nullptr) - { - mEntries[key] = std::make_pair(callback, vcallback); - } - - void action(const std::string& cmd, LLUUID id) const - { - auto it = mEntries.find(cmd); - if (it != mEntries.end()) - (*it).second.first(id); - } - bool visible(const std::string& cmd, LLUUID id) const - { - auto it = mEntries.find(cmd); - return it == mEntries.end() || !(*it).second.second || (*it).second.second(id); - } -}; - class ListIsInGroup : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) @@ -9990,7 +9936,7 @@ void initialize_menus() add_radar_listeners(); - MenuSLURLDict::getInstance(); + LLTextEditor::addMenuListeners(); // Media Ctrl menus addMenu(new MediaCtrlCopyURL(), "Copy.PageURL"); diff --git a/indra/newview/skins/default/xui/en-us/menu_url_agent.xml b/indra/newview/skins/default/xui/en-us/menu_url_agent.xml index a22aad8ea..046af1bf1 100644 --- a/indra/newview/skins/default/xui/en-us/menu_url_agent.xml +++ b/indra/newview/skins/default/xui/en-us/menu_url_agent.xml @@ -4,69 +4,58 @@ label="User" name="Url Popup"> - + - - + + + - - + + - - + - - + + - - + + + + + + + - - - - - + - - + - - + + - - + - - + - - + - - + + - - + + - + - - + + - - + + - - + - - + - - + + - - + + - - + + - - + + diff --git a/indra/newview/skins/default/xui/en-us/menu_url_experience.xml b/indra/newview/skins/default/xui/en-us/menu_url_experience.xml index 24a9f4095..88f82ee51 100644 --- a/indra/newview/skins/default/xui/en-us/menu_url_experience.xml +++ b/indra/newview/skins/default/xui/en-us/menu_url_experience.xml @@ -11,7 +11,7 @@ function="Text.Url" userdata="CopyUrl" /> - + diff --git a/indra/newview/skins/default/xui/en-us/menu_url_group.xml b/indra/newview/skins/default/xui/en-us/menu_url_group.xml index 99b8c6d67..c6fa002b8 100644 --- a/indra/newview/skins/default/xui/en-us/menu_url_group.xml +++ b/indra/newview/skins/default/xui/en-us/menu_url_group.xml @@ -8,7 +8,7 @@ layout="topleft" name="show_group"> + function="List.ShowProfile" /> @@ -27,7 +27,7 @@ function="Text.Url" userdata="CopyUrl" /> - + diff --git a/indra/newview/skins/default/xui/en-us/menu_url_objectim.xml b/indra/newview/skins/default/xui/en-us/menu_url_objectim.xml index befbada9a..18b07a189 100644 --- a/indra/newview/skins/default/xui/en-us/menu_url_objectim.xml +++ b/indra/newview/skins/default/xui/en-us/menu_url_objectim.xml @@ -57,7 +57,7 @@ function="Text.Url" userdata="CopyUrl" /> - + From 90677188ec7dec8cf1d9cf37fb0a75dc5f097af9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sun, 24 Nov 2019 06:28:49 -0500 Subject: [PATCH 031/281] Fix Minimap menu not working --- indra/newview/llnetmap.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 7c25f1887..8bac89458 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -89,75 +89,75 @@ typedef LLMemberListener view_listener_t; class LLScaleMap : public view_listener_t { public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata) override final; }; class LLChatRings : public view_listener_t { public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata) override final; }; class LLCheckChatRings : public view_listener_t { public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata) override final; }; class LLStopTracking : public view_listener_t { public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata) override final; }; class LLIsTracking : public view_listener_t { public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata) override final; }; //moymod - Custom minimap markers :o class mmsetred : public view_listener_t //moymod { public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata) override final; }; class mmsetgreen : public view_listener_t //moymod { public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata) override final; }; class mmsetblue : public view_listener_t //moymod { public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata) override final; }; class mmsetyellow : public view_listener_t //moymod { public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata) override final; }; class mmsetcustom : public view_listener_t //moymod { public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata) override final; }; class mmsetunmark : public view_listener_t //moymod { public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata) override final; }; class mmenableunmark : public view_listener_t //moymod { public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata) override final; }; // [SL:KB] - Patch: World-MiniMap | Checked: 2012-07-08 (Catznip-3.3.0) class OverlayToggle : public view_listener_t { public: - /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata) override final; }; // [/SL:KB] @@ -251,7 +251,7 @@ BOOL LLNetMap::postBuild() updateMinorDirections(); - mPopupMenu = LLUICtrlFactory::getInstance()->buildMenu("menu_mini_map.xml", this); + mPopupMenu = LLUICtrlFactory::getInstance()->buildMenu("menu_mini_map.xml", gMenuHolder); if (!mPopupMenu) mPopupMenu = new LLMenuGL(LLStringUtil::null); mPopupMenu->setVisible(FALSE); return TRUE; From 841bd0e515f5222233825be273a33f7a4495f3be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sun, 24 Nov 2019 07:53:36 -0500 Subject: [PATCH 032/281] Add Group menus to group search, profiles, and groups floater Also expand Group SLURL menu items for links in chat Calculate ID Type from mPopupMenu's presence in sMenus, if possible. --- indra/llui/lfidbearer.cpp | 2 +- indra/llui/llscrolllistctrl.h | 8 +++++++ .../default/xui/en-us/floater_directory.xml | 2 +- .../default/xui/en-us/menu_url_group.xml | 22 +++++++++++++++++++ .../skins/default/xui/en-us/panel_avatar.xml | 2 +- .../skins/default/xui/en-us/panel_groups.xml | 2 +- .../default/xui/en-us/panel_groups_horiz.xml | 2 +- 7 files changed, 35 insertions(+), 5 deletions(-) diff --git a/indra/llui/lfidbearer.cpp b/indra/llui/lfidbearer.cpp index b9c2154c4..ce54ecbd5 100644 --- a/indra/llui/lfidbearer.cpp +++ b/indra/llui/lfidbearer.cpp @@ -25,7 +25,7 @@ const std::array LFIDBearer::sMenuStrings { "menu_avs_list.xml" // 0 -, "menu_groups_list.xml" // 1 // Singu TODO +, "menu_groups_list.xml" // 1 , "menu_objects_list.xml" // 2 // Singu TODO }; std::array LFIDBearer::sMenus {}; diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index 97917ad5e..cda539b53 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -259,6 +259,14 @@ public: void setContextMenu(U8 index) { mPopupMenu = sMenus[index]; } void setContextMenu(const std::string& menu); + Type getSelectedType() const override + { + for (auto i = 0; mPopupMenu && i < COUNT; ++i) + if (sMenus[i] == mPopupMenu) + return (Type)i; + return LFIDBearer::getSelectedType(); + } + // Overridden from LLView /*virtual*/ void draw(); /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); diff --git a/indra/newview/skins/default/xui/en-us/floater_directory.xml b/indra/newview/skins/default/xui/en-us/floater_directory.xml index bb1c73401..16a703de1 100644 --- a/indra/newview/skins/default/xui/en-us/floater_directory.xml +++ b/indra/newview/skins/default/xui/en-us/floater_directory.xml @@ -743,7 +743,7 @@ To buy direct, visit the land and click on the place name in the title bar. + multi_select="false" name="results" search_column="2" width="339" menu_num="1"> diff --git a/indra/newview/skins/default/xui/en-us/menu_url_group.xml b/indra/newview/skins/default/xui/en-us/menu_url_group.xml index c6fa002b8..55c9e580c 100644 --- a/indra/newview/skins/default/xui/en-us/menu_url_group.xml +++ b/indra/newview/skins/default/xui/en-us/menu_url_group.xml @@ -10,6 +10,28 @@ + + + + + + + + + + + + + + + + + + + + + + + multi_select="false" name="groups" width="321" menu_num="1"/> None + width="240" menu_num="1"> diff --git a/indra/newview/skins/default/xui/en-us/panel_groups_horiz.xml b/indra/newview/skins/default/xui/en-us/panel_groups_horiz.xml index 8b6168e8e..d3f40d107 100644 --- a/indra/newview/skins/default/xui/en-us/panel_groups_horiz.xml +++ b/indra/newview/skins/default/xui/en-us/panel_groups_horiz.xml @@ -5,7 +5,7 @@ draw_heading="true" draw_stripes="true" enabled="true" follows="left|top|right|bottom" left="5" mouse_opaque="true" multi_select="true" name="group list" tab_stop="true" top="-10" - width="340"> + width="340" menu_num="1"> From 8b30e2e9312584e31e03afd06dd98a1dac1ece2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sun, 24 Nov 2019 08:04:34 -0500 Subject: [PATCH 033/281] Also groups list for EAM panel --- indra/newview/skins/default/xui/en-us/panel_region_access.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/skins/default/xui/en-us/panel_region_access.xml b/indra/newview/skins/default/xui/en-us/panel_region_access.xml index 2e493949d..1c03f1680 100644 --- a/indra/newview/skins/default/xui/en-us/panel_region_access.xml +++ b/indra/newview/skins/default/xui/en-us/panel_region_access.xml @@ -291,6 +291,7 @@ draw_heading="false" draw_border="false" name="allowed_group_name_list" + menu_num="1" bottom_delta="0" width="453"> Date: Mon, 2 Dec 2019 18:01:00 -0600 Subject: [PATCH 034/281] Exclude animesh from the AlwaysRenderFriends (and self) complexity exemptions. --- indra/newview/llvoavatar.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index f9b36e00d..0c998d5a5 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -8661,11 +8661,13 @@ bool LLVOAvatar::isTooComplex() const { static const LLCachedControl always_render_friends("AlwaysRenderFriends", 0); bool too_complex; - if (isSelf() || (always_render_friends && always_render_friends != 3 && LLAvatarTracker::instance().isBuddy(getID()))) + // 'AlwaysRenderFriends' == 0, or an animesh, falls through to the complexity limits, if not self. Self is always rendered. + // 1 always render friends, 2 render only friends, 3 render only self + if (isSelf() || (always_render_friends && always_render_friends != 3 && !isControlAvatar() && LLAvatarTracker::instance().isBuddy(getID()))) { too_complex = false; } - else if (always_render_friends >= 2) + else if ((always_render_friends >= 2) && !isControlAvatar()) { too_complex = true; } From b34bafc348ee98a88bc7e609f50eaed151101b41 Mon Sep 17 00:00:00 2001 From: Router Gray Date: Mon, 2 Dec 2019 18:03:42 -0600 Subject: [PATCH 035/281] [UI] Make graphics preferences Object LOD value limit agree with QuickPrefs limit --- .../skins/default/xui/en-us/panel_preferences_graphics1.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml index 75953b446..cd4c38aae 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml @@ -85,7 +85,7 @@ Low Level of Detail: - + From d3a35e3f8ddb0c348f1d242faa801c2ff7a4dbcc Mon Sep 17 00:00:00 2001 From: Router Gray Date: Mon, 2 Dec 2019 22:47:24 -0600 Subject: [PATCH 036/281] Fix ancient bug in appearance editor (ref viewer-release "MAINT-2564 FIXED Alpha mask does not hide hair in the Outfit Editor" and "MAINT-3399 Hairbase renders incorrectly in edit appearance mode") --- indra/newview/llpaneleditwearable.cpp | 2 +- indra/newview/llvoavatar.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 2cc567483..e179b971e 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -1680,7 +1680,7 @@ void LLPanelEditWearable::initPreviousAlphaTextures() initPreviousAlphaTextureEntry(TEX_UPPER_ALPHA); initPreviousAlphaTextureEntry(TEX_HEAD_ALPHA); initPreviousAlphaTextureEntry(TEX_EYES_ALPHA); - initPreviousAlphaTextureEntry(TEX_LOWER_ALPHA); + initPreviousAlphaTextureEntry(TEX_HAIR_ALPHA); } void LLPanelEditWearable::initPreviousAlphaTextureEntry(LLAvatarAppearanceDefines::ETextureIndex te) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 0c998d5a5..a44e5aaa0 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -9014,7 +9014,7 @@ void LLVOAvatar::updateMeshTextures() // set texture and color of hair manually if we are not using a baked image. // This can happen while loading hair for yourself, or for clients that did not // bake a hair texture. Still needed for yourself after 1.22 is depricated. - if (!is_layer_baked[BAKED_HAIR] || isEditingAppearance()) + if (!is_layer_baked[BAKED_HAIR]) { const LLColor4 color = mTexHairColor ? mTexHairColor->getColor() : LLColor4(1,1,1,1); LLViewerTexture* hair_img = getImage( TEX_HAIR, 0 ); From 0c3e1f602ab2aa5ac23c426d7ed26e1126c41f64 Mon Sep 17 00:00:00 2001 From: Router Gray Date: Mon, 9 Dec 2019 01:39:29 -0600 Subject: [PATCH 037/281] [BOM] Fix universal wearables: sync a missed change from upstream, and make the inventory icon load. --- indra/llprimitive/llprimitive.h | 2 +- indra/newview/skins/default/textures/textures.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h index e0dbd13d4..d69c73199 100644 --- a/indra/llprimitive/llprimitive.h +++ b/indra/llprimitive/llprimitive.h @@ -320,7 +320,7 @@ public: // - Vir struct LLTEContents { - static const U32 MAX_TES = 32; + static const U32 MAX_TES = 45; U8 image_data[MAX_TES*16]; U8 colors[MAX_TES*4]; diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 6e7f64881..78742f1b4 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -355,7 +355,7 @@ with the same filename but different name - + From c6e3c31faec54fcb5f58d6f6b85d9cad658799b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Thu, 12 Dec 2019 20:21:14 -0500 Subject: [PATCH 038/281] Clean up logic --- indra/newview/llvoavatar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index a44e5aaa0..2541648ee 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -8667,7 +8667,7 @@ bool LLVOAvatar::isTooComplex() const { too_complex = false; } - else if ((always_render_friends >= 2) && !isControlAvatar()) + else if (always_render_friends >= 2 && !isControlAvatar()) { too_complex = true; } From cf5586037e47eea1fc2fa37396fa5e5cb8541ab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sat, 14 Dec 2019 23:01:07 -0500 Subject: [PATCH 039/281] Move to gitlab for CI (Rye's work but ported) d3ddcdae: Update various urls from bitbucket to new alchemy gitlab c24b176d: Standardize on one vc directory name for ease of build automation Also add .gitlab-ci.yml Thanks for the help, Rye! --- .gitlab-ci.yml | 58 ++++++++++++++++++++++++++++++++++++ autobuild.xml | 3 +- indra/cmake/Variables.cmake | 2 +- scripts/template_verifier.py | 2 +- 4 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..dfbc87594 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,58 @@ +stages: + - build + - deploy + +variables: + GIT_SUBMODULE_STRATEGY: recursive + +build:staging:windows32: + stage: build + tags: + - autobuild + - windows + before_script: + - pipenv install + script: + - pipenv run autobuild configure -c Release -A32 -- -DFMODSTUDIO=ON -DNVAPI=ON -DUSE_LTO=OFF -DVS_DISABLE_FATAL_WARNINGS=ON -DUSE_CRASHPAD=ON -DCRASHPAD_URL="$env:SENTRY_DSN" -DVIEWER_CHANNEL_BASE:STRING="Alpha" -DPACKAGE=ON + - pipenv run autobuild build -c Release -A32 --no-configure + - sentry-cli upload-dif SingularityAlphaViewer.exe singularity-bin.pdb crashpad_handler.exe crashpad_handler.pdb fmod.dll libcrypto-1_1-x64.dll libcrypto-1_1-x64.pdb libssl-1_1-x64.dll libssl-1_1-x64.pdb vcruntime140.dll msvcp140.dll glod.dll + artifacts: + paths: + - build-vc-32/newview/Release/Singularity*Setup.exe + only: + refs: + - master + +build:staging:windows64: + stage: build + tags: + - autobuild + - windows + before_script: + - pipenv install + script: + - pipenv run autobuild configure -c Release -A64 -- -DFMODSTUDIO=ON -DNVAPI=ON -DUSE_LTO=ON -DVS_DISABLE_FATAL_WARNINGS=ON -DUSE_CRASHPAD=ON -DCRASHPAD_URL="$env:SENTRY_DSN" -DVIEWER_CHANNEL_BASE:STRING="Alpha" -DPACKAGE=ON + - pipenv run autobuild build -c Release -A64 --no-configure + - sentry-cli upload-dif SingularityAlphaViewer.exe singularity-bin.pdb crashpad_handler.exe crashpad_handler.pdb fmod.dll libcrypto-1_1-x64.dll libcrypto-1_1-x64.pdb libssl-1_1-x64.dll libssl-1_1-x64.pdb libhunspell.dll libhunspell.pdb vcruntime140.dll msvcp140.dll glod.dll + artifacts: + paths: + - build-vc-64/newview/Release/Singularity*Setup.exe + only: + refs: + - master + +deploy:staging: + stage: deploy + tags: + - autobuild + - windows + script: + - mkdir upload + - cp build-vc-*/newview/Release/Singularity*Setup.exe upload/ + - $FileNameWin32 = Get-ChildItem -Path . -Name -Include upload/Singularity*_i686_Setup.exe + - curl.exe -v --user "$env:AUTOBUILD_HTTP_USER:$env:AUTOBUILD_HTTP_PASS" --upload-file ./$FileNameWin32 https://pkg.alchemyviewer.org/repository/singularity-project/alpha/$FileNameWin32 + - $FileNameWin64 = Get-ChildItem -Path . -Name -Include upload/Singularity*_x86_64_Setup.exe + - curl.exe -v --user "$env:AUTOBUILD_HTTP_USER:$env:AUTOBUILD_HTTP_PASS" --upload-file ./$FileNameWin64 https://pkg.alchemyviewer.org/repository/singularity-project/alpha/$FileNameWin64 + only: + - master + diff --git a/autobuild.xml b/autobuild.xml index f5f17ea95..125c014e5 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -2981,7 +2981,7 @@ windows build_directory - build-vc${AUTOBUILD_WIN_VSVER|161}-$AUTOBUILD_ADDRSIZE + build-vc-$AUTOBUILD_ADDRSIZE configurations RelWithDebInfo @@ -3040,6 +3040,7 @@ /p:Configuration=Release /p:Platform=${AUTOBUILD_WIN_VSPLATFORM|NOTWIN} /t:Build + /p:PreferredToolArchitecture=x64 /p:useenv=true /verbosity:normal /m diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 51e10a09a..b3b4fe7aa 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -87,7 +87,7 @@ if (EXISTS ${CMAKE_SOURCE_DIR}/Server.cmake) set(INSTALL_PROPRIETARY ON CACHE BOOL "Install proprietary binaries") endif (EXISTS ${CMAKE_SOURCE_DIR}/Server.cmake) set(TEMPLATE_VERIFIER_OPTIONS "" CACHE STRING "Options for scripts/template_verifier.py") -set(TEMPLATE_VERIFIER_MASTER_URL "https://forge.alchemyviewer.org/alchemy/tools/Master-Message-Template/raw/master/message_template.msg" CACHE STRING "Location of the master message template") +set(TEMPLATE_VERIFIER_MASTER_URL "https://git.alchemyviewer.org/alchemy/master-message-template/raw/master/message_template.msg" CACHE STRING "Location of the master message template") if (NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING diff --git a/scripts/template_verifier.py b/scripts/template_verifier.py index b44410cdd..8d8c49fe0 100755 --- a/scripts/template_verifier.py +++ b/scripts/template_verifier.py @@ -229,7 +229,7 @@ http://wiki.secondlife.com/wiki/Template_verifier.py """) parser.add_option( '-u', '--master_url', type='string', dest='master_url', - default='http://bitbucket.org/lindenlab/master-message-template/raw/tip/message_template.msg', + default='http://git.alchemyviewer.org/alchemy/master-message-template/raw/master/message_template.msg', help="""The url of the master message template.""") parser.add_option( '-c', '--cache_master', action='store_true', dest='cache_master', From f25577649a2db9fa47f4bfe92453e34363f5831e Mon Sep 17 00:00:00 2001 From: Router Gray Date: Tue, 17 Dec 2019 06:34:27 -0600 Subject: [PATCH 040/281] [BOM] Fix universal wearables more, and correctly: Sync WT_COUNT and WT_UNKNOWN constants in llinventory.cpp and llwearable.h Reverted previous changes to textures.xml regarding this issue --- indra/llappearance/llwearabletype.h | 1 + indra/llinventory/llinventory.cpp | 6 ++++-- indra/newview/skins/default/textures/textures.xml | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/indra/llappearance/llwearabletype.h b/indra/llappearance/llwearabletype.h index 6dec79fcb..ec946d5ad 100644 --- a/indra/llappearance/llwearabletype.h +++ b/indra/llappearance/llwearabletype.h @@ -58,6 +58,7 @@ public: WT_UNKNOWN = 17, // Singu note: used for corrupt wearables that do not have their type set in the inventory database. // While all the above values are serialized and stored in the database, this value is local only: // When a new item with value 17 is added by upstream, just increase this value to 18 (and WT_COUNT to 19). + // Keep WT_UNKNOWN and WT_COUNT in sync with llinventory.cpp WT_COUNT = 18, WT_INVALID = 255, diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index 86992aee6..e14ae9027 100644 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -1165,8 +1165,10 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new) // mType, these are the two asset types that are IT_WEARABLE: static U32 AT_BODYPART = 13; // LLAssetType::AT_BODYPART // Viewer local values: - static U32 WT_UNKNOWN = 16; // LLWearableType::WT_UNKNOWN - static U32 WT_COUNT = 17; // LLWearableType::WT_COUNT + static U32 WT_UNKNOWN = 17; // LLWearableType::WT_UNKNOWN + static U32 WT_COUNT = 18; // LLWearableType::WT_COUNT + // Keep WT_UNKNOWN and WT_COUNT + // in sync with llwearabletype.h // The last 8 bits of mFlags contain the wearable type. static U32 II_FLAGS_SUBTYPE_MASK = 0xff; // LLInventoryItemFlags::II_FLAGS_SUBTYPE_MASK diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 78742f1b4..6e7f64881 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -355,7 +355,7 @@ with the same filename but different name - + From f3609b06d73cbd5a135928c51de568bf8bcc24f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Tue, 17 Dec 2019 19:31:08 -0500 Subject: [PATCH 041/281] Further CI/CD & building sync with alchemy Reorder Variables.cmake for mergeability Renames CMake Variables: FMODSTUDIO->USE_FMODSTUDIO, NVAPI->USE_NVAPI, VIEWER_CHANNEL_BASE->VIEWER_CHANNEL_TYPE VIEWER_BRANDING_ID->VIEWER_BINARY_NAME, VIEWER_PRODUCT_NAME->VIEWER_CHANNEL_BASE Remove unused variables: VIEWER_PACKAGE_ID, VIEWER_EXE_STRING, VIEWER_SHORTCUT_STRING, VERSION_BUILD PACKAGE now defaults to on, USE_FMODSTUDIO now defaults to off Use list append instead of set in some more places Adds support for Project channels. --- .gitlab-ci.yml | 201 ++++++++++++++++++++++++++--- indra/cmake/Copy3rdPartyLibs.cmake | 26 ++-- indra/cmake/FMODSTUDIO.cmake | 6 +- indra/cmake/NVAPI.cmake | 6 +- indra/cmake/Variables.cmake | 60 ++++----- indra/llaudio/CMakeLists.txt | 4 +- indra/newview/CMakeLists.txt | 34 ++--- 7 files changed, 248 insertions(+), 89 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dfbc87594..3454b4ad4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,7 +5,7 @@ stages: variables: GIT_SUBMODULE_STRATEGY: recursive -build:staging:windows32: +build:master:windows32: stage: build tags: - autobuild @@ -13,17 +13,17 @@ build:staging:windows32: before_script: - pipenv install script: - - pipenv run autobuild configure -c Release -A32 -- -DFMODSTUDIO=ON -DNVAPI=ON -DUSE_LTO=OFF -DVS_DISABLE_FATAL_WARNINGS=ON -DUSE_CRASHPAD=ON -DCRASHPAD_URL="$env:SENTRY_DSN" -DVIEWER_CHANNEL_BASE:STRING="Alpha" -DPACKAGE=ON + - pipenv run autobuild configure -c Release -A32 -- -DUSE_FMODSTUDIO=ON -DUSE_NVAPI=ON -DUSE_LTO=ON -DVS_DISABLE_FATAL_WARNINGS=ON -DVIEWER_CHANNEL_TYPE="Test" - pipenv run autobuild build -c Release -A32 --no-configure - - sentry-cli upload-dif SingularityAlphaViewer.exe singularity-bin.pdb crashpad_handler.exe crashpad_handler.pdb fmod.dll libcrypto-1_1-x64.dll libcrypto-1_1-x64.pdb libssl-1_1-x64.dll libssl-1_1-x64.pdb vcruntime140.dll msvcp140.dll glod.dll artifacts: + name: "$env:CI_COMMIT_REF_NAME-$env:CI_COMMIT_SHORT_SHA" + expire_in: 2 week paths: - build-vc-32/newview/Release/Singularity*Setup.exe only: - refs: - - master - -build:staging:windows64: + - schedules + +build:master:windows64: stage: build tags: - autobuild @@ -31,28 +31,191 @@ build:staging:windows64: before_script: - pipenv install script: - - pipenv run autobuild configure -c Release -A64 -- -DFMODSTUDIO=ON -DNVAPI=ON -DUSE_LTO=ON -DVS_DISABLE_FATAL_WARNINGS=ON -DUSE_CRASHPAD=ON -DCRASHPAD_URL="$env:SENTRY_DSN" -DVIEWER_CHANNEL_BASE:STRING="Alpha" -DPACKAGE=ON + - pipenv run autobuild configure -c Release -A64 -- -DUSE_FMODSTUDIO=ON -DUSE_NVAPI=ON -DUSE_LTO=ON -DVS_DISABLE_FATAL_WARNINGS=ON -DVIEWER_CHANNEL_TYPE="Test" - pipenv run autobuild build -c Release -A64 --no-configure - - sentry-cli upload-dif SingularityAlphaViewer.exe singularity-bin.pdb crashpad_handler.exe crashpad_handler.pdb fmod.dll libcrypto-1_1-x64.dll libcrypto-1_1-x64.pdb libssl-1_1-x64.dll libssl-1_1-x64.pdb libhunspell.dll libhunspell.pdb vcruntime140.dll msvcp140.dll glod.dll artifacts: + name: "$env:CI_COMMIT_REF_NAME-$env:CI_COMMIT_SHORT_SHA" + expire_in: 2 week paths: - build-vc-64/newview/Release/Singularity*Setup.exe only: - refs: - - master - -deploy:staging: + - schedules + +build:project:windows32: + stage: build + tags: + - autobuild + - windows + before_script: + - pipenv install + script: + - $env:VIEWER_CHANNEL_CODENAME = $env:CI_COMMIT_REF_NAME[8..100] -join '' + - pipenv run autobuild configure -c Release -A32 -- -DUSE_FMODSTUDIO=ON -DUSE_NVAPI=ON -DUSE_LTO=ON -DVS_DISABLE_FATAL_WARNINGS=ON -DUSE_CRASHPAD=ON -DCRASHPAD_URL="$env:SENTRY_DSN_NONPROD" -DVIEWER_CHANNEL_TYPE="Project" -DVIEWER_CHANNEL_CODENAME="$env:VIEWER_CHANNEL_CODENAME" + - pipenv run autobuild build -c Release -A32 --no-configure + - cd build-vc-32/newview/Release/ + - $env:SENTRY_PROJECT = $env:SENTRY_PROJECT_NONPROD + - sentry-cli upload-dif singularity-bin.exe singularity-bin.pdb crashpad_handler.exe crashpad_handler.pdb fmod.dll libcrypto-1_1-x64.dll libcrypto-1_1-x64.pdb libssl-1_1-x64.dll libssl-1_1-x64.pdb vcruntime140.dll msvcp140.dll glod.dll + artifacts: + name: "$env:CI_COMMIT_REF_NAME-$env:CI_COMMIT_SHORT_SHA" + expire_in: 2 week + paths: + - build-vc-32/newview/Release/Singularity*Setup.exe + only: + - /^project-.*$/ + - schedules + except: + - beta + - release + +build:project:windows64: + stage: build + tags: + - autobuild + - windows + before_script: + - pipenv install + script: + - $env:VIEWER_CHANNEL_CODENAME = $env:CI_COMMIT_REF_NAME[8..100] -join '' + - pipenv run autobuild configure -c Release -A64 -- -DUSE_FMODSTUDIO=ON -DUSE_NVAPI=ON -DUSE_LTO=ON -DVS_DISABLE_FATAL_WARNINGS=ON -DUSE_CRASHPAD=ON -DCRASHPAD_URL="$env:SENTRY_DSN_NONPROD" -DVIEWER_CHANNEL_TYPE="Project" -DVIEWER_CHANNEL_CODENAME="$env:VIEWER_CHANNEL_CODENAME" + - pipenv run autobuild build -c Release -A64 --no-configure + - cd build-vc-64/newview/Release/ + - $env:SENTRY_PROJECT = $env:SENTRY_PROJECT_NONPROD + - sentry-cli upload-dif singularity-bin.exe singularity-bin.pdb crashpad_handler.exe crashpad_handler.pdb fmod.dll libcrypto-1_1-x64.dll libcrypto-1_1-x64.pdb libssl-1_1-x64.dll libssl-1_1-x64.pdb vcruntime140.dll msvcp140.dll libhunspell.dll libhunspell.pdb glod.dll + artifacts: + name: "$env:CI_COMMIT_REF_NAME-$env:CI_COMMIT_SHORT_SHA" + expire_in: 2 week + paths: + - build-vc-64/newview/Release/Singularity*Setup.exe + only: + - /^project-.*$/ + - schedules + except: + - beta + - release + +build:beta:windows32: + stage: build + tags: + - autobuild + - windows + before_script: + - pipenv install + script: + - pipenv run autobuild configure -c Release -A32 -- -DUSE_FMODSTUDIO=ON -DUSE_NVAPI=ON -DUSE_LTO=ON -DVS_DISABLE_FATAL_WARNINGS=ON -DUSE_CRASHPAD=ON -DCRASHPAD_URL="$env:SENTRY_DSN_PROD" -DVIEWER_CHANNEL_TYPE="Beta" + - pipenv run autobuild build -c Release -A32 --no-configure + - cd build-vc-32/newview/Release/ + - $env:SENTRY_PROJECT = $env:SENTRY_PROJECT_PROD + - sentry-cli upload-dif singularity-bin.exe singularity-bin.pdb crashpad_handler.exe crashpad_handler.pdb fmod.dll libcrypto-1_1-x64.dll libcrypto-1_1-x64.pdb libssl-1_1-x64.dll libssl-1_1-x64.pdb vcruntime140.dll msvcp140.dll glod.dll + artifacts: + name: "$env:CI_COMMIT_REF_NAME-$env:CI_COMMIT_SHORT_SHA" + expire_in: 2 week + paths: + - build-vc-32/newview/Release/Singularity*Setup.exe + only: + - beta + - schedules + except: + - /^project-.*$/ + - release + +build:beta:windows64: + stage: build + tags: + - autobuild + - windows + before_script: + - pipenv install + script: + - pipenv run autobuild configure -c Release -A64 -- -DUSE_FMODSTUDIO=ON -DUSE_NVAPI=ON -DUSE_LTO=ON -DVS_DISABLE_FATAL_WARNINGS=ON -DUSE_CRASHPAD=ON -DCRASHPAD_URL="$env:SENTRY_DSN_PROD" -DVIEWER_CHANNEL_TYPE="Beta" + - pipenv run autobuild build -c Release -A64 --no-configure + - cd build-vc-64/newview/Release/ + - $env:SENTRY_PROJECT = $env:SENTRY_PROJECT_PROD + - sentry-cli upload-dif singularity-bin.exe singularity-bin.pdb crashpad_handler.exe crashpad_handler.pdb fmod.dll libcrypto-1_1-x64.dll libcrypto-1_1-x64.pdb libssl-1_1-x64.dll libssl-1_1-x64.pdb vcruntime140.dll msvcp140.dll libhunspell.dll libhunspell.pdb glod.dll + artifacts: + name: "$env:CI_COMMIT_REF_NAME-$env:CI_COMMIT_SHORT_SHA" + expire_in: 2 week + paths: + - build-vc-64/newview/Release/Singularity*Setup.exe + only: + - beta + - schedules + except: + - /^project-.*$/ + - release + +build:release:windows32: + stage: build + tags: + - autobuild + - windows + before_script: + - pipenv install + script: + - pipenv run autobuild configure -c Release -A32 -- -DUSE_FMODSTUDIO=ON -DUSE_NVAPI=ON -DUSE_LTO=ON -DVS_DISABLE_FATAL_WARNINGS=ON -DUSE_CRASHPAD=ON -DCRASHPAD_URL="$env:SENTRY_DSN_PROD" -DVIEWER_CHANNEL_TYPE="Beta" + - pipenv run autobuild build -c Release -A32 --no-configure + - cd build-vc-32/newview/Release/ + - $env:SENTRY_PROJECT = $env:SENTRY_PROJECT_PROD + - sentry-cli upload-dif singularity-bin.exe singularity-bin.pdb crashpad_handler.exe crashpad_handler.pdb fmod.dll libcrypto-1_1-x64.dll libcrypto-1_1-x64.pdb libssl-1_1-x64.dll libssl-1_1-x64.pdb vcruntime140.dll msvcp140.dll glod.dll + artifacts: + name: "$env:CI_COMMIT_REF_NAME-$env:CI_COMMIT_SHORT_SHA" + expire_in: 2 week + paths: + - build-vc-32/newview/Release/Singularity*Setup.exe + only: + - release + - schedules + except: + - /^project-.*$/ + - beta + +build:release:windows64: + stage: build + tags: + - autobuild + - windows + before_script: + - pipenv install + script: + - pipenv run autobuild configure -c Release -A64 -- -DUSE_FMODSTUDIO=ON -DUSE_NVAPI=ON -DUSE_LTO=ON -DVS_DISABLE_FATAL_WARNINGS=ON -DUSE_CRASHPAD=ON -DCRASHPAD_URL="$env:SENTRY_DSN_PROD" -DVIEWER_CHANNEL_TYPE="Beta" + - pipenv run autobuild build -c Release -A64 --no-configure + - cd build-vc-64/newview/Release/ + - $env:SENTRY_PROJECT = $env:SENTRY_PROJECT_PROD + - sentry-cli upload-dif singularity-bin.exe singularity-bin.pdb crashpad_handler.exe crashpad_handler.pdb fmod.dll libcrypto-1_1-x64.dll libcrypto-1_1-x64.pdb libssl-1_1-x64.dll libssl-1_1-x64.pdb vcruntime140.dll msvcp140.dll libhunspell.dll libhunspell.pdb glod.dll + artifacts: + name: "$env:CI_COMMIT_REF_NAME-$env:CI_COMMIT_SHORT_SHA" + expire_in: 2 week + paths: + - build-vc-64/newview/Release/Singularity*Setup.exe + only: + - release + - schedules + except: + - /^project-.*$/ + - beta + +deploy:nexus: stage: deploy tags: - autobuild - windows script: + - $UploadDestDirLower = $env:CI_COMMIT_REF_NAME.ToLower().Replace("-", "/") + - $UploadDestDirLower + - $UploadDestVer = $($(Get-Content .\indra\newview\VIEWER_VERSION.txt) + "." + $(git rev-list HEAD --count | Out-String)).trim() + - $UploadDestVer - mkdir upload - cp build-vc-*/newview/Release/Singularity*Setup.exe upload/ - - $FileNameWin32 = Get-ChildItem -Path . -Name -Include upload/Singularity*_i686_Setup.exe - - curl.exe -v --user "$env:AUTOBUILD_HTTP_USER:$env:AUTOBUILD_HTTP_PASS" --upload-file ./$FileNameWin32 https://pkg.alchemyviewer.org/repository/singularity-project/alpha/$FileNameWin32 - - $FileNameWin64 = Get-ChildItem -Path . -Name -Include upload/Singularity*_x86_64_Setup.exe - - curl.exe -v --user "$env:AUTOBUILD_HTTP_USER:$env:AUTOBUILD_HTTP_PASS" --upload-file ./$FileNameWin64 https://pkg.alchemyviewer.org/repository/singularity-project/alpha/$FileNameWin64 + - cd upload + - $FileNameWin32 = Get-ChildItem -Path . -Name -Include Singularity_*_i686_Setup.exe + - $FileNameWin32 + - curl.exe -v --user "${env:AUTOBUILD_HTTP_USER}:${env:AUTOBUILD_HTTP_PASS}" --upload-file $FileNameWin32 "https://pkg.alchemyviewer.org/repository/viewer/singularity/${UploadDestDirLower}/${UploadDestVer}/${FileNameWin32}" + - $FileNameWin64 = Get-ChildItem -Path . -Name -Include Singularity_*_x86_64_Setup.exe + - $FileNameWin64 + - curl.exe -v --user "${env:AUTOBUILD_HTTP_USER}:${env:AUTOBUILD_HTTP_PASS}" --upload-file $FileNameWin64 "https://pkg.alchemyviewer.org/repository/viewer/singularity/${UploadDestDirLower}/${UploadDestVer}/${FileNameWin64}" + when: manual only: - - master - + - /^project-.*$/ + - beta + - release + except: + - master \ No newline at end of file diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index abe2a6f2a..293fe5a7a 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -82,19 +82,19 @@ if(WINDOWS) endif(ADDRESS_SIZE EQUAL 64) if(NOT DISABLE_TCMALLOC) - set(debug_files ${debug_files} libtcmalloc_minimal-debug.dll) - set(release_files ${release_files} libtcmalloc_minimal.dll) + list(APPEND debug_files libtcmalloc_minimal-debug.dll) + list(APPEND release_files libtcmalloc_minimal.dll) endif(NOT DISABLE_TCMALLOC) if(OPENAL) - set(debug_files ${debug_files} alut.dll OpenAL32.dll) - set(release_files ${release_files} alut.dll OpenAL32.dll) + list(APPEND debug_files alut.dll OpenAL32.dll) + list(APPEND release_files alut.dll OpenAL32.dll) endif(OPENAL) - if (FMODSTUDIO) - set(debug_files ${debug_files} fmodL.dll) - set(release_files ${release_files} fmod.dll) - endif (FMODSTUDIO) + if (USE_FMODSTUDIO) + list(APPEND debug_files fmodL.dll) + list(APPEND release_files fmod.dll) + endif (USE_FMODSTUDIO) foreach(redistfullfile IN LISTS CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS) get_filename_component(redistfilepath ${redistfullfile} DIRECTORY ) @@ -191,13 +191,13 @@ elseif(LINUX) ) if (USE_TCMALLOC) - set(release_files ${release_files} "libtcmalloc_minimal.so") + list(APPEND release_files "libtcmalloc_minimal.so") endif (USE_TCMALLOC) - if (FMODSTUDIO) - set(debug_files ${debug_files} "libfmodL.so") - set(release_files ${release_files} "libfmod.so") - endif (FMODSTUDIO) + if (USE_FMODSTUDIO) + list(APPEND debug_files "libfmodL.so") + list(APPEND release_files "libfmod.so") + endif (USE_FMODSTUDIO) else(WINDOWS) message(STATUS "WARNING: unrecognized platform for staging 3rd party libs, skipping...") diff --git a/indra/cmake/FMODSTUDIO.cmake b/indra/cmake/FMODSTUDIO.cmake index 2f8691c27..83ac0ac9c 100644 --- a/indra/cmake/FMODSTUDIO.cmake +++ b/indra/cmake/FMODSTUDIO.cmake @@ -1,7 +1,7 @@ # -*- cmake -*- include(Variables) -if (FMODSTUDIO) +if (USE_FMODSTUDIO) use_prebuilt_binary(fmodstudio) if(WINDOWS) set(lib_suffix .dll) @@ -31,7 +31,7 @@ if (FMODSTUDIO) ) set(FMODSTUDIO_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/fmodstudio) -endif(FMODSTUDIO) +endif(USE_FMODSTUDIO) if(FMOD_LIBRARY_RELEASE AND FMODSTUDIO_INCLUDE_DIR) set(FMOD ON) @@ -41,7 +41,7 @@ if(FMOD_LIBRARY_RELEASE AND FMODSTUDIO_INCLUDE_DIR) else (FMOD_LIBRARY_RELEASE AND FMODSTUDIO_INCLUDE_DIR) message(STATUS "No support for FMOD Studio audio (need to set FMODSTUDIO_SDK_DIR?)") set(FMOD OFF) - set(FMODSTUDIO OFF) + set(USE_FMODSTUDIO OFF) endif (FMOD_LIBRARY_RELEASE AND FMODSTUDIO_INCLUDE_DIR) if (FMOD) diff --git a/indra/cmake/NVAPI.cmake b/indra/cmake/NVAPI.cmake index 080d8fcf7..83d1ef643 100644 --- a/indra/cmake/NVAPI.cmake +++ b/indra/cmake/NVAPI.cmake @@ -2,7 +2,7 @@ include(Prebuilt) include(Variables) -if (NVAPI) +if (USE_NVAPI) if (WINDOWS) use_prebuilt_binary(nvapi) if (WORD_SIZE EQUAL 32) @@ -13,7 +13,7 @@ if (NVAPI) else (WINDOWS) set(NVAPI_LIBRARY "") endif (WINDOWS) -else (NVAPI) +else (USE_NVAPI) set(NVAPI_LIBRARY "") -endif (NVAPI) +endif (USE_NVAPI) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index b3b4fe7aa..0515aed68 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -28,13 +28,15 @@ set(LIBS_OPEN_PREFIX) set(SCRIPTS_PREFIX ../scripts) set(VIEWER_PREFIX) set(INTEGRATION_TESTS_PREFIX) + option(LL_TESTS "Build and run unit and integration tests (disable for build timing runs to reduce variation" OFF) option(BUILD_TESTING "Build test suite" OFF) +option(UNATTENDED "Disable use of uneeded tooling for automated builds" OFF) +# Compiler and toolchain options option(INCREMENTAL_LINK "Use incremental linking on win32 builds (enable for faster links on some machines)" OFF) option(USE_PRECOMPILED_HEADERS "Enable use of precompiled header directives where supported." ON) -option(USE_LTO "Enable Whole Program Optimization and related folding and binary reduction routines" OFF) -option(UNATTENDED "Disable use of uneeded tooling for automated builds" OFF) +option(USE_LTO "Enable global and interprocedural optimizations" OFF) # Configure crash reporting option(USE_CRASHPAD "Build support for crashpad reporting engine" OFF) @@ -44,7 +46,6 @@ set(VIEWER_SYMBOL_FILE "" CACHE STRING "Name of tarball into which to place symb # Media Plugins option(ENABLE_MEDIA_PLUGINS "Turn off building media plugins if they are imported by third-party library mechanism" ON) option(LIBVLCPLUGIN "Turn off building support for libvlc plugin" ON) - if (${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(LIBVLCPLUGIN OFF) endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") @@ -54,13 +55,11 @@ set(DISABLE_TCMALLOC OFF CACHE BOOL "Disable linkage of TCMalloc. (64bit builds set(DISABLE_FATAL_WARNINGS TRUE CACHE BOOL "Set this to FALSE to enable fatal warnings.") # Audio Engines -option(FMODSTUDIO "Build with support for the FMOD Studio audio engine" ON) - -# Window implementation -option(LLWINDOW_SDL2 "Use SDL2 for window and input handling" OFF) +option(USE_FMODSTUDIO "Build with support for the FMOD Studio audio engine" OFF) # Proprietary Library Features -option(NVAPI "Use nvapi driver interface library" OFF) +option(USE_NVAPI "Use nvapi driver interface library" OFF) + if(LIBS_CLOSED_DIR) file(TO_CMAKE_PATH "${LIBS_CLOSED_DIR}" LIBS_CLOSED_DIR) @@ -200,46 +199,44 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(LL_ARCH_DIR universal-darwin) endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") +# Platform specific +if (WINDOWS) + option(LLWINDOW_SDL2 "Use SDL2 for window and input handling. Windows only" OFF) +endif() + # Default deploy grid set(GRID agni CACHE STRING "Target Grid") -set(VIEWER_PRODUCT_NAME "Singularity" CACHE STRING "Viewer Base Name") -string(TOLOWER ${VIEWER_PRODUCT_NAME} VIEWER_PRODUCT_NAME_LOWER) +set(VIEWER_CHANNEL_BASE "Singularity" CACHE STRING "Viewer Channel Base Name") +set(VIEWER_CHANNEL_TYPE "Test" CACHE STRING "Viewer Channel Type Name") +set(VIEWER_CHANNEL_CODENAME "Default" CACHE STRING "Viewer Channel Code Name for Project type") + +if("${VIEWER_CHANNEL_TYPE}" STREQUAL "Project") +set(VIEWER_CHANNEL "${VIEWER_CHANNEL_BASE} ${VIEWER_CHANNEL_TYPE} ${VIEWER_CHANNEL_CODENAME}" CACHE INTERNAL "Viewer Channel Combined Name" FORCE) +else() +set(VIEWER_CHANNEL "${VIEWER_CHANNEL_BASE} ${VIEWER_CHANNEL_TYPE}" CACHE INTERNAL "Viewer Channel Combined Name" FORCE) +endif() + +set(VIEWER_BINARY_NAME "singularity" CACHE STRING + "The name of the viewer executable to create.") -set(VIEWER_CHANNEL_BASE "Test" CACHE STRING "Viewer Channel Name") -set(VIEWER_CHANNEL "${VIEWER_PRODUCT_NAME} ${VIEWER_CHANNEL_BASE}") -string(TOLOWER ${VIEWER_CHANNEL} VIEWER_CHANNEL_LOWER) string(REPLACE " " "" VIEWER_CHANNEL_ONEWORD ${VIEWER_CHANNEL}) +set(VIEWER_CHANNEL_NOSPACE ${VIEWER_CHANNEL_ONEWORD} CACHE STRING "Prefix used for resulting artifacts.") option(VIEWER_CHANNEL_GRK "Greek character(s) to represent the viewer channel for support purposes, override only for special branches" "") if (NOT VIEWER_CHANNEL_GRK) - if (VIEWER_CHANNEL_BASE MATCHES "Test") + if (VIEWER_CHANNEL_TYPE MATCHES "Test") set(VIEWER_CHANNEL_GRK "\\u03C4") # "τ" - elseif (VIEWER_CHANNEL_BASE MATCHES "Alpha") + elseif (VIEWER_CHANNEL_TYPE MATCHES "Alpha") set(VIEWER_CHANNEL_GRK "\\u03B1") # "α" - elseif (VIEWER_CHANNEL_BASE MATCHES "Beta") + elseif (VIEWER_CHANNEL_TYPE MATCHES "Beta") set(VIEWER_CHANNEL_GRK "\\u03B2") # "β" endif () endif (NOT VIEWER_CHANNEL_GRK) -if(VIEWER_CHANNEL_LOWER MATCHES "^${VIEWER_PRODUCT_NAME_LOWER} release") - set(VIEWER_PACKAGE_ID "${VIEWER_PRODUCT_NAME}Release") - set(VIEWER_EXE_STRING "${VIEWER_PRODUCT_NAME}Viewer") - set(VIEWER_SHORTCUT_STRING "${VIEWER_PRODUCT_NAME} Viewer") -else() - set(VIEWER_PACKAGE_ID ${VIEWER_CHANNEL_ONEWORD}) - set(VIEWER_EXE_STRING ${VIEWER_CHANNEL_ONEWORD}) - set(VIEWER_SHORTCUT_STRING ${VIEWER_CHANNEL}) -endif() - -set(VIEWER_CHANNEL_NOSPACE ${VIEWER_CHANNEL_ONEWORD} CACHE STRING "Prefix used for resulting artifacts.") - -set(VIEWER_BRANDING_ID "singularity" CACHE STRING "Viewer branding id") - option(ENABLE_SIGNING "Enable signing the viewer" OFF) set(SIGNING_IDENTITY "" CACHE STRING "Specifies the signing identity to use, if necessary.") -set(VERSION_BUILD "0" CACHE STRING "Revision number passed in from the outside") # Compiler and toolchain options option(USESYSTEMLIBS "Use libraries from your system rather than Linden-supplied prebuilt libraries." OFF) option(STANDALONE "Use libraries from your system rather than Linden-supplied prebuilt libraries." OFF) @@ -250,7 +247,6 @@ elseif (STANDALONE) endif (USESYSTEMLIBS) - source_group("CMake Rules" FILES CMakeLists.txt) endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) diff --git a/indra/llaudio/CMakeLists.txt b/indra/llaudio/CMakeLists.txt index 20456f5dc..92aa14ddc 100644 --- a/indra/llaudio/CMakeLists.txt +++ b/indra/llaudio/CMakeLists.txt @@ -43,7 +43,7 @@ set(llaudio_HEADER_FILES llwindgen.h ) -if (FMODSTUDIO) +if (USE_FMODSTUDIO) include_directories( ${FMODSTUDIO_INCLUDE_DIR} ) @@ -58,7 +58,7 @@ if (FMODSTUDIO) lllistener_fmodstudio.h llstreamingaudio_fmodstudio.h ) -endif (FMODSTUDIO) +endif (USE_FMODSTUDIO) if (OPENAL) list(APPEND llaudio_SOURCE_FILES diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index b42aa525e..9f3fdb0c5 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -51,9 +51,9 @@ include(ZLIB) include(URIPARSER) -if(FMODSTUDIO) +if(USE_FMODSTUDIO) include_directories(${FMODSTUDIO_INCLUDE_DIR}) -endif(FMODSTUDIO) +endif(USE_FMODSTUDIO) if(USE_CRASHPAD) include_directories(${CRASHPAD_INCLUDE_DIRS}) @@ -1239,11 +1239,11 @@ if (WINDOWS) llwindebug.h ) - if (NVAPI) + if (USE_NVAPI) set(APPVWRW32_COMPILE_FLAGS "${APPVWRW32_COMPILE_FLAGS} -DUSE_NVAPI=1") - else (NVAPI) + else (USE_NVAPI) set(APPVWRW32_COMPILE_FLAGS "${APPVWRW32_COMPILE_FLAGS} -UUSE_NVAPI") - endif (NVAPI) + endif (USE_NVAPI) set_source_files_properties(llappviewerwin32.cpp PROPERTIES COMPILE_FLAGS "${APPVWRW32_COMPILE_FLAGS}") # Replace the icons with the appropriate ones for the channel @@ -1434,9 +1434,9 @@ if (OPENAL) list(APPEND LLSTARTUP_COMPILE_DEFINITIONS "LL_OPENAL=1") endif (OPENAL) -if (FMODSTUDIO) +if (USE_FMODSTUDIO) list(APPEND LLSTARTUP_COMPILE_DEFINITIONS "LL_FMODSTUDIO=1") -endif (FMODSTUDIO) +endif (USE_FMODSTUDIO) set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_DEFINITIONS "${LLSTARTUP_COMPILE_DEFINITIONS}") @@ -1535,7 +1535,7 @@ if (WINDOWS) ) endif (ADDRESS_SIZE EQUAL 64) - if (FMODSTUDIO) + if (USE_FMODSTUDIO) if (WORD_SIZE EQUAL 64) list(APPEND COPY_INPUT_DEPENDENCIES ${SHARED_LIB_STAGING_DIR}/Release/fmod64.dll @@ -1548,7 +1548,7 @@ if (WINDOWS) ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/fmod.dll ) endif (WORD_SIZE EQUAL 64) - endif (FMODSTUDIO) + endif (USE_FMODSTUDIO) if(MSVC_IDE) set(VIEWER_BUILD_DEST_DIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}") @@ -1564,10 +1564,10 @@ if (WINDOWS) --actions=copy --arch=${ARCH} --artwork=${ARTWORK_DIR} - --branding_id=${VIEWER_BRANDING_ID} + --branding_id=${VIEWER_BINARY_NAME} --build=${CMAKE_CURRENT_BINARY_DIR} --buildtype=${CMAKE_BUILD_TYPE} - --configuration=${VIEWER_BUILD_DEST_DIR} + --configuration=${VIEWER_BUILD_DEST_DIR} --dest=${VIEWER_BUILD_DEST_DIR} --grid=${GRID} --channel=${VIEWER_CHANNEL} @@ -1606,12 +1606,12 @@ if (WINDOWS) ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py --arch=${ARCH} --artwork=${ARTWORK_DIR} - --branding_id=${VIEWER_BRANDING_ID} + --branding_id=${VIEWER_BINARY_NAME} --build=${CMAKE_CURRENT_BINARY_DIR} --buildtype=${CMAKE_BUILD_TYPE} --channel=${VIEWER_CHANNEL} --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt - --configuration=${VIEWER_BUILD_DEST_DIR} + --configuration=${VIEWER_BUILD_DEST_DIR} --dest=${VIEWER_BUILD_DEST_DIR} --grid=${GRID} --source=${CMAKE_CURRENT_SOURCE_DIR} @@ -1711,7 +1711,7 @@ if (LINUX) ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py --arch=${ARCH} --artwork=${ARTWORK_DIR} - --branding_id=${VIEWER_BRANDING_ID} + --branding_id=${VIEWER_BINARY_NAME} --build=${CMAKE_CURRENT_BINARY_DIR} --buildtype=${CMAKE_BUILD_TYPE} --channel=${VIEWER_CHANNEL} @@ -1735,7 +1735,7 @@ if (LINUX) --arch=${ARCH} --actions=copy --artwork=${ARTWORK_DIR} - --branding_id=${VIEWER_BRANDING_ID} + --branding_id=${VIEWER_BINARY_NAME} --build=${CMAKE_CURRENT_BINARY_DIR} --buildtype=${CMAKE_BUILD_TYPE} --configuration=${CMAKE_CFG_INTDIR} @@ -1793,7 +1793,7 @@ if (DARWIN) ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py --actions=copy --artwork=${ARTWORK_DIR} - --branding_id=${VIEWER_BRANDING_ID} + --branding_id=${VIEWER_BINARY_NAME} --build=${CMAKE_CURRENT_BINARY_DIR} --buildtype=${CMAKE_BUILD_TYPE} --configuration=${CMAKE_CFG_INTDIR} @@ -1868,7 +1868,7 @@ if (FALSE) if (LINUX) list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_CURRENT_BINARY_DIR}/packaged") set(VIEWER_SYMBOL_FILE "${SYMBOL_NAME}-${AUTOBUILD_PLATFORM_NAME}.tar.bz2") - set(VIEWER_EXE_GLOBS "${VIEWER_BRANDING_ID}-do-not-run-directly SLPlugin") + set(VIEWER_EXE_GLOBS "${VIEWER_BINARY_NAME}-do-not-run-directly SLPlugin") set(VIEWER_LIB_GLOB "*${CMAKE_SHARED_MODULE_SUFFIX}*") set(VIEWER_COPY_MANIFEST copy_l_viewer_manifest) endif (LINUX) From 10140d143c051cd1ff20a15d520abc05e6686f1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Tue, 17 Dec 2019 23:49:37 -0500 Subject: [PATCH 042/281] Wooops, branding ID separation is necessary, revert that change Set up VIEWER_BINARY_NAME based on VIEWER_BRANDING_ID, make spaces dashes. Fix VIEWER_EXE_GLOBS being wrong on Linux, thanks Router! --- indra/cmake/Variables.cmake | 4 +++- indra/newview/CMakeLists.txt | 15 ++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 0515aed68..6f1084540 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -217,7 +217,9 @@ else() set(VIEWER_CHANNEL "${VIEWER_CHANNEL_BASE} ${VIEWER_CHANNEL_TYPE}" CACHE INTERNAL "Viewer Channel Combined Name" FORCE) endif() -set(VIEWER_BINARY_NAME "singularity" CACHE STRING +string(TOLOWER "${VIEWER_CHANNEL_BASE}" VIEWER_BRANDING_ID) +string(REPLACE " " "-" VIEWER_BRANDING_ID ${VIEWER_BRANDING_ID}) +set(VIEWER_BINARY_NAME "${VIEWER_BRANDING_ID}-bin" CACHE STRING "The name of the viewer executable to create.") string(REPLACE " " "" VIEWER_CHANNEL_ONEWORD ${VIEWER_CHANNEL}) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 9f3fdb0c5..75e119645 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -617,9 +617,6 @@ set(viewer_SOURCE_FILES wlfPanel_AdvSettings.cpp ) -set(VIEWER_BINARY_NAME "singularity-bin" CACHE STRING - "The name of the viewer executable to create.") - set(viewer_HEADER_FILES CMakeLists.txt ViewerInstall.cmake @@ -1564,7 +1561,7 @@ if (WINDOWS) --actions=copy --arch=${ARCH} --artwork=${ARTWORK_DIR} - --branding_id=${VIEWER_BINARY_NAME} + --branding_id=${VIEWER_BRANDING_ID} --build=${CMAKE_CURRENT_BINARY_DIR} --buildtype=${CMAKE_BUILD_TYPE} --configuration=${VIEWER_BUILD_DEST_DIR} @@ -1606,7 +1603,7 @@ if (WINDOWS) ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py --arch=${ARCH} --artwork=${ARTWORK_DIR} - --branding_id=${VIEWER_BINARY_NAME} + --branding_id=${VIEWER_BRANDING_ID} --build=${CMAKE_CURRENT_BINARY_DIR} --buildtype=${CMAKE_BUILD_TYPE} --channel=${VIEWER_CHANNEL} @@ -1711,7 +1708,7 @@ if (LINUX) ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py --arch=${ARCH} --artwork=${ARTWORK_DIR} - --branding_id=${VIEWER_BINARY_NAME} + --branding_id=${VIEWER_BRANDING_ID} --build=${CMAKE_CURRENT_BINARY_DIR} --buildtype=${CMAKE_BUILD_TYPE} --channel=${VIEWER_CHANNEL} @@ -1735,7 +1732,7 @@ if (LINUX) --arch=${ARCH} --actions=copy --artwork=${ARTWORK_DIR} - --branding_id=${VIEWER_BINARY_NAME} + --branding_id=${VIEWER_BRANDING_ID} --build=${CMAKE_CURRENT_BINARY_DIR} --buildtype=${CMAKE_BUILD_TYPE} --configuration=${CMAKE_CFG_INTDIR} @@ -1793,7 +1790,7 @@ if (DARWIN) ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py --actions=copy --artwork=${ARTWORK_DIR} - --branding_id=${VIEWER_BINARY_NAME} + --branding_id=${VIEWER_BRANDING_ID} --build=${CMAKE_CURRENT_BINARY_DIR} --buildtype=${CMAKE_BUILD_TYPE} --configuration=${CMAKE_CFG_INTDIR} @@ -1868,7 +1865,7 @@ if (FALSE) if (LINUX) list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_CURRENT_BINARY_DIR}/packaged") set(VIEWER_SYMBOL_FILE "${SYMBOL_NAME}-${AUTOBUILD_PLATFORM_NAME}.tar.bz2") - set(VIEWER_EXE_GLOBS "${VIEWER_BINARY_NAME}-do-not-run-directly SLPlugin") + set(VIEWER_EXE_GLOBS "do-not-directly-run-${VIEWER_BINARY_NAME} SLPlugin") set(VIEWER_LIB_GLOB "*${CMAKE_SHARED_MODULE_SUFFIX}*") set(VIEWER_COPY_MANIFEST copy_l_viewer_manifest) endif (LINUX) From 4798d1e3b39cc9319476645828962d7cd5cc2abe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 18 Dec 2019 00:00:22 -0500 Subject: [PATCH 043/281] Finish migration from summary.json to build_data.json --- indra/newview/CMakeLists.txt | 2 +- indra/newview/viewer_manifest.py | 23 ++++++++++++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 75e119645..b727053f3 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1162,12 +1162,12 @@ set(viewer_HEADER_FILES source_group("CMake Rules" FILES ViewerInstall.cmake) +#build_data.json creation moved to viewer_manifest.py MAINT-6413 # the viewer_version.txt file created here is for passing to viewer_manifest and autobuild # the summary.json file is created for the benefit of the TeamCity builds, where # it is used to provide descriptive information to the build results page add_custom_target(generate_viewer_version ALL COMMAND ${CMAKE_COMMAND} -E echo ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION} > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt - COMMAND ${CMAKE_COMMAND} -E echo {"Type":"viewer","Version":"${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}"} > ${CMAKE_BINARY_DIR}/summary.json COMMENT "Generating viewer_version.txt for manifest processing" ) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 94f51e662..a02d691b1 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -135,9 +135,24 @@ class ViewerManifest(LLManifest): # File in the newview/ directory self.path("gpu_table.txt") - # The summary.json file gets left in the build directory by newview/CMakeLists.txt. - if not self.path2basename(os.pardir, "summary.json"): - print "No summary.json file" + + #build_data.json. Standard with exception handling is fine. If we can't open a new file for writing, we have worse problems + #platform is computed above with other arg parsing + build_data_dict = {"Type":"viewer","Version":'.'.join(self.args['version']), + "Channel Base": CHANNEL_VENDOR_BASE, + "Channel":self.channel_with_pkg_suffix(), + "Platform":self.build_data_json_platform, + "Address Size":self.address_size, + "Update Service":"https://app.alchemyviewer.org/update", + } + build_data_dict = self.finish_build_data_dict(build_data_dict) + with open(os.path.join(os.pardir,'build_data.json'), 'w') as build_data_handle: + json.dump(build_data_dict,build_data_handle) + + #we likely no longer need the test, since we will throw an exception above, but belt and suspenders and we get the + #return code for free. + if not self.path2basename(os.pardir, "build_data.json"): + print "No build_data.json file" def standalone(self): return self.args['standalone'] == "ON" @@ -1140,6 +1155,8 @@ class DarwinManifest(ViewerManifest): self.remove(sparsename) class LinuxManifest(ViewerManifest): + build_data_json_platform = 'lnx' + def is_packaging_viewer(self): super(LinuxManifest, self).is_packaging_viewer() return True # We always want a packaged viewer even without archive. From f8abafdefa2f9ba330c395f7f577dd2afadffc13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 18 Dec 2019 00:05:59 -0500 Subject: [PATCH 044/281] Code cleanup/sync --- indra/newview/viewer_manifest.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index a02d691b1..b27943764 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -181,8 +181,7 @@ class ViewerManifest(LLManifest): return self.channel().replace(CHANNEL_VENDOR_BASE, "").strip() def channel_type(self): # returns 'release', 'beta', 'project', or 'test' - global CHANNEL_VENDOR_BASE - channel_qualifier=self.channel().replace(CHANNEL_VENDOR_BASE, "").lower().strip() + channel_qualifier=self.channel_variant().lower() if channel_qualifier.startswith('release'): channel_type='release' elif channel_qualifier.startswith('beta'): From 4751949628696bc723a6123136556393140b53f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 18 Dec 2019 16:27:17 -0500 Subject: [PATCH 045/281] Cleanup and further sync with upstream --- indra/CMakeLists.txt | 23 ++++++++++------------- indra/cmake/Variables.cmake | 10 +++++++++- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 6b5c80cf0..3bcd9e161 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -3,12 +3,7 @@ # cmake_minimum_required should appear before any # other commands to guarantee full compatibility # with the version specified -## prior to 2.8, the add_custom_target commands used in setting the version did not work correctly -if(WIN32) - cmake_minimum_required(VERSION 3.4 FATAL_ERROR) -else() - cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR) -endif() +cmake_minimum_required(VERSION 3.14 FATAL_ERROR) set(ROOT_PROJECT_NAME "Singularity" CACHE STRING "The root project/makefile/solution name. Defaults to Singularity.") @@ -16,11 +11,6 @@ project(${ROOT_PROJECT_NAME}) set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") -include(Variables) -include(00-Common) -include(BuildVersion) -include(CTest) - set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) @@ -29,6 +19,11 @@ if (NOT CMAKE_BUILD_TYPE) "Build type. One of: Debug Release RelWithDebInfo" FORCE) endif (NOT CMAKE_BUILD_TYPE) +include(Variables) +include(00-Common) +include(BuildVersion) +include(CTest) + add_subdirectory(deps) add_subdirectory(cmake) @@ -65,8 +60,10 @@ add_subdirectory(${LIBS_OPEN_PREFIX}plugins) add_subdirectory(${VIEWER_PREFIX}newview/statemachine) add_subdirectory(${VIEWER_PREFIX}newview) -add_dependencies(viewer ${VIEWER_BRANDING_ID}-bin) +add_dependencies(viewer ${VIEWER_BINARY_NAME}) + if (WINDOWS) - set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${VIEWER_BRANDING_ID}-bin) + set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + PROPERTY VS_STARTUP_PROJECT ${VIEWER_BINARY_NAME}) endif (WINDOWS) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 6f1084540..37f5596f5 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -17,6 +17,14 @@ if(NOT DEFINED COMMON_CMAKE_DIR) set(COMMON_CMAKE_DIR "${CMAKE_SOURCE_DIR}/cmake") endif(NOT DEFINED COMMON_CMAKE_DIR) +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +# https://blog.kitware.com/upcoming-in-cmake-2-8-12-osx-rpath-support/ +set(CMAKE_MACOSX_RPATH ON) +set(CMAKE_BUILD_WITH_INSTALL_RPATH ON) +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH OFF) + set_property(GLOBAL PROPERTY USE_FOLDERS ON) get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) @@ -159,7 +167,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - set(DARWIN 1) + set(DARWIN ON BOOL FORCE) # Architecture set(CMAKE_OSX_SYSROOT macosx10.14) From 1c5a829e8292272949e583fca686653533ccc822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 18 Dec 2019 19:51:29 -0500 Subject: [PATCH 046/281] More of Rye's gitlab CI changes <3 --- .gitlab-ci.yml | 225 ++++++++++++++---------------------- indra/cmake/Variables.cmake | 31 ++++- 2 files changed, 114 insertions(+), 142 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3454b4ad4..fb412f3e4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,8 +4,9 @@ stages: variables: GIT_SUBMODULE_STRATEGY: recursive + VIEWER_USE_CRASHPAD: "TRUE" -build:master:windows32: +.win_build: &win_build stage: build tags: - autobuild @@ -13,53 +14,50 @@ build:master:windows32: before_script: - pipenv install script: - - pipenv run autobuild configure -c Release -A32 -- -DUSE_FMODSTUDIO=ON -DUSE_NVAPI=ON -DUSE_LTO=ON -DVS_DISABLE_FATAL_WARNINGS=ON -DVIEWER_CHANNEL_TYPE="Test" - - pipenv run autobuild build -c Release -A32 --no-configure + - If ($env:VIEWER_CHANNEL_TYPE -eq 'Project') + { + $env:VIEWER_CHANNEL_CODENAME = $env:CI_COMMIT_REF_NAME[8..100] -join '' + } + - pipenv run autobuild configure -c Release -- -DUSE_FMODSTUDIO=ON -DUSE_NVAPI=ON -DUSE_LTO=ON -DVS_DISABLE_FATAL_WARNINGS=ON -DVIEWER_CHANNEL_TYPE="Test" + - pipenv run autobuild build -c Release --no-configure + - If ($env:VIEWER_USE_CRASHPAD) { + - Push-Location .\build-vc-*\newview\Release\ +# - If ($env:VIEWER_CHANNEL_TYPE -eq 'Project') { $env:SENTRY_PROJECT = $env:SENTRY_PROJECT_NONPROD } ElseIf ($env:VIEWER_CHANNEL_TYPE -eq 'Beta' -OR $env:VIEWER_CHANNEL_TYPE -eq 'Release') {$env:SENTRY_PROJECT = $env:SENTRY_PROJECT_NONPROD } + - sentry-cli upload-dif singularity-bin.exe singularity-bin.pdb crashpad_handler.exe crashpad_handler.pdb fmod.dll libcrypto-1_1-x64.dll libcrypto-1_1-x64.pdb libssl-1_1-x64.dll libssl-1_1-x64.pdb vcruntime140.dll msvcp140.dll libhunspell.dll libhunspell.pdb glod.dll + - Pop-Location } artifacts: name: "$env:CI_COMMIT_REF_NAME-$env:CI_COMMIT_SHORT_SHA" - expire_in: 2 week + expire_in: 4 week paths: - - build-vc-32/newview/Release/Singularity*Setup.exe + - build-vc-*/newview/Release/build_data.json + - build-vc-*/newview/Release/singularity-bin.pdb + - build-vc-*/newview/Release/Singularity_*_Setup.exe + +build:master:windows32: + <<: *win_build + variables: + AUTOBUILD_ADDRSIZE: 32 + VIEWER_CHANNEL_TYPE: Test + VIEWER_USE_CRASHPAD: "FALSE" only: - schedules build:master:windows64: - stage: build - tags: - - autobuild - - windows - before_script: - - pipenv install - script: - - pipenv run autobuild configure -c Release -A64 -- -DUSE_FMODSTUDIO=ON -DUSE_NVAPI=ON -DUSE_LTO=ON -DVS_DISABLE_FATAL_WARNINGS=ON -DVIEWER_CHANNEL_TYPE="Test" - - pipenv run autobuild build -c Release -A64 --no-configure - artifacts: - name: "$env:CI_COMMIT_REF_NAME-$env:CI_COMMIT_SHORT_SHA" - expire_in: 2 week - paths: - - build-vc-64/newview/Release/Singularity*Setup.exe + <<: *win_build + variables: + AUTOBUILD_ADDRSIZE: 64 + VIEWER_CHANNEL_TYPE: Test + VIEWER_USE_CRASHPAD: "FALSE" only: - schedules build:project:windows32: - stage: build - tags: - - autobuild - - windows - before_script: - - pipenv install - script: - - $env:VIEWER_CHANNEL_CODENAME = $env:CI_COMMIT_REF_NAME[8..100] -join '' - - pipenv run autobuild configure -c Release -A32 -- -DUSE_FMODSTUDIO=ON -DUSE_NVAPI=ON -DUSE_LTO=ON -DVS_DISABLE_FATAL_WARNINGS=ON -DUSE_CRASHPAD=ON -DCRASHPAD_URL="$env:SENTRY_DSN_NONPROD" -DVIEWER_CHANNEL_TYPE="Project" -DVIEWER_CHANNEL_CODENAME="$env:VIEWER_CHANNEL_CODENAME" - - pipenv run autobuild build -c Release -A32 --no-configure - - cd build-vc-32/newview/Release/ - - $env:SENTRY_PROJECT = $env:SENTRY_PROJECT_NONPROD - - sentry-cli upload-dif singularity-bin.exe singularity-bin.pdb crashpad_handler.exe crashpad_handler.pdb fmod.dll libcrypto-1_1-x64.dll libcrypto-1_1-x64.pdb libssl-1_1-x64.dll libssl-1_1-x64.pdb vcruntime140.dll msvcp140.dll glod.dll - artifacts: - name: "$env:CI_COMMIT_REF_NAME-$env:CI_COMMIT_SHORT_SHA" - expire_in: 2 week - paths: - - build-vc-32/newview/Release/Singularity*Setup.exe + <<: *win_build + variables: + AUTOBUILD_ADDRSIZE: 32 + VIEWER_CHANNEL_TYPE: Project + VIEWER_CRASHPAD_URL: $SENTRY_DSN_NONPROD + SENTRY_PROJECT: $SENTRY_PROJECT_NONPROD only: - /^project-.*$/ - schedules @@ -68,24 +66,12 @@ build:project:windows32: - release build:project:windows64: - stage: build - tags: - - autobuild - - windows - before_script: - - pipenv install - script: - - $env:VIEWER_CHANNEL_CODENAME = $env:CI_COMMIT_REF_NAME[8..100] -join '' - - pipenv run autobuild configure -c Release -A64 -- -DUSE_FMODSTUDIO=ON -DUSE_NVAPI=ON -DUSE_LTO=ON -DVS_DISABLE_FATAL_WARNINGS=ON -DUSE_CRASHPAD=ON -DCRASHPAD_URL="$env:SENTRY_DSN_NONPROD" -DVIEWER_CHANNEL_TYPE="Project" -DVIEWER_CHANNEL_CODENAME="$env:VIEWER_CHANNEL_CODENAME" - - pipenv run autobuild build -c Release -A64 --no-configure - - cd build-vc-64/newview/Release/ - - $env:SENTRY_PROJECT = $env:SENTRY_PROJECT_NONPROD - - sentry-cli upload-dif singularity-bin.exe singularity-bin.pdb crashpad_handler.exe crashpad_handler.pdb fmod.dll libcrypto-1_1-x64.dll libcrypto-1_1-x64.pdb libssl-1_1-x64.dll libssl-1_1-x64.pdb vcruntime140.dll msvcp140.dll libhunspell.dll libhunspell.pdb glod.dll - artifacts: - name: "$env:CI_COMMIT_REF_NAME-$env:CI_COMMIT_SHORT_SHA" - expire_in: 2 week - paths: - - build-vc-64/newview/Release/Singularity*Setup.exe + <<: *win_build + variables: + AUTOBUILD_ADDRSIZE: 64 + VIEWER_CHANNEL_TYPE: Project + VIEWER_CRASHPAD_URL: $SENTRY_DSN_NONPROD + SENTRY_PROJECT: $SENTRY_PROJECT_NONPROD only: - /^project-.*$/ - schedules @@ -94,23 +80,12 @@ build:project:windows64: - release build:beta:windows32: - stage: build - tags: - - autobuild - - windows - before_script: - - pipenv install - script: - - pipenv run autobuild configure -c Release -A32 -- -DUSE_FMODSTUDIO=ON -DUSE_NVAPI=ON -DUSE_LTO=ON -DVS_DISABLE_FATAL_WARNINGS=ON -DUSE_CRASHPAD=ON -DCRASHPAD_URL="$env:SENTRY_DSN_PROD" -DVIEWER_CHANNEL_TYPE="Beta" - - pipenv run autobuild build -c Release -A32 --no-configure - - cd build-vc-32/newview/Release/ - - $env:SENTRY_PROJECT = $env:SENTRY_PROJECT_PROD - - sentry-cli upload-dif singularity-bin.exe singularity-bin.pdb crashpad_handler.exe crashpad_handler.pdb fmod.dll libcrypto-1_1-x64.dll libcrypto-1_1-x64.pdb libssl-1_1-x64.dll libssl-1_1-x64.pdb vcruntime140.dll msvcp140.dll glod.dll - artifacts: - name: "$env:CI_COMMIT_REF_NAME-$env:CI_COMMIT_SHORT_SHA" - expire_in: 2 week - paths: - - build-vc-32/newview/Release/Singularity*Setup.exe + <<: *win_build + variables: + AUTOBUILD_ADDRSIZE: 32 + VIEWER_CHANNEL_TYPE: Beta + VIEWER_CRASHPAD_URL: $SENTRY_DSN_PROD + SENTRY_PROJECT: $SENTRY_PROJECT_PROD only: - beta - schedules @@ -119,23 +94,12 @@ build:beta:windows32: - release build:beta:windows64: - stage: build - tags: - - autobuild - - windows - before_script: - - pipenv install - script: - - pipenv run autobuild configure -c Release -A64 -- -DUSE_FMODSTUDIO=ON -DUSE_NVAPI=ON -DUSE_LTO=ON -DVS_DISABLE_FATAL_WARNINGS=ON -DUSE_CRASHPAD=ON -DCRASHPAD_URL="$env:SENTRY_DSN_PROD" -DVIEWER_CHANNEL_TYPE="Beta" - - pipenv run autobuild build -c Release -A64 --no-configure - - cd build-vc-64/newview/Release/ - - $env:SENTRY_PROJECT = $env:SENTRY_PROJECT_PROD - - sentry-cli upload-dif singularity-bin.exe singularity-bin.pdb crashpad_handler.exe crashpad_handler.pdb fmod.dll libcrypto-1_1-x64.dll libcrypto-1_1-x64.pdb libssl-1_1-x64.dll libssl-1_1-x64.pdb vcruntime140.dll msvcp140.dll libhunspell.dll libhunspell.pdb glod.dll - artifacts: - name: "$env:CI_COMMIT_REF_NAME-$env:CI_COMMIT_SHORT_SHA" - expire_in: 2 week - paths: - - build-vc-64/newview/Release/Singularity*Setup.exe + <<: *win_build + variables: + AUTOBUILD_ADDRSIZE: 64 + VIEWER_CHANNEL_TYPE: Beta + VIEWER_CRASHPAD_URL: $SENTRY_DSN_PROD + SENTRY_PROJECT: $SENTRY_PROJECT_PROD only: - beta - schedules @@ -144,23 +108,12 @@ build:beta:windows64: - release build:release:windows32: - stage: build - tags: - - autobuild - - windows - before_script: - - pipenv install - script: - - pipenv run autobuild configure -c Release -A32 -- -DUSE_FMODSTUDIO=ON -DUSE_NVAPI=ON -DUSE_LTO=ON -DVS_DISABLE_FATAL_WARNINGS=ON -DUSE_CRASHPAD=ON -DCRASHPAD_URL="$env:SENTRY_DSN_PROD" -DVIEWER_CHANNEL_TYPE="Beta" - - pipenv run autobuild build -c Release -A32 --no-configure - - cd build-vc-32/newview/Release/ - - $env:SENTRY_PROJECT = $env:SENTRY_PROJECT_PROD - - sentry-cli upload-dif singularity-bin.exe singularity-bin.pdb crashpad_handler.exe crashpad_handler.pdb fmod.dll libcrypto-1_1-x64.dll libcrypto-1_1-x64.pdb libssl-1_1-x64.dll libssl-1_1-x64.pdb vcruntime140.dll msvcp140.dll glod.dll - artifacts: - name: "$env:CI_COMMIT_REF_NAME-$env:CI_COMMIT_SHORT_SHA" - expire_in: 2 week - paths: - - build-vc-32/newview/Release/Singularity*Setup.exe + <<: *win_build + variables: + AUTOBUILD_ADDRSIZE: 64 + VIEWER_CHANNEL_TYPE: Release + VIEWER_CRASHPAD_URL: $SENTRY_DSN_PROD + SENTRY_PROJECT: $SENTRY_PROJECT_PROD only: - release - schedules @@ -169,23 +122,12 @@ build:release:windows32: - beta build:release:windows64: - stage: build - tags: - - autobuild - - windows - before_script: - - pipenv install - script: - - pipenv run autobuild configure -c Release -A64 -- -DUSE_FMODSTUDIO=ON -DUSE_NVAPI=ON -DUSE_LTO=ON -DVS_DISABLE_FATAL_WARNINGS=ON -DUSE_CRASHPAD=ON -DCRASHPAD_URL="$env:SENTRY_DSN_PROD" -DVIEWER_CHANNEL_TYPE="Beta" - - pipenv run autobuild build -c Release -A64 --no-configure - - cd build-vc-64/newview/Release/ - - $env:SENTRY_PROJECT = $env:SENTRY_PROJECT_PROD - - sentry-cli upload-dif singularity-bin.exe singularity-bin.pdb crashpad_handler.exe crashpad_handler.pdb fmod.dll libcrypto-1_1-x64.dll libcrypto-1_1-x64.pdb libssl-1_1-x64.dll libssl-1_1-x64.pdb vcruntime140.dll msvcp140.dll libhunspell.dll libhunspell.pdb glod.dll - artifacts: - name: "$env:CI_COMMIT_REF_NAME-$env:CI_COMMIT_SHORT_SHA" - expire_in: 2 week - paths: - - build-vc-64/newview/Release/Singularity*Setup.exe + <<: *win_build + variables: + AUTOBUILD_ADDRSIZE: 64 + VIEWER_CHANNEL_TYPE: Release + VIEWER_CRASHPAD_URL: $SENTRY_DSN_PROD + SENTRY_PROJECT: $SENTRY_PROJECT_PROD only: - release - schedules @@ -199,19 +141,30 @@ deploy:nexus: - autobuild - windows script: - - $UploadDestDirLower = $env:CI_COMMIT_REF_NAME.ToLower().Replace("-", "/") - - $UploadDestDirLower - - $UploadDestVer = $($(Get-Content .\indra\newview\VIEWER_VERSION.txt) + "." + $(git rev-list HEAD --count | Out-String)).trim() - - $UploadDestVer - - mkdir upload - - cp build-vc-*/newview/Release/Singularity*Setup.exe upload/ - - cd upload - - $FileNameWin32 = Get-ChildItem -Path . -Name -Include Singularity_*_i686_Setup.exe - - $FileNameWin32 - - curl.exe -v --user "${env:AUTOBUILD_HTTP_USER}:${env:AUTOBUILD_HTTP_PASS}" --upload-file $FileNameWin32 "https://pkg.alchemyviewer.org/repository/viewer/singularity/${UploadDestDirLower}/${UploadDestVer}/${FileNameWin32}" - - $FileNameWin64 = Get-ChildItem -Path . -Name -Include Singularity_*_x86_64_Setup.exe - - $FileNameWin64 - - curl.exe -v --user "${env:AUTOBUILD_HTTP_USER}:${env:AUTOBUILD_HTTP_PASS}" --upload-file $FileNameWin64 "https://pkg.alchemyviewer.org/repository/viewer/singularity/${UploadDestDirLower}/${UploadDestVer}/${FileNameWin64}" + - $BuildData = Get-Content .\build-vc-64\newview\Release\build_data.json | ConvertFrom-Json + - $UploadDestViewerDir = $BuildData."Channel".ToLower().Replace(" ", "/") + - $UploadDestVer = $BuildData."Version" + - $UploadDestURL = "https://pkg.alchemyviewer.org/repository/viewer/${$UploadDestViewerDir}/${$UploadDestVer}" + + - $UploadParams = @{ + UseBasicParsing = $true + Method = "PUT" + Headers = @{ + ContentType = "application/x-executable" + Authorization = "Basic $([System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes("$env:AUTOBUILD_HTTP_USER`:$env:AUTOBUILD_HTTP_PASS")))" + } + Verbose = $true + } + + - Push-Location .\build-vc-32\newview\Release\ + - $FileNameWin32 = Get-ChildItem -Path . -Name -Include Singularity_*_Setup.exe + - Invoke-WebRequest @$UploadParams -InFile .\$FileNameWin32 --Uri "${$UploadDestURL}/${FileNameWin32}" + - Pop-Location + + - Push-Location .\build-vc-64\newview\Release\ + - $FileNameWin64 = Get-ChildItem -Path . -Name -Include Singularity_*_Setup.exe + - Invoke-WebRequest @$UploadParams -InFile .\$FileNameWin32 --Uri "${$UploadDestURL}/${FileNameWin64}" + - Pop-Location when: manual only: - /^project-.*$/ diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 37f5596f5..5bcd8c8c2 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -48,7 +48,12 @@ option(USE_LTO "Enable global and interprocedural optimizations" OFF) # Configure crash reporting option(USE_CRASHPAD "Build support for crashpad reporting engine" OFF) -set(CRASHPAD_URL "" CACHE STRING "Crashpad endpoint url") +if (DEFINED ENV{VIEWER_CRASHPAD_URL}) + set(CRASHPAD_URL $ENV{VIEWER_CRASHPAD_URL} CACHE STRING "Viewer Channel Base Name") +else() + set(CRASHPAD_URL "" CACHE STRING "Crashpad endpoint url") +endif() + set(VIEWER_SYMBOL_FILE "" CACHE STRING "Name of tarball into which to place symbol files") # Media Plugins @@ -215,14 +220,28 @@ endif() # Default deploy grid set(GRID agni CACHE STRING "Target Grid") -set(VIEWER_CHANNEL_BASE "Singularity" CACHE STRING "Viewer Channel Base Name") -set(VIEWER_CHANNEL_TYPE "Test" CACHE STRING "Viewer Channel Type Name") -set(VIEWER_CHANNEL_CODENAME "Default" CACHE STRING "Viewer Channel Code Name for Project type") +if (DEFINED ENV{VIEWER_CHANNEL_BASE}) + set(VIEWER_CHANNEL_BASE $ENV{VIEWER_CHANNEL_BASE} CACHE STRING "Viewer Channel Base Name" FORCE) +else() + set(VIEWER_CHANNEL_BASE "Singularity" CACHE STRING "Viewer Channel Base Name") +endif() + +if (DEFINED ENV{VIEWER_CHANNEL_TYPE}) + set(VIEWER_CHANNEL_TYPE $ENV{VIEWER_CHANNEL_TYPE} CACHE STRING "Viewer Channel Type Name" FORCE) +else() + set(VIEWER_CHANNEL_TYPE "Test" CACHE STRING "Viewer Channel Type Name") +endif() + +if (DEFINED ENV{VIEWER_CHANNEL_CODENAME}) + set(VIEWER_CHANNEL_CODENAME $ENV{VIEWER_CHANNEL_CODENAME} CACHE STRING "Viewer Channel Code Name for Project type" FORCE) +else() + set(VIEWER_CHANNEL_CODENAME "Default" CACHE STRING "Viewer Channel Code Name for Project type") +endif() if("${VIEWER_CHANNEL_TYPE}" STREQUAL "Project") -set(VIEWER_CHANNEL "${VIEWER_CHANNEL_BASE} ${VIEWER_CHANNEL_TYPE} ${VIEWER_CHANNEL_CODENAME}" CACHE INTERNAL "Viewer Channel Combined Name" FORCE) + set(VIEWER_CHANNEL "${VIEWER_CHANNEL_BASE} ${VIEWER_CHANNEL_TYPE} ${VIEWER_CHANNEL_CODENAME}") else() -set(VIEWER_CHANNEL "${VIEWER_CHANNEL_BASE} ${VIEWER_CHANNEL_TYPE}" CACHE INTERNAL "Viewer Channel Combined Name" FORCE) + set(VIEWER_CHANNEL "${VIEWER_CHANNEL_BASE} ${VIEWER_CHANNEL_TYPE}") endif() string(TOLOWER "${VIEWER_CHANNEL_BASE}" VIEWER_BRANDING_ID) From 831c7f53b2bbdc34a3507870acff7929701d23ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 18 Dec 2019 19:54:03 -0500 Subject: [PATCH 047/281] Fix bad spacing in Variables.cmake --- indra/cmake/Variables.cmake | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 5bcd8c8c2..1de317e3c 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -254,13 +254,13 @@ set(VIEWER_CHANNEL_NOSPACE ${VIEWER_CHANNEL_ONEWORD} CACHE STRING "Prefix used f option(VIEWER_CHANNEL_GRK "Greek character(s) to represent the viewer channel for support purposes, override only for special branches" "") if (NOT VIEWER_CHANNEL_GRK) - if (VIEWER_CHANNEL_TYPE MATCHES "Test") - set(VIEWER_CHANNEL_GRK "\\u03C4") # "τ" - elseif (VIEWER_CHANNEL_TYPE MATCHES "Alpha") - set(VIEWER_CHANNEL_GRK "\\u03B1") # "α" - elseif (VIEWER_CHANNEL_TYPE MATCHES "Beta") - set(VIEWER_CHANNEL_GRK "\\u03B2") # "β" - endif () + if (VIEWER_CHANNEL_TYPE MATCHES "Test") + set(VIEWER_CHANNEL_GRK "\\u03C4") # "τ" + elseif (VIEWER_CHANNEL_TYPE MATCHES "Alpha") + set(VIEWER_CHANNEL_GRK "\\u03B1") # "α" + elseif (VIEWER_CHANNEL_TYPE MATCHES "Beta") + set(VIEWER_CHANNEL_GRK "\\u03B2") # "β" + endif () endif (NOT VIEWER_CHANNEL_GRK) option(ENABLE_SIGNING "Enable signing the viewer" OFF) @@ -270,9 +270,9 @@ set(SIGNING_IDENTITY "" CACHE STRING "Specifies the signing identity to use, if option(USESYSTEMLIBS "Use libraries from your system rather than Linden-supplied prebuilt libraries." OFF) option(STANDALONE "Use libraries from your system rather than Linden-supplied prebuilt libraries." OFF) if (USESYSTEMLIBS) - set(STANDALONE ON) + set(STANDALONE ON) elseif (STANDALONE) - set(USESYSTEMLIBS ON) + set(USESYSTEMLIBS ON) endif (USESYSTEMLIBS) From 6e716fe3c585f4bdd781c732d7795d698f03a0ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Thu, 19 Dec 2019 20:35:33 -0500 Subject: [PATCH 048/281] Sentry and CI improvements from Rye. --- .gitlab-ci.yml | 125 ++++++++++++++++------------------ indra/cmake/Variables.cmake | 4 ++ indra/newview/llappviewer.cpp | 3 +- 3 files changed, 63 insertions(+), 69 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fb412f3e4..7162ed78d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,8 +3,8 @@ stages: - deploy variables: - GIT_SUBMODULE_STRATEGY: recursive VIEWER_USE_CRASHPAD: "TRUE" + VIEWER_CRASHPAD_URL: $SENTRY_DSN .win_build: &win_build stage: build @@ -18,23 +18,35 @@ variables: { $env:VIEWER_CHANNEL_CODENAME = $env:CI_COMMIT_REF_NAME[8..100] -join '' } - - pipenv run autobuild configure -c Release -- -DUSE_FMODSTUDIO=ON -DUSE_NVAPI=ON -DUSE_LTO=ON -DVS_DISABLE_FATAL_WARNINGS=ON -DVIEWER_CHANNEL_TYPE="Test" + - pipenv run autobuild configure -c Release -- -DUSE_FMODSTUDIO=ON -DUSE_NVAPI=ON -DUSE_LTO=ON -DVS_DISABLE_FATAL_WARNINGS=ON - pipenv run autobuild build -c Release --no-configure - If ($env:VIEWER_USE_CRASHPAD) { - Push-Location .\build-vc-*\newview\Release\ -# - If ($env:VIEWER_CHANNEL_TYPE -eq 'Project') { $env:SENTRY_PROJECT = $env:SENTRY_PROJECT_NONPROD } ElseIf ($env:VIEWER_CHANNEL_TYPE -eq 'Beta' -OR $env:VIEWER_CHANNEL_TYPE -eq 'Release') {$env:SENTRY_PROJECT = $env:SENTRY_PROJECT_NONPROD } - - sentry-cli upload-dif singularity-bin.exe singularity-bin.pdb crashpad_handler.exe crashpad_handler.pdb fmod.dll libcrypto-1_1-x64.dll libcrypto-1_1-x64.pdb libssl-1_1-x64.dll libssl-1_1-x64.pdb vcruntime140.dll msvcp140.dll libhunspell.dll libhunspell.pdb glod.dll + - sentry-cli upload-dif --include-sources singularity-bin.exe singularity-bin.pdb crashpad_handler.exe crashpad_handler.pdb fmod.dll libcrypto-1_1.dll libcrypto-1_1.pdb libssl-1_1.dll libssl-1_1.pdb libcrypto-1_1-x64.dll libcrypto-1_1-x64.pdb libssl-1_1-x64.dll libssl-1_1-x64.pdb vcruntime140.dll msvcp140.dll libhunspell.dll libhunspell.pdb glod.dll - Pop-Location } artifacts: name: "$env:CI_COMMIT_REF_NAME-$env:CI_COMMIT_SHORT_SHA" - expire_in: 4 week + expire_in: 2 week paths: - build-vc-*/newview/Release/build_data.json - build-vc-*/newview/Release/singularity-bin.pdb - build-vc-*/newview/Release/Singularity_*_Setup.exe +.beta_rules: &beta_rules + only: + - /^.*-beta$/ + except: + - branches + +.release_rules: &release_rules + only: + - /^.*-release$/ + except: + - branches + build:master:windows32: <<: *win_build + interruptible: true variables: AUTOBUILD_ADDRSIZE: 32 VIEWER_CHANNEL_TYPE: Test @@ -44,6 +56,7 @@ build:master:windows32: build:master:windows64: <<: *win_build + interruptible: true variables: AUTOBUILD_ADDRSIZE: 64 VIEWER_CHANNEL_TYPE: Test @@ -53,122 +66,98 @@ build:master:windows64: build:project:windows32: <<: *win_build + interruptible: true variables: AUTOBUILD_ADDRSIZE: 32 VIEWER_CHANNEL_TYPE: Project - VIEWER_CRASHPAD_URL: $SENTRY_DSN_NONPROD - SENTRY_PROJECT: $SENTRY_PROJECT_NONPROD only: - /^project-.*$/ - - schedules - except: - - beta - - release build:project:windows64: <<: *win_build + interruptible: true variables: AUTOBUILD_ADDRSIZE: 64 VIEWER_CHANNEL_TYPE: Project - VIEWER_CRASHPAD_URL: $SENTRY_DSN_NONPROD - SENTRY_PROJECT: $SENTRY_PROJECT_NONPROD only: - /^project-.*$/ - - schedules - except: - - beta - - release build:beta:windows32: <<: *win_build variables: AUTOBUILD_ADDRSIZE: 32 VIEWER_CHANNEL_TYPE: Beta - VIEWER_CRASHPAD_URL: $SENTRY_DSN_PROD - SENTRY_PROJECT: $SENTRY_PROJECT_PROD - only: - - beta - - schedules - except: - - /^project-.*$/ - - release + <<: *beta_rules build:beta:windows64: <<: *win_build variables: AUTOBUILD_ADDRSIZE: 64 VIEWER_CHANNEL_TYPE: Beta - VIEWER_CRASHPAD_URL: $SENTRY_DSN_PROD - SENTRY_PROJECT: $SENTRY_PROJECT_PROD - only: - - beta - - schedules - except: - - /^project-.*$/ - - release + <<: *beta_rules build:release:windows32: <<: *win_build variables: - AUTOBUILD_ADDRSIZE: 64 + AUTOBUILD_ADDRSIZE: 32 VIEWER_CHANNEL_TYPE: Release - VIEWER_CRASHPAD_URL: $SENTRY_DSN_PROD - SENTRY_PROJECT: $SENTRY_PROJECT_PROD - only: - - release - - schedules - except: - - /^project-.*$/ - - beta + <<: *release_rules build:release:windows64: <<: *win_build variables: AUTOBUILD_ADDRSIZE: 64 VIEWER_CHANNEL_TYPE: Release - VIEWER_CRASHPAD_URL: $SENTRY_DSN_PROD - SENTRY_PROJECT: $SENTRY_PROJECT_PROD - only: - - release - - schedules - except: - - /^project-.*$/ - - beta + <<: *release_rules -deploy:nexus: +.deploy_template: &deploy_template stage: deploy tags: - autobuild - windows script: - $BuildData = Get-Content .\build-vc-64\newview\Release\build_data.json | ConvertFrom-Json - - $UploadDestViewerDir = $BuildData."Channel".ToLower().Replace(" ", "/") - - $UploadDestVer = $BuildData."Version" - - $UploadDestURL = "https://pkg.alchemyviewer.org/repository/viewer/${$UploadDestViewerDir}/${$UploadDestVer}" + - $BuildChannelVersion = $BuildData."Channel" + ' ' + $BuildData."Version" + - $UploadDestViewerDir = $BuildChannelVersion.ToLower().Replace(" ", "/") + - $UploadDestURL = "https://pkg.alchemyviewer.org/repository/viewer/${UploadDestViewerDir}" - - $UploadParams = @{ - UseBasicParsing = $true - Method = "PUT" + - $UploadParams = @{ UseBasicParsing = $true; + Method = "PUT"; Headers = @{ - ContentType = "application/x-executable" - Authorization = "Basic $([System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes("$env:AUTOBUILD_HTTP_USER`:$env:AUTOBUILD_HTTP_PASS")))" - } - Verbose = $true - } + ContentType = "application/x-executable"; + Authorization = "Basic $([System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes("$env:AUTOBUILD_HTTP_USER`:$env:AUTOBUILD_HTTP_PASS")))"; }; + Verbose = $true; }; - Push-Location .\build-vc-32\newview\Release\ - $FileNameWin32 = Get-ChildItem -Path . -Name -Include Singularity_*_Setup.exe - - Invoke-WebRequest @$UploadParams -InFile .\$FileNameWin32 --Uri "${$UploadDestURL}/${FileNameWin32}" + - Invoke-WebRequest @UploadParams -InFile .\$FileNameWin32 -Uri "${UploadDestURL}/${FileNameWin32}" - Pop-Location - Push-Location .\build-vc-64\newview\Release\ - $FileNameWin64 = Get-ChildItem -Path . -Name -Include Singularity_*_Setup.exe - - Invoke-WebRequest @$UploadParams -InFile .\$FileNameWin32 --Uri "${$UploadDestURL}/${FileNameWin64}" + - Invoke-WebRequest @UploadParams -InFile .\$FileNameWin64 -Uri "${UploadDestURL}/${FileNameWin64}" - Pop-Location + + - sentry-cli releases new $BuildChannelVersion + - sentry-cli releases set-commits --auto $BuildChannelVersion + - sentry-cli releases finalize $BuildChannelVersion when: manual + +deploy_project: + <<: *deploy_template + environment: + name: qa only: - /^project-.*$/ - - beta - - release - except: - - master \ No newline at end of file + +deploy_beta: + <<: *deploy_template + environment: + name: staging + <<: *beta_rules + +deploy_release: + <<: *deploy_template + environment: + name: production + <<: *release_rules diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 1de317e3c..38c252745 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -48,6 +48,10 @@ option(USE_LTO "Enable global and interprocedural optimizations" OFF) # Configure crash reporting option(USE_CRASHPAD "Build support for crashpad reporting engine" OFF) +if (DEFINED ENV{VIEWER_USE_CRASHPAD}) + set(USE_CRASHPAD $ENV{VIEWER_USE_CRASHPAD}) +endif() + if (DEFINED ENV{VIEWER_CRASHPAD_URL}) set(CRASHPAD_URL $ENV{VIEWER_CRASHPAD_URL} CACHE STRING "Viewer Channel Base Name") else() diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 56c2c6550..76ae9bc2d 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -726,6 +726,8 @@ void LLAppViewer::initCrashReporting() annotations.emplace("sentry[contexts][app][app_version]", LLVersionInfo::getVersion()); annotations.emplace("sentry[contexts][app][app_build]", LLVersionInfo::getChannelAndVersion()); + annotations.emplace("sentry[release]", LLVersionInfo::getChannelAndVersion()); + annotations.emplace("sentry[tags][second_instance]", fmt::to_string(isSecondInstance())); //annotations.emplace("sentry[tags][bitness]", fmt::to_string(ADDRESS_SIZE)); annotations.emplace("sentry[tags][bitness]", @@ -738,7 +740,6 @@ void LLAppViewer::initCrashReporting() // Optional arguments to pass to the handler std::vector arguments; - arguments.push_back("--no-upload-gzip"); arguments.push_back("--no-rate-limit"); arguments.push_back("--monitor-self"); From 067bd3cbd7379bc616627c35f3a499a469764575 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Thu, 19 Dec 2019 20:39:41 -0500 Subject: [PATCH 049/281] Sync with alchemy Minor installer fix Fix MSVC update breaking crashAndLoop Move Variables to their corresponding places Sync parts of deps/CMakeLists.txt Update Abseil and fmt --- indra/cmake/Variables.cmake | 17 ++++------ indra/deps/CMakeLists.txt | 10 +++--- indra/llcommon/llerror.cpp | 7 ++-- .../installers/windows/installer_template.nsi | 32 ++++++++++--------- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 38c252745..dc0d5a6b0 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -42,6 +42,13 @@ option(BUILD_TESTING "Build test suite" OFF) option(UNATTENDED "Disable use of uneeded tooling for automated builds" OFF) # Compiler and toolchain options +option(USESYSTEMLIBS "Use libraries from your system rather than Linden-supplied prebuilt libraries." OFF) +option(STANDALONE "Use libraries from your system rather than Linden-supplied prebuilt libraries." OFF) +if (USESYSTEMLIBS) + set(STANDALONE ON) +elseif (STANDALONE) + set(USESYSTEMLIBS ON) +endif (USESYSTEMLIBS) option(INCREMENTAL_LINK "Use incremental linking on win32 builds (enable for faster links on some machines)" OFF) option(USE_PRECOMPILED_HEADERS "Enable use of precompiled header directives where supported." ON) option(USE_LTO "Enable global and interprocedural optimizations" OFF) @@ -270,16 +277,6 @@ endif (NOT VIEWER_CHANNEL_GRK) option(ENABLE_SIGNING "Enable signing the viewer" OFF) set(SIGNING_IDENTITY "" CACHE STRING "Specifies the signing identity to use, if necessary.") -# Compiler and toolchain options -option(USESYSTEMLIBS "Use libraries from your system rather than Linden-supplied prebuilt libraries." OFF) -option(STANDALONE "Use libraries from your system rather than Linden-supplied prebuilt libraries." OFF) -if (USESYSTEMLIBS) - set(STANDALONE ON) -elseif (STANDALONE) - set(USESYSTEMLIBS ON) -endif (USESYSTEMLIBS) - - source_group("CMake Rules" FILES CMakeLists.txt) endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) diff --git a/indra/deps/CMakeLists.txt b/indra/deps/CMakeLists.txt index 47b676d2c..fb2ed3050 100644 --- a/indra/deps/CMakeLists.txt +++ b/indra/deps/CMakeLists.txt @@ -3,21 +3,22 @@ project(deps) include(FetchContent) set(CMAKE_FOLDER "Third Party") +set(CMAKE_POSITION_INDEPENDENT_CODE ON) FetchContent_Declare( Catch2 GIT_REPOSITORY https://github.com/catchorg/Catch2.git - GIT_TAG v2.10.0 + GIT_TAG v2.11.0 ) FetchContent_Declare( fmt GIT_REPOSITORY https://github.com/fmtlib/fmt.git - GIT_TAG 7512a55aa3ae309587ca89668ef9ec4074a51a1f + GIT_TAG 6.1.2 ) FetchContent_Declare( absl GIT_REPOSITORY https://github.com/abseil/abseil-cpp.git - GIT_TAG ab3552a18964e7063c8324f45b3896a6a20b08a8 + GIT_TAG 29235139149790f5afc430c11cec8f1eb1677607 ) # This is a hack because absl has dumb cmake @@ -43,4 +44,5 @@ if(WINDOWS) FetchContent_MakeAvailable(fmt) endif() -set(CMAKE_FOLDER "") +unset(CMAKE_FOLDER) +unset(CMAKE_POSITION_INDEPENDENT_CODE) diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 3cb14a2ca..f6c58513b 100644 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -1338,7 +1338,7 @@ namespace LLError } #if LL_WINDOWS - // VC80 was optimizing the error away. + // MSVC is optimizing the error away. #pragma optimize("", off) #endif void crashAndLoop(const std::string& message) @@ -1347,9 +1347,8 @@ namespace LLError DoutFatal(dc::core, message); #else // Now, we go kaboom! - int* make_me_crash = NULL; - - *make_me_crash = 0; + int* make_me_crash = nullptr; + *make_me_crash = 0xDEADBEEF; while(true) { diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index e268a4b28..32a4820b1 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -1,6 +1,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Second Life setup.nsi -;; Copyright 2004-2015, Linden Research, Inc. +;; secondlife setup.nsi +;; Copyright 2004-2011, Linden Research, Inc. +;; Copyright 2013-2015 Alchemy Viewer Project ;; ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public @@ -94,18 +95,6 @@ ;File Handling SetOverwrite on -;-------------------------------- -;Version Information - - VIProductVersion "${VERSION_LONG}" - VIAddVersionKey "ProductName" "Singularity Viewer Installer" - VIAddVersionKey "Comments" "A viewer for the meta-verse!" - VIAddVersionKey "CompanyName" "${VENDORSTR}" - VIAddVersionKey "LegalCopyright" "Copyright © 2010-2019, ${VENDORSTR}" - VIAddVersionKey "FileDescription" "${APPNAME} Installer" - VIAddVersionKey "ProductVersion" "${VERSION_LONG}" - VIAddVersionKey "FileVersion" "${VERSION_LONG}" - ;-------------------------------- ;Interface Settings @@ -198,6 +187,18 @@ !include "%%SOURCE%%\installers\windows\lang_tr.nsi" !include "%%SOURCE%%\installers\windows\lang_zh.nsi" +;-------------------------------- +;Version Information + + VIProductVersion "${VERSION_LONG}" + VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "Singularity Viewer Installer" + VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "A viewer for the meta-verse!" + VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "${VENDORSTR}" + VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright © 2010-2019, ${VENDORSTR}" + VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "${APPNAME} Installer" + VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "${VERSION_LONG}" + VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${VERSION_LONG}" + ;-------------------------------- ;Reserve Files @@ -206,7 +207,7 @@ ;because this will make your installer start faster. !insertmacro MUI_RESERVEFILE_LANGDLL - ReserveFile "${NSISDIR}\Plugins\x86-unicode\nsisdl.dll" + ReserveFile "${NSISDIR}\Plugins\x86-unicode\NSISdl.dll" ReserveFile "${NSISDIR}\Plugins\x86-unicode\nsDialogs.dll" ReserveFile "${NSISDIR}\Plugins\x86-unicode\StartMenu.dll" ReserveFile "${NSISDIR}\Plugins\x86-unicode\StdUtils.dll" @@ -438,6 +439,7 @@ Section "Viewer" WriteINIStr "$SMPROGRAMS\$STARTMENUFOLDER\SL Create Account.url" "InternetShortcut" "URL" "http://join.secondlife.com/" WriteINIStr "$SMPROGRAMS\$STARTMENUFOLDER\SL Your Account.url" "InternetShortcut" "URL" "http://www.secondlife.com/account/" WriteINIStr "$SMPROGRAMS\$STARTMENUFOLDER\SL Scripting Language Help.url" "InternetShortcut" "URL" "http://wiki.secondlife.com/wiki/LSL_Portal" + !insertmacro MUI_STARTMENU_WRITE_END ;Other shortcuts From 99346d6486d3c4394b3a0346ede147102640107a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sat, 21 Dec 2019 04:58:57 -0500 Subject: [PATCH 050/281] This should've been committed in f3609b06d73cbd5a135928c51de568bf8bcc24f3 --- indra/newview/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index b727053f3..b8de567a4 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1460,8 +1460,7 @@ if(USE_PRECOMPILED_HEADERS) ${CMAKE_CURRENT_SOURCE_DIR}/llviewerprecompiledheaders.cpp) endif(USE_PRECOMPILED_HEADERS) -set(PACKAGE OFF CACHE BOOL - "Add a package target that builds an installer package.") +option(PACKAGE "Add a package target that builds an installer package." ON) if (WINDOWS) set(release_flags "/MAP") From 1f3a232a9df94571ef9ea1dd60b03f72a8a52600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sun, 22 Dec 2019 01:44:06 -0500 Subject: [PATCH 051/281] Add Copy Name/Copy Names to avatar namelink menus --- indra/newview/skins/default/xui/en-us/menu_avs_list.xml | 4 ++++ indra/newview/skins/default/xui/en-us/menu_local_avs.xml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/indra/newview/skins/default/xui/en-us/menu_avs_list.xml b/indra/newview/skins/default/xui/en-us/menu_avs_list.xml index 9d8fa3b76..fb4ac54fa 100644 --- a/indra/newview/skins/default/xui/en-us/menu_avs_list.xml +++ b/indra/newview/skins/default/xui/en-us/menu_avs_list.xml @@ -76,6 +76,10 @@ + + + + diff --git a/indra/newview/skins/default/xui/en-us/menu_local_avs.xml b/indra/newview/skins/default/xui/en-us/menu_local_avs.xml index 49c076252..290cb7b1f 100644 --- a/indra/newview/skins/default/xui/en-us/menu_local_avs.xml +++ b/indra/newview/skins/default/xui/en-us/menu_local_avs.xml @@ -74,6 +74,10 @@ + + + + From a87b7603d1a56edb408a11092c241ca5ff15932a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sun, 22 Dec 2019 18:26:00 -0500 Subject: [PATCH 052/281] Feature Request: Move Tiny Build Floater button to floater's top bar --- indra/newview/skins/default/xui/en-us/floater_tools.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en-us/floater_tools.xml b/indra/newview/skins/default/xui/en-us/floater_tools.xml index 458e12c08..57d90a7f8 100644 --- a/indra/newview/skins/default/xui/en-us/floater_tools.xml +++ b/indra/newview/skins/default/xui/en-us/floater_tools.xml @@ -63,7 +63,7 @@ function="BuildTool.setTool" parameter="Land" /> - From 0e28436aa9b5d5ecbcb2302731f57be6be84f4f3 Mon Sep 17 00:00:00 2001 From: Router Gray Date: Tue, 7 Jan 2020 19:59:53 -0600 Subject: [PATCH 129/281] Fix invalid initialization of non-const reference --- indra/newview/llhoverview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llhoverview.cpp b/indra/newview/llhoverview.cpp index ff21ffab3..e9f47cf94 100644 --- a/indra/newview/llhoverview.cpp +++ b/indra/newview/llhoverview.cpp @@ -545,7 +545,7 @@ void LLHoverView::updateText() } mText.push_back(line); - auto& objects = LLSelectMgr::getInstance()->getHoverObjects(); + auto objects = LLSelectMgr::getInstance()->getHoverObjects(); line.clear(); S32 prim_count = objects->getObjectCount(); From c1f39e167cb5a61b6a40a647cd24c7c9d7686635 Mon Sep 17 00:00:00 2001 From: Router Gray Date: Tue, 7 Jan 2020 20:00:50 -0600 Subject: [PATCH 130/281] Bang bang on the list baby --- indra/newview/llviewermenu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index a961992c7..b2ff7e1be 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -9403,7 +9403,7 @@ class ListIsNearby : public view_listener_t bool handleEvent(LLPointer event, const LLSD& userdata) { const auto&& id = LFIDBearer::getActiveSelectedID(); - gMenuHolder->findControl(userdata["control"].asString())->setValue(LFIDBearer::getActiveType() == LFIDBearer::OBJECT ? gObjectList.findObject(id) : is_nearby(id)); + gMenuHolder->findControl(userdata["control"].asString())->setValue(LFIDBearer::getActiveType() == LFIDBearer::OBJECT ? !!gObjectList.findObject(id) : is_nearby(id)); return true; } }; From 31003f13af0940661fe2463c8641f8e4d3bb29ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 8 Jan 2020 10:05:14 -0500 Subject: [PATCH 131/281] Fix Crash on text editor right click Fixes Crashes N and P Missing nullcheck, my bad Never expected there not to be a menu segment url when a menu is open --- indra/llui/lltexteditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 09c8a82c9..989e92ce7 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -375,7 +375,7 @@ LLTextEditor::~LLTextEditor() const std::string& LLTextEditor::getMenuSegmentUrl() const { auto segment = getSegmentAtLocalPos(mLastContextMenuX, mLastContextMenuY); - auto style = segment->getStyle(); + auto style = segment ? segment->getStyle() : nullptr; return style ? style->getLinkHREF() : LLStringUtil::null; } From 094c948a87530d78ab89690284f1ed4542978215 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 8 Jan 2020 13:12:13 -0500 Subject: [PATCH 132/281] Move Minimap Mark submenu back out of Selected Avatars menu for convenience --- indra/newview/skins/default/xui/en-us/menu_mini_map.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en-us/menu_mini_map.xml b/indra/newview/skins/default/xui/en-us/menu_mini_map.xml index 7b0322702..dfa3450df 100644 --- a/indra/newview/skins/default/xui/en-us/menu_mini_map.xml +++ b/indra/newview/skins/default/xui/en-us/menu_mini_map.xml @@ -87,7 +87,6 @@ - @@ -109,7 +108,7 @@ - + From a21927e510376edf14af34b01d4fffad9eabd8f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 8 Jan 2020 13:15:37 -0500 Subject: [PATCH 133/281] [Follow] If target av isn't rendered, still try to get their position Mainly moves code around, rather small change. --- indra/newview/llagent.cpp | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 20bfac5d9..bfb6e98d7 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1757,16 +1757,25 @@ void LLAgent::autoPilot(F32 *delta_yaw) bool follow = !mLeaderID.isNull(); //mAutoPilotBehaviorName == "Follow"; if (follow) { - LLViewerObject* object = gObjectList.findObject(mLeaderID); - if (!object) + if (auto object = gObjectList.findObject(mLeaderID)) { - mAutoPilotBehaviorName.clear(); // Nothing left to follow pilot - stopAutoPilot(); - return; + mAutoPilotTargetGlobal = object->getPositionGlobal(); + if (const auto& av = object->asAvatar()) // Fly if avatar target is flying + setFlying(av->mInAir); + } + else // We might still have a valid avatar pos + { + const LLVector3d& get_av_pos(const LLUUID & id); + auto pos = get_av_pos(mLeaderID); + if (pos.isExactlyZero()) // Default constructed or invalid from server + { + mAutoPilotBehaviorName.clear(); // Nothing left to follow pilot + stopAutoPilot(); + return; + } + mAutoPilotTargetGlobal = pos; + // Should we fly if the height difference is great enough here? Altitude is often invalid... } - mAutoPilotTargetGlobal = object->getPositionGlobal(); - if (const auto& av = object->asAvatar()) // Fly if avatar target is flying - setFlying(av->mInAir); } if (!isAgentAvatarValid()) return; From 65dad7acfdd0914ffb3c1f1868b2fabda68591b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 8 Jan 2020 14:53:08 -0500 Subject: [PATCH 134/281] Remove weird double newline between single avatar on minimap and distance --- indra/newview/llnetmap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 49dcfb4bb..a47757e0a 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -1005,7 +1005,7 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, std::string& tool_tip, LLRect* stick LLVector3d delta = targetPosition - myPosition; F32 distance = (F32)delta.magVec(); if (single_agent) - tool_tip.append( llformat("\n\n(Distance: %.02fm)\n",distance) ); + tool_tip.append( llformat("\n(Distance: %.02fm)\n",distance) ); else tool_tip.append(llformat(" (%.02fm)\n", distance)); } From 4055af4afdeac723a6299c4481f3d8bebe781a3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 8 Jan 2020 15:23:51 -0500 Subject: [PATCH 135/281] Add Mark menu to radar --- indra/newview/llnetmap.cpp | 5 ++--- .../skins/default/xui/en-us/menu_radar.xml | 21 +++++++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index a47757e0a..267967ebe 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -1498,9 +1498,8 @@ bool LLScaleMap::handleEvent(LLPointer event, const LLSD& userdata) //moymod - minimap color shit void markMassAgents(const LLColor4& color) { - auto self = LFIDBearer::getActive(); - for (const auto& id : self->getSelectedIDs()) - self->mm_setcolor(id, color); + for (const auto& id : LFIDBearer::getActiveSelectedIDs()) + LLNetMap::mm_setcolor(id, color); } bool mmsetred::handleEvent(LLPointer, const LLSD&) diff --git a/indra/newview/skins/default/xui/en-us/menu_radar.xml b/indra/newview/skins/default/xui/en-us/menu_radar.xml index 612b8a7d4..c104d05e3 100644 --- a/indra/newview/skins/default/xui/en-us/menu_radar.xml +++ b/indra/newview/skins/default/xui/en-us/menu_radar.xml @@ -114,6 +114,27 @@ + + + + + + + + + + + + + + + + + + + + + From 5ee5ba473bf5ae7793f7cda8fcd7ab561d8b672f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 8 Jan 2020 15:39:40 -0500 Subject: [PATCH 136/281] Small refactor of minimap marking code Mark is now encapsulated mm_setcolor is no longer part of LLNetMap mm_clearMark is now used to erase mark from container Introduces mm_getMarkerColor that returns a pointer, instead of needing a ref every time. Also mark isAgentUnderCursor const --- indra/newview/llnetmap.cpp | 26 ++++++++++++++++++-------- indra/newview/llnetmap.h | 5 +---- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 267967ebe..2e7143ad5 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -296,15 +296,25 @@ std::size_t hash_value(const LLUUID& uuid) return (std::size_t)uuid.getCRC32(); } boost::unordered_map mm_MarkerColors; -bool mm_getMarkerColor(const LLUUID& id, LLColor4& color) +const LLColor4* mm_getMarkerColor(const LLUUID& id) { - boost::unordered_map::const_iterator it = mm_MarkerColors.find(id); - if (it == mm_MarkerColors.end()) return false; - color = it->second; - return true; + auto it = mm_MarkerColors.find(id); + return it == mm_MarkerColors.end() ? nullptr : &it->second; } -void LLNetMap::mm_setcolor(LLUUID key,LLColor4 col) +bool mm_getMarkerColor(const LLUUID& id, LLColor4& color) +{ + auto c = mm_getMarkerColor(id); + if (c) color = *c; + return c; +} + +void mm_clearMark(const LLUUID& id) +{ + mm_MarkerColors.erase(id); +} + +void mm_setcolor(LLUUID key,LLColor4 col) { mm_MarkerColors[key] = col; } @@ -1499,7 +1509,7 @@ bool LLScaleMap::handleEvent(LLPointer event, const LLSD& userdata) void markMassAgents(const LLColor4& color) { for (const auto& id : LFIDBearer::getActiveSelectedIDs()) - LLNetMap::mm_setcolor(id, color); + mm_setcolor(id, color); } bool mmsetred::handleEvent(LLPointer, const LLSD&) @@ -1530,7 +1540,7 @@ bool mmsetcustom::handleEvent(LLPointer, const LLSD&) bool mmsetunmark::handleEvent(LLPointer, const LLSD&) { for (const auto& id : LFIDBearer::getActiveSelectedIDs()) - mm_MarkerColors.erase(id); + mm_clearMark(id); return true; } bool mmenableunmark::handleEvent(LLPointer, const LLSD& userdata) diff --git a/indra/newview/llnetmap.h b/indra/newview/llnetmap.h index 47c32438b..75200dfb9 100644 --- a/indra/newview/llnetmap.h +++ b/indra/newview/llnetmap.h @@ -72,9 +72,6 @@ public: uuid_vec_t getSelectedIDs() const override final { return mClosestAgentsAtLastClick; } S32 getNumSelected() const override final { return mClosestAgentsAtLastClick.size(); } - static void mm_setcolor(LLUUID key,LLColor4 col); //moymod - - // [SL:KB] - Patch: World-MinimapOverlay | Checked: 2012-06-20 (Catznip-3.3.0) void refreshParcelOverlay() { mUpdateParcelImage = true; } // [/SL:KB] @@ -157,7 +154,7 @@ private: LLUUID mClosestAgentToCursor; LLUUID mClosestAgentAtLastRightClick; - BOOL isAgentUnderCursor() { return mClosestAgentToCursor.notNull(); } + BOOL isAgentUnderCursor() const { return mClosestAgentToCursor.notNull(); } LLMenuGL* mPopupMenu; }; From 83b384ab97f405ca769f2ace856c0be68b6a1164 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 8 Jan 2020 15:54:43 -0500 Subject: [PATCH 137/281] Combine Marking from Minimap with Radar Mark Color people right from the Radar! Mark button on Radar now uses Red. Removes "Radar.Mark" and its associated code Thanks for the help on linux, Router! --- indra/newview/llfloateravatarlist.cpp | 25 ++++++++----------- indra/newview/llfloateravatarlist.h | 2 +- indra/newview/llnetmap.cpp | 10 ++++++++ .../skins/default/xui/en-us/menu_radar.xml | 4 --- .../skins/default/xui/es/menu_radar.xml | 1 - 5 files changed, 22 insertions(+), 20 deletions(-) diff --git a/indra/newview/llfloateravatarlist.cpp b/indra/newview/llfloateravatarlist.cpp index 5d1991e04..2c708204d 100644 --- a/indra/newview/llfloateravatarlist.cpp +++ b/indra/newview/llfloateravatarlist.cpp @@ -134,8 +134,9 @@ namespace } } //namespace +const LLColor4* mm_getMarkerColor(const LLUUID& id); LLAvatarListEntry::LLAvatarListEntry(const LLUUID& id, const std::string& name, const LLVector3d& position) : - mID(id), mName(name), mPosition(position), mMarked(false), mFocused(false), + mID(id), mName(name), mPosition(position), mMarked(mm_getMarkerColor(id)), mFocused(false), mStats(), mActivityType(ACTIVITY_NEW), mActivityTimer(), mIsInList(false), mAge(-1), mTime(time(NULL)) @@ -348,7 +349,14 @@ void track_av(const LLUUID& id) } static void cmd_profile(const LLAvatarListEntry* entry); -static void cmd_toggle_mark(LLAvatarListEntry* entry); +static void cmd_toggle_mark(LLAvatarListEntry* entry) +{ + bool mark = !entry->isMarked(); + void mm_setcolor(LLUUID key, LLColor4 col); + void mm_clearMark(const LLUUID & id); + mark ? mm_setcolor(entry->getID(), LLColor4::red) : mm_clearMark(entry->getID()); + entry->setMarked(mark); +} static void cmd_ar(const LLAvatarListEntry* entry); static void cmd_teleport(const LLAvatarListEntry* entry); @@ -364,15 +372,6 @@ namespace } }; - class RadarMark : public view_listener_t - { - bool handleEvent(LLPointer event, const LLSD& userdata) - { - LLFloaterAvatarList::instance().doCommand(cmd_toggle_mark); - return true; - } - }; - class RadarFocus : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) @@ -415,7 +414,6 @@ void addMenu(view_listener_t* menu, const std::string& name); void add_radar_listeners() { addMenu(new RadarTrack, "Radar.Track"); - addMenu(new RadarMark, "Radar.Mark"); addMenu(new RadarFocus, "Radar.Focus"); addMenu(new RadarFocusPrev, "Radar.FocusPrev"); addMenu(new RadarFocusNext, "Radar.FocusNext"); @@ -779,7 +777,7 @@ void LLFloaterAvatarList::refreshAvatarList() if (entry->isMarked()) { mark.value = "X"; - mark.color = LLColor4::blue; + mark.color = *mm_getMarkerColor(av_id); mark.font_style = "BOLD"; } element.columns.add(mark); @@ -1449,7 +1447,6 @@ void send_estate_message(const std::string request, const std::vectorgetName()); } -static void cmd_toggle_mark(LLAvatarListEntry* entry) { entry->toggleMark(); } static void cmd_ar(const LLAvatarListEntry* entry) { LLFloaterReporter::showFromObject(entry->getID()); } static void cmd_profile(const LLAvatarListEntry* entry) { LLAvatarActions::showProfile(entry->getID()); } static void cmd_teleport(const LLAvatarListEntry* entry) { gAgent.teleportViaLocation(entry->getPosition()); } diff --git a/indra/newview/llfloateravatarlist.h b/indra/newview/llfloateravatarlist.h index 480e52f52..5c8321987 100644 --- a/indra/newview/llfloateravatarlist.h +++ b/indra/newview/llfloateravatarlist.h @@ -124,7 +124,7 @@ enum ACTIVITY_TYPE bool isInList() const { return mIsInList; } - void toggleMark() { mMarked = !mMarked; } + void setMarked(bool marked) { mMarked = marked; } struct uuidMatch { diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 2e7143ad5..466554111 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -1508,8 +1508,13 @@ bool LLScaleMap::handleEvent(LLPointer event, const LLSD& userdata) //moymod - minimap color shit void markMassAgents(const LLColor4& color) { + auto radar = LLFloaterAvatarList::getInstance(); for (const auto& id : LFIDBearer::getActiveSelectedIDs()) + { mm_setcolor(id, color); + if (auto entry = radar ? radar->getAvatarEntry(id) : nullptr) + entry->setMarked(true); + } } bool mmsetred::handleEvent(LLPointer, const LLSD&) @@ -1539,8 +1544,13 @@ bool mmsetcustom::handleEvent(LLPointer, const LLSD&) } bool mmsetunmark::handleEvent(LLPointer, const LLSD&) { + auto radar = LLFloaterAvatarList::getInstance(); for (const auto& id : LFIDBearer::getActiveSelectedIDs()) + { mm_clearMark(id); + if (auto entry = radar ? radar->getAvatarEntry(id) : nullptr) + entry->setMarked(false); + } return true; } bool mmenableunmark::handleEvent(LLPointer, const LLSD& userdata) diff --git a/indra/newview/skins/default/xui/en-us/menu_radar.xml b/indra/newview/skins/default/xui/en-us/menu_radar.xml index c104d05e3..5a84524a4 100644 --- a/indra/newview/skins/default/xui/en-us/menu_radar.xml +++ b/indra/newview/skins/default/xui/en-us/menu_radar.xml @@ -210,10 +210,6 @@ - - - - diff --git a/indra/newview/skins/default/xui/es/menu_radar.xml b/indra/newview/skins/default/xui/es/menu_radar.xml index b3c6d1c28..d771ce2ad 100644 --- a/indra/newview/skins/default/xui/es/menu_radar.xml +++ b/indra/newview/skins/default/xui/es/menu_radar.xml @@ -24,7 +24,6 @@ - From 117ef68916bc20e21f7d90dd34e7b4485078a60d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 8 Jan 2020 16:07:23 -0500 Subject: [PATCH 138/281] Put object pie Follow where it was actually supposed to go Thanks for the heads up on this mistake, Router! --- indra/newview/skins/default/xui/en-us/menu_pie_object.xml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/indra/newview/skins/default/xui/en-us/menu_pie_object.xml b/indra/newview/skins/default/xui/en-us/menu_pie_object.xml index 57bc78992..1ce3fc6fe 100644 --- a/indra/newview/skins/default/xui/en-us/menu_pie_object.xml +++ b/indra/newview/skins/default/xui/en-us/menu_pie_object.xml @@ -75,13 +75,12 @@ - + + + - - - From d06448cdfd0f39fa8af9ab430422039e8e11b9a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 8 Jan 2020 16:53:23 -0500 Subject: [PATCH 139/281] Remove dead german menu entry --- indra/newview/skins/default/xui/de/menu_radar.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/newview/skins/default/xui/de/menu_radar.xml b/indra/newview/skins/default/xui/de/menu_radar.xml index 9f3510a2d..836611bb9 100644 --- a/indra/newview/skins/default/xui/de/menu_radar.xml +++ b/indra/newview/skins/default/xui/de/menu_radar.xml @@ -25,7 +25,6 @@ - From c1ffb1b332d31cc5bf642e8c5c11bcdfdf3188f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 8 Jan 2020 16:54:30 -0500 Subject: [PATCH 140/281] [Follow] Do not fly unless flying avatar target or already flying --- indra/newview/llagent.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index bfb6e98d7..0f8b7ff7a 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1613,12 +1613,14 @@ void LLAgent::startAutoPilotGlobal( mAutoPilotFlyOnStop = FALSE; } - if (distance > 30.0 && mAutoPilotAllowFlying) + bool follow = mAutoPilotBehaviorName == "Follow"; + + if (!follow && distance > 30.0 && mAutoPilotAllowFlying) { setFlying(TRUE); } - if ( distance > 1.f && + if (!follow && distance > 1.f && mAutoPilotAllowFlying && heightDelta > (sqrtf(mAutoPilotStopDistance) + 1.f)) { From a34414849c848ee08b991aedac021418e9510e35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 8 Jan 2020 17:07:49 -0500 Subject: [PATCH 141/281] Sync some of llcommandlineparser with alchemy Might fix Crash R --- indra/newview/llcommandlineparser.cpp | 72 ++++++++++++++++++++++----- 1 file changed, 60 insertions(+), 12 deletions(-) diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp index 02d2e22de..17a869e87 100644 --- a/indra/newview/llcommandlineparser.cpp +++ b/indra/newview/llcommandlineparser.cpp @@ -293,19 +293,19 @@ bool LLCommandLineParser::parseAndStoreResults(po::command_line_parser& clp) po::basic_parsed_options opts = clp.run(); po::store(opts, gVariableMap); } - catch(po::error& e) + catch (const po::error& e) { LL_WARNS() << "Caught Error:" << e.what() << LL_ENDL; mErrorMsg = e.what(); return false; } - catch(LLCLPError& e) + catch (const LLCLPError& e) { LL_WARNS() << "Caught Error:" << e.what() << LL_ENDL; mErrorMsg = e.what(); return false; } - catch(LLCLPLastOption&) + catch (const LLCLPLastOption&) { // This exception means a token was read after an option // that must be the last option was reached (see url and slurl options) @@ -354,18 +354,58 @@ bool LLCommandLineParser::parseCommandLine(int argc, char **argv) return parseAndStoreResults(clp); } +// TODO: +// - Break out this funky parsing logic into separate method +// - Unit-test it with tests like LLStringUtil::getTokens() (the command-line +// overload that supports quoted tokens) +// - Unless this logic offers significant semantic benefits, replace it with +// LLStringUtil::getTokens(). This would fix a known bug: you cannot --set a +// string-valued variable to the empty string, because empty strings are +// eliminated below. + bool LLCommandLineParser::parseCommandLineString(const std::string& str) { + std::string cmd_line_string(""); + if (!str.empty()) + { + bool add_last_c = true; + S32 last_c_pos = str.size() - 1; //don't get out of bounds on pos+1, last char will be processed separately + for (S32 pos = 0; pos < last_c_pos; ++pos) + { + cmd_line_string.append(&str[pos], 1); + if (str[pos] == '\\') + { + cmd_line_string.append("\\", 1); + if (str[pos + 1] == '\\') + { + ++pos; + add_last_c = (pos != last_c_pos); + } + } + } + if (add_last_c) + { + cmd_line_string.append(&str[last_c_pos], 1); + if (str[last_c_pos] == '\\') + { + cmd_line_string.append("\\", 1); + } + } + } + // Split the string content into tokens - boost::escaped_list_separator sep("\\", "\r\n ", "\"'"); - boost::tokenizer< boost::escaped_list_separator > tok(str, sep); + const char* escape_chars = "\\"; + const char* separator_chars = "\r\n "; + const char* quote_chars = "\"'"; + boost::escaped_list_separator sep(escape_chars, separator_chars, quote_chars); + boost::tokenizer< boost::escaped_list_separator > tok(cmd_line_string, sep); std::vector tokens; // std::copy(tok.begin(), tok.end(), std::back_inserter(tokens)); for(boost::tokenizer< boost::escaped_list_separator >::iterator i = tok.begin(); i != tok.end(); ++i) { - if(0 != i->size()) + if(!i->empty()) { tokens.push_back(*i); } @@ -386,20 +426,28 @@ bool LLCommandLineParser::parseCommandLineFile(const std::basic_istream < char > void LLCommandLineParser::notify() { - po::notify(gVariableMap); + try + { + po::notify(gVariableMap); + } + catch (const LLCLPError& e) + { + LL_WARNS() << "Caught Error: " << e.what() << LL_ENDL; + mErrorMsg = e.what(); + } } void LLCommandLineParser::printOptions() const { - for(po::variables_map::iterator i = gVariableMap.begin(); i != gVariableMap.end(); ++i) + for (auto& i : gVariableMap) { - std::string name = i->first; - token_vector_t values = i->second.as(); + std::string name = i.first; + token_vector_t values = i.second.as(); std::ostringstream oss; oss << name << ": "; - for(token_vector_t::iterator t_itr = values.begin(); t_itr != values.end(); ++t_itr) + for (auto& value : values) { - oss << t_itr->c_str() << " "; + oss << value.c_str() << " "; } LL_INFOS() << oss.str() << LL_ENDL; } From c954d021252dbf28b8fe1559626534b7bf8f1f1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 8 Jan 2020 18:00:51 -0500 Subject: [PATCH 142/281] Add missing Go To to object pie menu --- indra/newview/skins/default/xui/en-us/menu_pie_object.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en-us/menu_pie_object.xml b/indra/newview/skins/default/xui/en-us/menu_pie_object.xml index 1ce3fc6fe..776b8d01d 100644 --- a/indra/newview/skins/default/xui/en-us/menu_pie_object.xml +++ b/indra/newview/skins/default/xui/en-us/menu_pie_object.xml @@ -74,7 +74,9 @@ - + + + From 6ebd2eef00ff7c02d0c1b8013825fedc478e3219 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 8 Jan 2020 19:11:46 -0500 Subject: [PATCH 143/281] Feature Request: Add Chat History to Group right click menus --- indra/newview/llpanelavatar.cpp | 19 ++++++++++++++----- indra/newview/llviewermenu.cpp | 4 ++-- .../default/xui/en-us/menu_groups_list.xml | 5 +++++ .../default/xui/en-us/menu_url_group.xml | 4 ++++ 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index f12a7d348..743da8671 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -337,12 +337,21 @@ void LLPanelAvatarFirstLife::enableControls(BOOL self) void show_picture(const LLUUID& id, const std::string& name); static std::string profile_picture_title(const std::string& str) { return "Profile Picture: " + str; } static void show_partner_help() { LLNotificationsUtil::add("ClickPartnerHelpAvatar", LLSD(), LLSD(), boost::bind(LLPanelAvatarSecondLife::onClickPartnerHelpLoadURL, _1, _2)); } -void show_log_browser(const LLUUID& id) +void show_log_browser(const LLUUID& id, const LFIDBearer::Type& type) { void show_log_browser(const std::string& name, const std::string& id); - LLAvatarName av_name; - LLAvatarNameCache::get(id, &av_name); - show_log_browser(av_name.getLegacyName(), id.asString()); + std::string name; + if (type == LFIDBearer::AVATAR) + { + LLAvatarName av_name; + LLAvatarNameCache::get(id, &av_name); + name = av_name.getLegacyName(); + } + else // GROUP + { + gCacheName->getGroupName(id, name); + } + show_log_browser(name, id.asString()); } BOOL LLPanelAvatarSecondLife::postBuild() { @@ -368,7 +377,7 @@ BOOL LLPanelAvatarSecondLife::postBuild() getChild("GroupInvite_Button")->setCommitCallback(boost::bind(static_cast(LLAvatarActions::inviteToGroup), boost::bind(&LLPanelAvatar::getAvatarID, pa))); getChild("Add Friend...")->setCommitCallback(boost::bind(LLAvatarActions::requestFriendshipDialog, boost::bind(&LLPanelAvatar::getAvatarID, pa))); - getChild("Log")->setCommitCallback(boost::bind(show_log_browser, boost::bind(&LLPanelAvatar::getAvatarID, pa))); + getChild("Log")->setCommitCallback(boost::bind(show_log_browser, boost::bind(&LLPanelAvatar::getAvatarID, pa), LFIDBearer::AVATAR)); getChild("Pay...")->setCommitCallback(boost::bind(LLAvatarActions::pay, boost::bind(&LLPanelAvatar::getAvatarID, pa))); if (LLUICtrl* ctrl = findChild("Mute")) { diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index b2ff7e1be..86aed2d0a 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -9287,13 +9287,13 @@ bool can_show_web_profile() return !gSavedSettings.getString("WebProfileURL").empty(); } -void show_log_browser(const LLUUID& id); +void show_log_browser(const LLUUID& id, const LFIDBearer::Type& type); class ListShowLog : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { for (const LLUUID& id : LFIDBearer::getActiveSelectedIDs()) - show_log_browser(id); + show_log_browser(id, LFIDBearer::getActiveType()); return true; } }; diff --git a/indra/newview/skins/default/xui/en-us/menu_groups_list.xml b/indra/newview/skins/default/xui/en-us/menu_groups_list.xml index 0a8713753..67c84ed54 100644 --- a/indra/newview/skins/default/xui/en-us/menu_groups_list.xml +++ b/indra/newview/skins/default/xui/en-us/menu_groups_list.xml @@ -19,6 +19,11 @@ + + + + + diff --git a/indra/newview/skins/default/xui/en-us/menu_url_group.xml b/indra/newview/skins/default/xui/en-us/menu_url_group.xml index 55c9e580c..7200b6e03 100644 --- a/indra/newview/skins/default/xui/en-us/menu_url_group.xml +++ b/indra/newview/skins/default/xui/en-us/menu_url_group.xml @@ -23,6 +23,10 @@ + + + + From 640c136bcc1b6e97f181d37bc5517e4690461014 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 8 Jan 2020 19:13:36 -0500 Subject: [PATCH 144/281] Add Cam To to Object URL menu --- indra/newview/llviewermenu.cpp | 10 ++++++++++ .../skins/default/xui/en-us/menu_url_objectim.xml | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 86aed2d0a..f378d932a 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -9583,6 +9583,15 @@ class ListActivate : public view_listener_t } }; +class ListObjectCamTo : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + gAgentCamera.lookAtObject(LFIDBearer::getActiveSelectedID(), false); + return true; + } +}; + class MediaCtrlCopyURL : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) @@ -9975,6 +9984,7 @@ void initialize_menus() addMenu(new ListLeave, "List.Leave"); addMenu(new ListJoin, "List.Join"); addMenu(new ListActivate, "List.Activate"); + addMenu(new ListObjectCamTo, "List.Object.CamTo"); add_radar_listeners(); diff --git a/indra/newview/skins/default/xui/en-us/menu_url_objectim.xml b/indra/newview/skins/default/xui/en-us/menu_url_objectim.xml index 63b941a5b..79262f6ec 100644 --- a/indra/newview/skins/default/xui/en-us/menu_url_objectim.xml +++ b/indra/newview/skins/default/xui/en-us/menu_url_objectim.xml @@ -40,6 +40,10 @@ + + + + From bf5035388b33b1400b18ae5f9f0ea707ba034f4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 8 Jan 2020 19:22:36 -0500 Subject: [PATCH 145/281] Expose ObjectData from AreaSearch --- indra/newview/jcfloaterareasearch.h | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/indra/newview/jcfloaterareasearch.h b/indra/newview/jcfloaterareasearch.h index 32c40c253..033dc22ad 100644 --- a/indra/newview/jcfloaterareasearch.h +++ b/indra/newview/jcfloaterareasearch.h @@ -56,6 +56,20 @@ public: void results(); static void processObjectPropertiesFamily(LLMessageSystem* msg, void** user_data); + struct ObjectData + { + LLUUID id; + std::string name; + std::string desc; + LLUUID owner_id; + LLUUID group_id; + }; + + const ObjectData* getObjectData(const LLUUID& id) const + { + const auto& it = mCachedObjects.find(id); + return it != mCachedObjects.end() ? &it->second : nullptr; + } private: @@ -84,14 +98,6 @@ private: LLViewerRegion* mLastRegion; bool mStopped; - struct ObjectData - { - LLUUID id; - std::string name; - std::string desc; - LLUUID owner_id; - LLUUID group_id; - }; uuid_set_t mPendingObjects; boost::unordered_map mCachedObjects; From 0b6d94f202fa2e041423522b14d490859a24abda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 8 Jan 2020 19:43:27 -0500 Subject: [PATCH 146/281] Request: Change "Log" button on IM Floater to "History" This is more clear and consistent with all the other places this is used --- .../skins/default/xui/en-us/floater_instant_message.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en-us/floater_instant_message.xml b/indra/newview/skins/default/xui/en-us/floater_instant_message.xml index 356a41861..09f908d6c 100644 --- a/indra/newview/skins/default/xui/en-us/floater_instant_message.xml +++ b/indra/newview/skins/default/xui/en-us/floater_instant_message.xml @@ -30,8 +30,8 @@ From bee60da0899015d763b48419467a333e00b937a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 8 Jan 2020 20:43:47 -0500 Subject: [PATCH 151/281] Break out get_obj_data into its own function --- indra/newview/llviewermenu.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 2d406a237..5fb6ae779 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -9042,6 +9042,12 @@ template T* get_focused() return t; } +const JCFloaterAreaSearch::ObjectData* get_obj_data(const LLUUID& id) +{ + auto areasearch = JCFloaterAreaSearch::findInstance(); + return areasearch ? areasearch->getObjectData(id) : nullptr; +} + const std::string get_slurl_for(const LLUUID& id, const LFIDBearer::Type& type) { switch (type) @@ -9050,10 +9056,7 @@ const std::string get_slurl_for(const LLUUID& id, const LFIDBearer::Type& type) case LFIDBearer::AVATAR: return LLAvatarActions::getSLURL(id); case LFIDBearer::OBJECT: { - auto areasearch = JCFloaterAreaSearch::findInstance(); - if (!areasearch) return LLStringUtil::null; - - const auto& obj_data = areasearch->getObjectData(id); + const auto& obj_data = get_obj_data(id); if (!obj_data) return LLStringUtil::null; LLSD sdQuery; From 544feee19f3b17f13fc735bc838fbaa35c2d8bac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 8 Jan 2020 20:48:48 -0500 Subject: [PATCH 152/281] Fix Copy Names in Object Menu not working, oops!! --- indra/newview/llviewermenu.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 5fb6ae779..ccd0d0e4a 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -9223,10 +9223,19 @@ class ListCopyNames : public view_listener_t return ret; } + static std::string getObjectName(const LLUUID& id) + { + const auto& obj_data = get_obj_data(id); + return obj_data ? obj_data->name : LLStringUtil::null; + } + bool handleEvent(LLPointer event, const LLSD& userdata) { LLWString str; - copy_from_ids(LFIDBearer::getActiveSelectedIDs(), LFIDBearer::getActiveType() == LFIDBearer::GROUP ? getGroupName : getAvatarName); + const auto& type = LFIDBearer::getActiveType(); + copy_from_ids(LFIDBearer::getActiveSelectedIDs(), type == LFIDBearer::GROUP ? getGroupName : + type == LFIDBearer::OBJECT ? getObjectName : + getAvatarName); if (!str.empty()) LLView::getWindow()->copyTextToClipboard(str); return true; } From 8b4a29cbd3b367375b2964fd2e54001e427eedc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 8 Jan 2020 22:31:18 -0500 Subject: [PATCH 153/281] Break simulator autopilot out into its own function --- indra/newview/llviewermenu.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index ccd0d0e4a..5d9640b73 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2845,9 +2845,8 @@ class LLObjectPFLinksetsSelected : public view_listener_t // -void handle_go_to(const LLVector3d& pos) +void simulator_autopilot(const LLVector3d& pos) { - // try simulator autopilot std::vector strings; std::string val; val = llformat("%.9g", pos.mdV[VX]); @@ -2857,6 +2856,12 @@ void handle_go_to(const LLVector3d& pos) val = llformat("%.9g", pos.mdV[VZ]); strings.push_back(val); send_generic_message("autopilot", strings); +} + +void handle_go_to(const LLVector3d& pos) +{ + // try simulator autopilot + simulator_autopilot(pos); LLViewerParcelMgr::getInstance()->deselectLand(); From 327574db7cdc71fe7384d98116a04d5b2864bd7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 8 Jan 2020 22:32:17 -0500 Subject: [PATCH 154/281] Cancel autopilot when user initiates a goto --- indra/newview/llviewermenu.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 5d9640b73..19831124c 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2860,6 +2860,8 @@ void simulator_autopilot(const LLVector3d& pos) void handle_go_to(const LLVector3d& pos) { + gAgent.stopAutoPilot(true); // Go To cancels viewer autopilot + // try simulator autopilot simulator_autopilot(pos); From a5115aa69e0ebc38146ca493347a9990656627ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Thu, 9 Jan 2020 12:41:43 -0500 Subject: [PATCH 155/281] Fix Crash T, someone broke their install, but we should gracefully exit --- indra/newview/llappviewer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 76ae9bc2d..a143a4ce3 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2287,7 +2287,9 @@ bool LLAppViewer::initConfiguration() LL_INFOS() << "Loading settings file list" << settings_file_list << LL_ENDL; if (0 == settings_control.loadFromFile(settings_file_list)) { - LL_ERRS() << "Cannot load default configuration file " << settings_file_list << LL_ENDL; + OSMessageBox("Cannot load default configuration file " + settings_file_list + " The installation may be corrupted.", + LLStringUtil::null,OSMB_OK); + return false; } mSettingsLocationList = settings_control.getLLSD("Locations"); From eccbd98d79adc1da93abcb63afe514eb6dd5e81c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Thu, 9 Jan 2020 21:18:31 -0500 Subject: [PATCH 156/281] Change some enables to visibles --- indra/newview/skins/default/xui/en-us/menu_objects_list.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en-us/menu_objects_list.xml b/indra/newview/skins/default/xui/en-us/menu_objects_list.xml index 3c556c5f1..5e05e282b 100644 --- a/indra/newview/skins/default/xui/en-us/menu_objects_list.xml +++ b/indra/newview/skins/default/xui/en-us/menu_objects_list.xml @@ -19,11 +19,11 @@ - + - + From 14dc3481797917159b4003bb5fce562e74a301f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Thu, 9 Jan 2020 22:11:39 -0500 Subject: [PATCH 157/281] Add Sit On to Object UI Menus Breaks handle_object_sit out of handle_object_sit_or_stand, parameterizes offset so that one doesn't need to select a side still respects RLV, yay~ --- indra/newview/llviewermenu.cpp | 49 ++++++++++++------- .../default/xui/en-us/menu_objects_list.xml | 4 ++ .../default/xui/en-us/menu_url_objectim.xml | 4 ++ 3 files changed, 40 insertions(+), 17 deletions(-) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 19831124c..ef3031642 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3874,28 +3874,14 @@ bool is_object_sittable() } -// only works on pie menu -void handle_object_sit_or_stand() +void handle_object_sit(LLViewerObject* object, const LLVector3& offset = LLVector3::zero) { - LLPickInfo pick = LLToolPie::getInstance()->getPick(); - LLViewerObject *object = pick.getObject();; - if (!object || pick.mPickType == LLPickInfo::PICK_FLORA) - { - return; - } - - if (sitting_on_selection()) - { - gAgent.standUp(); - return; - } - // get object selection offset // if (object && object->getPCode() == LL_PCODE_VOLUME) // [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c) | Modified: RLVa-1.2.0c if ( (object && object->getPCode() == LL_PCODE_VOLUME) && - ((!rlv_handler_t::isEnabled()) || (gRlvHandler.canSit(object, pick.mObjectOffset))) ) + ((!rlv_handler_t::isEnabled()) || (gRlvHandler.canSit(object, offset))) ) // [/RLVa:KB] { // [RLVa:KB] - Checked: 2010-08-29 (RLVa-1.2.1c) | Added: RLVa-1.2.1c @@ -3916,12 +3902,31 @@ void handle_object_sit_or_stand() gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); gMessageSystem->nextBlockFast(_PREHASH_TargetObject); gMessageSystem->addUUIDFast(_PREHASH_TargetID, object->mID); - gMessageSystem->addVector3Fast(_PREHASH_Offset, pick.mObjectOffset); + gMessageSystem->addVector3Fast(_PREHASH_Offset, offset); object->getRegion()->sendReliableMessage(); } } +// only works on pie menu +void handle_object_sit_or_stand() +{ + LLPickInfo pick = LLToolPie::getInstance()->getPick(); + LLViewerObject *object = pick.getObject();; + if (!object || pick.mPickType == LLPickInfo::PICK_FLORA) + { + return; + } + + if (sitting_on_selection()) + { + gAgent.standUp(); + return; + } + + handle_object_sit(object, pick.mObjectOffset); +} + class LLObjectSitOrStand : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) @@ -9639,6 +9644,15 @@ class ListObjectCamTo : public view_listener_t } }; +class ListObjectSit : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + handle_object_sit(gObjectList.findObject(LFIDBearer::getActiveSelectedID())); + return true; + } +}; + class MediaCtrlCopyURL : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) @@ -10032,6 +10046,7 @@ void initialize_menus() addMenu(new ListJoin, "List.Join"); addMenu(new ListActivate, "List.Activate"); addMenu(new ListObjectCamTo, "List.Object.CamTo"); + addMenu(new ListObjectSit, "List.Object.Sit"); add_radar_listeners(); diff --git a/indra/newview/skins/default/xui/en-us/menu_objects_list.xml b/indra/newview/skins/default/xui/en-us/menu_objects_list.xml index 5e05e282b..4f7d0a47b 100644 --- a/indra/newview/skins/default/xui/en-us/menu_objects_list.xml +++ b/indra/newview/skins/default/xui/en-us/menu_objects_list.xml @@ -16,6 +16,10 @@ + + + + diff --git a/indra/newview/skins/default/xui/en-us/menu_url_objectim.xml b/indra/newview/skins/default/xui/en-us/menu_url_objectim.xml index 79262f6ec..b8104a604 100644 --- a/indra/newview/skins/default/xui/en-us/menu_url_objectim.xml +++ b/indra/newview/skins/default/xui/en-us/menu_url_objectim.xml @@ -56,6 +56,10 @@ + + + + Date: Thu, 9 Jan 2020 22:53:16 -0500 Subject: [PATCH 158/281] Teleport notifications now use avatar slurls --- indra/newview/llviewermessage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 03e8b915e..648d46990 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3299,7 +3299,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLSD args; // *TODO: Translate -> [FIRST] [LAST] (maybe) - args["NAME"] = name; + args["NAME"] = LLAvatarActions::getSLURL(from_id); args["MESSAGE"] = message; args["MATURITY_STR"] = region_access_str; args["MATURITY_ICON"] = region_access_icn; @@ -7984,7 +7984,7 @@ void send_lures(const LLSD& notification, const LLSD& response) target_name = RlvStrings::getAnonym(target_name); else // [/RLVa:KB] - LLAvatarNameCache::getNSName(target_id, target_name); + target_name = LLAvatarActions::getSLURL(target_id); args["TO_NAME"] = target_name; LLSD payload; From 8e572888195c3da6ed597b555ec90ba2a35ad36c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Fri, 10 Jan 2020 01:01:38 -0500 Subject: [PATCH 159/281] Stand Up by user should cancel autopilot --- indra/newview/llviewermenu.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index ef3031642..fad3f8229 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3920,6 +3920,7 @@ void handle_object_sit_or_stand() if (sitting_on_selection()) { + LLAgent::stopAutoPilot(true); gAgent.standUp(); return; } From e15839a2cba21f7c650cb978d2b28deb1e147773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Fri, 10 Jan 2020 02:42:48 -0500 Subject: [PATCH 160/281] Move autoPilot Agent Avatar Valid check to beginning --- indra/newview/llagent.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 0f8b7ff7a..31815f908 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1754,7 +1754,7 @@ void LLAgent::stopAutoPilot(BOOL user_cancel) //----------------------------------------------------------------------------- void LLAgent::autoPilot(F32 *delta_yaw) { - if (mAutoPilot) + if (mAutoPilot && isAgentAvatarValid()) { bool follow = !mLeaderID.isNull(); //mAutoPilotBehaviorName == "Follow"; if (follow) @@ -1779,8 +1779,6 @@ void LLAgent::autoPilot(F32 *delta_yaw) // Should we fly if the height difference is great enough here? Altitude is often invalid... } } - - if (!isAgentAvatarValid()) return; if (!follow && gAgentAvatarp->mInAir && mAutoPilotAllowFlying) { From c3f03b6bbf97aa679005e5c070cc4988f3e1e261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Fri, 10 Jan 2020 03:11:19 -0500 Subject: [PATCH 161/281] [Follow] Specify that Follow has been cancelled, with Cancelled notice --- indra/newview/llagent.cpp | 2 ++ indra/newview/skins/default/xui/en-us/notifications.xml | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 31815f908..1a384b8f2 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1741,6 +1741,8 @@ void LLAgent::stopAutoPilot(BOOL user_cancel) LLNotificationsUtil::add("CancelledSit"); else if (mAutoPilotBehaviorName == "Attach") LLNotificationsUtil::add("CancelledAttach"); + else if (mAutoPilotBehaviorName == "Follow") + LLNotificationsUtil::add("CancelledFollow"); else LLNotificationsUtil::add("Cancelled"); } diff --git a/indra/newview/skins/default/xui/en-us/notifications.xml b/indra/newview/skins/default/xui/en-us/notifications.xml index 99dab549c..dae28cc5f 100644 --- a/indra/newview/skins/default/xui/en-us/notifications.xml +++ b/indra/newview/skins/default/xui/en-us/notifications.xml @@ -6529,6 +6529,13 @@ Cancelled Sit Cancelled Attach + +Cancelled Follow + + Date: Fri, 10 Jan 2020 03:34:57 -0500 Subject: [PATCH 162/281] Woops, fix this --- indra/newview/llviewermenu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index fad3f8229..bd00e4d9e 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3920,7 +3920,7 @@ void handle_object_sit_or_stand() if (sitting_on_selection()) { - LLAgent::stopAutoPilot(true); + gAgent.stopAutoPilot(true); gAgent.standUp(); return; } From 0efddbd9ffe1e200b2af3612c8d462136e46dbb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Fri, 10 Jan 2020 03:55:04 -0500 Subject: [PATCH 163/281] Add Pay to Object UI Menus --- indra/newview/lltoolpie.cpp | 2 +- indra/newview/llviewermenu.cpp | 36 ++++++++++++++----- indra/newview/llviewermenu.h | 4 +-- .../default/xui/en-us/menu_objects_list.xml | 4 +++ .../default/xui/en-us/menu_url_objectim.xml | 4 +++ 5 files changed, 38 insertions(+), 12 deletions(-) diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 9f958a9d6..0f24ca943 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -569,7 +569,7 @@ void LLToolPie::selectionPropertiesReceived() case CLICK_ACTION_PAY: if ( LLToolPie::getInstance()->mClickActionPayEnabled ) { - handle_give_money_dialog(); + handle_give_money_dialog(selected_object); } break; case CLICK_ACTION_OPEN: diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index bd00e4d9e..6fe00b513 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6125,7 +6125,7 @@ class LLAvatarResetSkeletonAndAnimations : public view_listener_t }; -bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle selection) +bool complete_give_money(const LLSD& notification, const LLSD& response, LLViewerObject* objectp) { S32 option = LLNotification::getSelectedOption(notification, response); if (option == 0) @@ -6133,8 +6133,6 @@ bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjec gAgent.setDoNotDisturb(false); } - LLViewerObject* objectp = selection->getPrimaryObject(); - // Show avatar's name if paying attachment if (objectp && objectp->isAttachment()) { @@ -6161,10 +6159,10 @@ bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjec return false; } -void handle_give_money_dialog() +void handle_give_money_dialog(LLViewerObject* obj) { LLNotification::Params params("BusyModePay"); - params.functor(boost::bind(complete_give_money, _1, _2, LLSelectMgr::getInstance()->getSelection())); + params.functor(boost::bind(complete_give_money, _1, _2, obj)); if (gAgent.isDoNotDisturb()) { @@ -6181,7 +6179,7 @@ class LLPayObject : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - handle_give_money_dialog(); + handle_give_money_dialog(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); return true; } }; @@ -6196,9 +6194,8 @@ bool enable_pay_avatar() // [/RLVa:KB] } -bool enable_pay_object() +bool enable_pay_object(LLViewerObject* object) { - LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); if( object ) { LLViewerObject *parent = (LLViewerObject *)object->getParent(); @@ -6304,7 +6301,7 @@ class LLEnablePayObject : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - gMenuHolder->findControl(userdata["control"].asString())->setValue(enable_pay_avatar() || enable_pay_object()); + gMenuHolder->findControl(userdata["control"].asString())->setValue(enable_pay_avatar() || enable_pay_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject())); return true; } }; @@ -9654,6 +9651,25 @@ class ListObjectSit : public view_listener_t } }; +class ListObjectPay : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + handle_give_money_dialog(gObjectList.findObject(LFIDBearer::getActiveSelectedID())); + return true; + } +}; + +class ListObjectEnablePay : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + const auto& ids = LFIDBearer::getActiveSelectedIDs(); + gMenuHolder->findControl(userdata["control"].asString())->setValue(ids.size() == 1 && enable_pay_object(gObjectList.findObject(ids[0]))); + return true; + } +}; + class MediaCtrlCopyURL : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) @@ -10048,6 +10064,8 @@ void initialize_menus() addMenu(new ListActivate, "List.Activate"); addMenu(new ListObjectCamTo, "List.Object.CamTo"); addMenu(new ListObjectSit, "List.Object.Sit"); + addMenu(new ListObjectPay, "List.Object.Pay"); + addMenu(new ListObjectEnablePay, "List.Object.EnablePay"); add_radar_listeners(); diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index c1eb30c1e..4c0418ce2 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -133,8 +133,8 @@ void handle_toggle_flycam(); void handle_fake_away_status(void*); void handle_object_sit_or_stand(); -void handle_give_money_dialog(); -bool enable_pay_object(); +void handle_give_money_dialog(class LLViewerObject*); +bool enable_pay_object(LLViewerObject*); bool enable_buy_object(); void handle_go_to(const LLVector3d& pos); diff --git a/indra/newview/skins/default/xui/en-us/menu_objects_list.xml b/indra/newview/skins/default/xui/en-us/menu_objects_list.xml index 4f7d0a47b..7e2a943d4 100644 --- a/indra/newview/skins/default/xui/en-us/menu_objects_list.xml +++ b/indra/newview/skins/default/xui/en-us/menu_objects_list.xml @@ -20,6 +20,10 @@ + + + + diff --git a/indra/newview/skins/default/xui/en-us/menu_url_objectim.xml b/indra/newview/skins/default/xui/en-us/menu_url_objectim.xml index b8104a604..5d785ac7c 100644 --- a/indra/newview/skins/default/xui/en-us/menu_url_objectim.xml +++ b/indra/newview/skins/default/xui/en-us/menu_url_objectim.xml @@ -60,6 +60,10 @@ + + + + Date: Fri, 10 Jan 2020 13:22:55 -0500 Subject: [PATCH 164/281] When chat scrolls, IDBearer URL menus shouldn't lead to the wrong place Optimizes away multiple iterations over scroll lists and multiple parsings of urls to determine the target(s) At the cost of the last selection being stored statically in a vector Removes virtual LFIDBearer::getNumSelected --- indra/llui/lfidbearer.cpp | 3 ++- indra/llui/lfidbearer.h | 9 +++++---- indra/llui/llscrolllistctrl.h | 2 +- indra/newview/llnameui.h | 1 - indra/newview/llnetmap.h | 1 - indra/newview/llviewermenu.cpp | 6 +++--- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/indra/llui/lfidbearer.cpp b/indra/llui/lfidbearer.cpp index 51d2a8768..8af0b133a 100644 --- a/indra/llui/lfidbearer.cpp +++ b/indra/llui/lfidbearer.cpp @@ -26,12 +26,13 @@ const std::array LFIDBearer::sMenuStrings { "menu_avs_list.xml" // 0 , "menu_groups_list.xml" // 1 -, "menu_objects_list.xml" // 2 // Singu TODO +, "menu_objects_list.xml" // 2 }; std::array LFIDBearer::sMenus {}; const LFIDBearer* LFIDBearer::sActive = nullptr; LFIDBearer::Type LFIDBearer::sActiveType = LFIDBearer::AVATAR; +uuid_vec_t LFIDBearer::sActiveIDs {}; void LFIDBearer::buildMenus() { diff --git a/indra/llui/lfidbearer.h b/indra/llui/lfidbearer.h index 0f8a8b5bd..a54b06619 100644 --- a/indra/llui/lfidbearer.h +++ b/indra/llui/lfidbearer.h @@ -40,19 +40,19 @@ struct LFIDBearer virtual ~LFIDBearer() { if (sActive == this) sActive = nullptr; } virtual LLUUID getStringUUIDSelectedItem() const = 0; virtual uuid_vec_t getSelectedIDs() const { return { getStringUUIDSelectedItem() }; } - virtual S32 getNumSelected() const { return getStringUUIDSelectedItem().notNull(); } virtual Type getSelectedType() const { return AVATAR; } template static const T* getActive() { return static_cast(sActive); } - static LLUUID getActiveSelectedID() { return sActive->getStringUUIDSelectedItem(); } - static uuid_vec_t getActiveSelectedIDs() { return sActive->getSelectedIDs(); } - static S32 getActiveNumSelected() { return sActive->getNumSelected(); } + static const LLUUID& getActiveSelectedID() { return sActiveIDs.empty() ? LLUUID::null : sActiveIDs[0]; } + static const uuid_vec_t& getActiveSelectedIDs() { return sActiveIDs; } + static size_t getActiveNumSelected() { return sActiveIDs.size(); } static const Type& getActiveType() { return sActiveType; } void setActive() const { sActive = this; sActiveType = getSelectedType(); + sActiveIDs = getSelectedIDs(); //sActiveIDs or even some kinda hybrid map, if Type is MULTIPLE fill the vals? and remove a buncha virtual functions? } @@ -68,4 +68,5 @@ protected: private: static const LFIDBearer* sActive; static Type sActiveType; + static uuid_vec_t sActiveIDs; }; diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index aa9ec150a..c1dcf8eed 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -202,7 +202,7 @@ public: virtual S32 getFirstSelectedIndex() const; std::vector getAllSelected() const; uuid_vec_t getSelectedIDs() const override final; //Helper. Much like getAllSelected, but just provides a LLUUID vec - S32 getNumSelected() const override final; + S32 getNumSelected() const; LLScrollListItem* getLastSelectedItem() const { return mLastSelected; } // iterate over all items diff --git a/indra/newview/llnameui.h b/indra/newview/llnameui.h index e71994877..1e8da160b 100644 --- a/indra/newview/llnameui.h +++ b/indra/newview/llnameui.h @@ -47,7 +47,6 @@ struct LLNameUI : public LFIDBearer } LLUUID getStringUUIDSelectedItem() const override final { return mNameID; } - S32 getNumSelected() const override final { return 1; } Type getSelectedType() const override final { return mType; } void setType(const Type& type); diff --git a/indra/newview/llnetmap.h b/indra/newview/llnetmap.h index 75200dfb9..67eb3d4be 100644 --- a/indra/newview/llnetmap.h +++ b/indra/newview/llnetmap.h @@ -70,7 +70,6 @@ public: LLUUID getStringUUIDSelectedItem() const override final { return mClosestAgentAtLastRightClick; } uuid_vec_t getSelectedIDs() const override final { return mClosestAgentsAtLastClick; } - S32 getNumSelected() const override final { return mClosestAgentsAtLastClick.size(); } // [SL:KB] - Patch: World-MinimapOverlay | Checked: 2012-06-20 (Catznip-3.3.0) void refreshParcelOverlay() { mUpdateParcelImage = true; } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 6fe00b513..676ecc26b 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -9100,7 +9100,7 @@ class ListEnableAnySelected : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - gMenuHolder->findControl(userdata["control"].asString())->setValue(LFIDBearer::getActiveNumSelected()); + gMenuHolder->findControl(userdata["control"].asString())->setValue(LFIDBearer::getActiveNumSelected() != 0); return true; } }; @@ -9414,7 +9414,7 @@ class ListTeleportTo : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - const auto&& id = LFIDBearer::getActiveSelectedID(); + const auto& id = LFIDBearer::getActiveSelectedID(); gAgent.teleportViaLocation(LFIDBearer::getActiveType() == LFIDBearer::OBJECT ? gObjectList.findObject(id)->getPositionGlobal() : get_av_pos(id)); return true; } @@ -9452,7 +9452,7 @@ class ListIsNearby : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - const auto&& id = LFIDBearer::getActiveSelectedID(); + const auto& id = LFIDBearer::getActiveSelectedID(); gMenuHolder->findControl(userdata["control"].asString())->setValue(LFIDBearer::getActiveType() == LFIDBearer::OBJECT ? !!gObjectList.findObject(id) : is_nearby(id)); return true; } From f1342d7bb8ae9ea70e47d1d1f98648c745e857bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Fri, 10 Jan 2020 15:49:12 -0500 Subject: [PATCH 165/281] Fix Name List xml processing (and typing into them to +find names!) LLNameListCtrl::fromXML was ancient, and LLScrollListCtrl::fromXML had been getting updated but that processing should be done in a common virtual function so we have a valid hierarchy! This fixes that! Now all of the modern amenities added to scroll lists are in name lists. --- indra/llui/llscrolllistctrl.cpp | 62 ++++++++++-------- indra/newview/llnamelistctrl.cpp | 109 +------------------------------ 2 files changed, 36 insertions(+), 135 deletions(-) diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 76b7cfc21..e9d40d0d4 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -2712,20 +2712,14 @@ void LLScrollListCtrl::setScrollListParameters(LLXMLNodePtr node) node->getAttributeString("menu_file", menu); if (!menu.empty()) setContextMenu(menu); } -} -// static -LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) -{ - LLRect rect; - createRect(node, rect, parent, LLRect()); + if (node->hasAttribute("heading_height")) + { + S32 heading_height; + node->getAttributeS32("heading_height", heading_height); + setHeadingHeight(heading_height); + } - BOOL multi_select = false; - node->getAttributeBOOL("multi_select", multi_select); - BOOL draw_border = true; - node->getAttributeBOOL("draw_border", draw_border); - BOOL draw_heading = false; - node->getAttributeBOOL("draw_heading", draw_heading); S32 search_column = 0; node->getAttributeS32("search_column", search_column); S32 sort_column = -1; @@ -2733,18 +2727,7 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac BOOL sort_ascending = true; node->getAttributeBOOL("sort_ascending", sort_ascending); - LLScrollListCtrl* scroll_list = new LLScrollListCtrl("scroll_list", rect, NULL, multi_select, draw_border, draw_heading); - - if (node->hasAttribute("heading_height")) - { - S32 heading_height; - node->getAttributeS32("heading_height", heading_height); - scroll_list->setHeadingHeight(heading_height); - } - - scroll_list->setScrollListParameters(node); - scroll_list->initFromXML(node, parent); - scroll_list->setSearchColumn(search_column); + setSearchColumn(search_column); LLSD columns; S32 index = 0; @@ -2806,11 +2789,11 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac ++index; } } - scroll_list->setColumnHeadings(columns); + setColumnHeadings(columns); if (sort_column >= 0) { - scroll_list->sortByColumnIndex(sort_column, sort_ascending); + sortByColumnIndex(sort_column, sort_ascending); } const std::string kidrow(nodename + "row"); @@ -2856,18 +2839,39 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac } } if(explicit_column) - scroll_list->addElement(row); + addElement(row); else { LLSD entry_id; if(id_found) entry_id = id; - scroll_list->addSimpleElement(value,ADD_BOTTOM,entry_id); + addSimpleElement(value,ADD_BOTTOM,entry_id); } } } - scroll_list->setCommentText(node->getTextContents()); + setCommentText(node->getTextContents()); +} + +// static +LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) +{ + LLRect rect; + createRect(node, rect, parent, LLRect()); + + BOOL multi_select = false; + node->getAttributeBOOL("multi_select", multi_select); + + BOOL draw_border = true; + node->getAttributeBOOL("draw_border", draw_border); + + BOOL draw_heading = false; + node->getAttributeBOOL("draw_heading", draw_heading); + + LLScrollListCtrl* scroll_list = new LLScrollListCtrl("scroll_list", rect, NULL, multi_select, draw_border, draw_heading); + + scroll_list->setScrollListParameters(node); + scroll_list->initFromXML(node, parent); return scroll_list; } diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index 2cb3ba96b..0141af242 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -461,13 +461,13 @@ LLView* LLNameListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto LLRect rect; createRect(node, rect, parent, LLRect()); - BOOL multi_select = FALSE; + BOOL multi_select = false; node->getAttributeBOOL("multi_select", multi_select); - BOOL draw_border = TRUE; + BOOL draw_border = true; node->getAttributeBOOL("draw_border", draw_border); - BOOL draw_heading = FALSE; + BOOL draw_heading = false; node->getAttributeBOOL("draw_heading", draw_heading); S32 name_column_index = 0; @@ -494,108 +494,5 @@ LLView* LLNameListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto name_list->initFromXML(node, parent); - LLSD columns; - S32 index = 0; - LLXMLNodePtr child; - for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling()) - { - if (child->hasName("column")) - { - std::string labelname(""); - child->getAttributeString("label", labelname); - - std::string columnname(labelname); - child->getAttributeString("name", columnname); - - std::string sortname(columnname); - child->getAttributeString("sort", sortname); - - if (child->hasAttribute("relative_width")) - { - F32 columnrelwidth = 0.f; - child->getAttributeF32("relative_width", columnrelwidth); - columns[index]["relative_width"] = columnrelwidth; - } - else if (child->hasAttribute("relwidth")) - { - F32 columnrelwidth = 0.f; - child->getAttributeF32("relwidth", columnrelwidth); - columns[index]["relative_width"] = columnrelwidth; - } - else if (child->hasAttribute("dynamic_width")) - { - BOOL columndynamicwidth = FALSE; - child->getAttributeBOOL("dynamic_width", columndynamicwidth); - columns[index]["dynamic_width"] = columndynamicwidth; - } - else if (child->hasAttribute("dynamicwidth")) - { - BOOL columndynamicwidth = FALSE; - child->getAttributeBOOL("dynamicwidth", columndynamicwidth); - columns[index]["dynamic_width"] = columndynamicwidth; - } - else - { - S32 columnwidth = -1; - child->getAttributeS32("width", columnwidth); - columns[index]["width"] = columnwidth; - } - - LLFontGL::HAlign h_align = LLFontGL::LEFT; - h_align = LLView::selectFontHAlign(child); - - columns[index]["name"] = columnname; - columns[index]["label"] = labelname; - columns[index]["halign"] = (S32)h_align; - columns[index]["sort"] = sortname; - - index++; - } - } - name_list->setColumnHeadings(columns); - - - for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling()) - { - if (child->hasName("row")) - { - LLUUID id; - child->getAttributeUUID("id", id); - - LLSD row; - - row["id"] = id; - - S32 column_idx = 0; - LLXMLNodePtr row_child; - for (row_child = node->getFirstChild(); row_child.notNull(); row_child = row_child->getNextSibling()) - { - if (row_child->hasName("column")) - { - std::string value = row_child->getTextContents(); - - std::string columnname(""); - row_child->getAttributeString("name", columnname); - - std::string font(""); - row_child->getAttributeString("font", font); - - std::string font_style(""); - row_child->getAttributeString("font-style", font_style); - - row["columns"][column_idx]["column"] = columnname; - row["columns"][column_idx]["value"] = value; - row["columns"][column_idx]["font"] = font; - row["columns"][column_idx]["font-style"] = font_style; - column_idx++; - } - } - name_list->addElement(row); - } - } - - std::string contents = node->getTextContents(); - name_list->setCommentText(contents); - return name_list; } From 28f13b806c99a6ca52961c9d442594bdef5af4c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Fri, 10 Jan 2020 16:06:44 -0500 Subject: [PATCH 166/281] Some harmless reorganization --- indra/llui/llscrolllistctrl.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index e9d40d0d4..23aa72da6 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -2722,8 +2722,6 @@ void LLScrollListCtrl::setScrollListParameters(LLXMLNodePtr node) S32 search_column = 0; node->getAttributeS32("search_column", search_column); - S32 sort_column = -1; - node->getAttributeS32("sort_column", sort_column); BOOL sort_ascending = true; node->getAttributeBOOL("sort_ascending", sort_ascending); @@ -2738,7 +2736,7 @@ void LLScrollListCtrl::setScrollListParameters(LLXMLNodePtr node) { if (child->hasName("column") || child->hasName("columns") || child->hasName(kidcolumn) || child->hasName(kidcolumns)) { - std::string labelname(""); + std::string labelname; if (child->getAttributeString("label", labelname)) columns[index]["label"] = labelname; else if (child->getAttributeString("image", labelname)) @@ -2791,11 +2789,6 @@ void LLScrollListCtrl::setScrollListParameters(LLXMLNodePtr node) } setColumnHeadings(columns); - if (sort_column >= 0) - { - sortByColumnIndex(sort_column, sort_ascending); - } - const std::string kidrow(nodename + "row"); const std::string kidrows(nodename + "rows"); for (LLXMLNodePtr child = node->getFirstChild(); child.notNull(); child = child->getNextSibling()) @@ -2850,6 +2843,13 @@ void LLScrollListCtrl::setScrollListParameters(LLXMLNodePtr node) } } + S32 sort_column = -1; + node->getAttributeS32("sort_column", sort_column); + if (sort_column >= 0) + { + sortByColumnIndex(sort_column, sort_ascending); + } + setCommentText(node->getTextContents()); } From a687273d5772e04b1d956abb7850acaf423c307f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Fri, 10 Jan 2020 16:07:14 -0500 Subject: [PATCH 167/281] Default column sorting to list sort_ascending attribute value --- indra/llui/llscrolllistctrl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 23aa72da6..78c3c750f 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -2759,9 +2759,9 @@ void LLScrollListCtrl::setScrollListParameters(LLXMLNodePtr node) } else // Singu Note: if a scroll list does not provide sort_direction, provide sort_ascending to sort as expected { - bool sort_ascending = true; - child->getAttribute_bool("sort_ascending", sort_ascending); - columns[index]["sort_ascending"] = sort_ascending; + bool col_sort_ascending = sort_ascending; + child->getAttribute_bool("sort_ascending", col_sort_ascending); + columns[index]["sort_ascending"] = col_sort_ascending; } S32 columnwidth = -1; From fa97d8497ae577c3b6e5e42345d72dbe98de2fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Fri, 10 Jan 2020 16:47:52 -0500 Subject: [PATCH 168/281] [Follow] If the user decides to sit/stand, that should cancel following --- indra/newview/llviewermenu.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 676ecc26b..f2dac54af 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3572,6 +3572,7 @@ class LLSelfSitOrStand : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { + gAgent.stopAutoPilot(true); if (gAgentAvatarp && gAgentAvatarp->isSitting()) { gAgent.standUp(); @@ -3896,6 +3897,8 @@ void handle_object_sit(LLViewerObject* object, const LLVector3& offset = LLVecto } // [/RLVa:KB] + gAgent.stopAutoPilot(true); + gMessageSystem->newMessageFast(_PREHASH_AgentRequestSit); gMessageSystem->nextBlockFast(_PREHASH_AgentData); gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); From 3209507b6c03cc58eee055f02d45e0dd786ba6db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Fri, 10 Jan 2020 16:57:25 -0500 Subject: [PATCH 169/281] [Follow] Sit if target is sitting, stand when they stand Does object and ground sitting. May fly to sitting target if they're in air Ground sits as close as it can get if cannot reach ground sitting target Optimizes following when within desired range of target Moves sitting/standing autopilot cancels to more proper places --- indra/newview/llagent.cpp | 68 ++++++++++++++++++++++++++++++++-- indra/newview/llviewermenu.cpp | 6 +-- 2 files changed, 67 insertions(+), 7 deletions(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 1a384b8f2..76f984c46 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1730,6 +1730,15 @@ void LLAgent::stopAutoPilot(BOOL user_cancel) mAutoPilotFinishedCallback(!user_cancel && dist_vec_squared(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal) < (mAutoPilotStopDistance * mAutoPilotStopDistance), mAutoPilotCallbackData); mAutoPilotFinishedCallback = NULL; } + + // Sit response during follow pilot, now complete, resume follow + if (!user_cancel && mAutoPilotBehaviorName == "Sit" && mLeaderID.notNull()) + { + mAutoPilotBehaviorName = "Follow"; + mAutoPilot = true; + return; + } + mLeaderID = LLUUID::null; mAutoPilotNoProgressFrameCount = 0; @@ -1758,14 +1767,54 @@ void LLAgent::autoPilot(F32 *delta_yaw) { if (mAutoPilot && isAgentAvatarValid()) { - bool follow = !mLeaderID.isNull(); //mAutoPilotBehaviorName == "Follow"; + U8 follow = mLeaderID.notNull(); //mAutoPilotBehaviorName == "Follow"; if (follow) { if (auto object = gObjectList.findObject(mLeaderID)) { mAutoPilotTargetGlobal = object->getPositionGlobal(); if (const auto& av = object->asAvatar()) // Fly if avatar target is flying + { setFlying(av->mInAir); + if (av->isSitting()) + { + if (!rlv_handler_t::isEnabled() || !gRlvHandler.hasBehaviour(RLV_BHVR_SIT)) + { + if (auto seat = av->getParent()) + { + mAutoPilotNoProgressFrameCount = 0; // Ground Sit may have incremented this, reset it + if (gAgentAvatarp->getParent() != seat) + { + void handle_object_sit(LLViewerObject*, const LLVector3&); + handle_object_sit(static_cast(seat), LLVector3::zero); + } + return; // If sitting, we won't be moving, exit here + } + else // Ground sit, but only if near enough + { + if (dist_vec(av->getPositionAgent(), getPositionAgent()) <= mAutoPilotStopDistance) // We're close enough, sit. + { + if (!gAgentAvatarp->isSittingAvatarOnGround()) + setControlFlags(AGENT_CONTROL_SIT_ON_GROUND); + mAutoPilotNoProgressFrameCount = 0; // Ground Sit may have incremented this, reset it now + return; // We're already sitting on the ground, we have nothing to do + } + else // We're not close enough yet + { + if (/*!gAgentAvatarp->isSitting() && */ // RLV takes care of sitting check for us inside standUp + mAutoPilotNoProgressFrameCount <= AUTOPILOT_MAX_TIME_NO_PROGRESS * gFPSClamped) // Only stand up if we haven't exhausted our no progress frames + standUp(); // Unsit if need be, so we can move + follow = 2; // Indicate we want to groundsit + } + } + } + } + else if (gAgentAvatarp->isSitting()) // Leader isn't sitting, standUp if needed + { + standUp(); + mAutoPilotNoProgressFrameCount = 0; // Ground Sit may have incremented this, reset it + } + } } else // We might still have a valid avatar pos { @@ -1777,12 +1826,19 @@ void LLAgent::autoPilot(F32 *delta_yaw) stopAutoPilot(); return; } + standUp(); // Leader not rendered, we mustn't be sitting + mAutoPilotNoProgressFrameCount = 0; // Ground Sit may have incremented this, reset it mAutoPilotTargetGlobal = pos; // Should we fly if the height difference is great enough here? Altitude is often invalid... } + + if (dist_vec(mAutoPilotTargetGlobal, getPositionGlobal()) <= mAutoPilotStopDistance) + { + follow = 3; // We're close enough, indicate no walking + } } - if (!follow && gAgentAvatarp->mInAir && mAutoPilotAllowFlying) + if (follow % 2 == 0 && gAgentAvatarp->mInAir && mAutoPilotAllowFlying) { setFlying(TRUE); } @@ -1794,12 +1850,15 @@ void LLAgent::autoPilot(F32 *delta_yaw) F32 target_dist = direction.magVec(); - if (!follow && target_dist >= mAutoPilotTargetDist) + if (follow % 2 == 0 && target_dist >= mAutoPilotTargetDist) { mAutoPilotNoProgressFrameCount++; if (mAutoPilotNoProgressFrameCount > AUTOPILOT_MAX_TIME_NO_PROGRESS * gFPSClamped) { - stopAutoPilot(); + if (follow) // Well, we tried to reach them, let's just ground sit for now. + setControlFlags(AGENT_CONTROL_SIT_ON_GROUND); + else + stopAutoPilot(); return; } } @@ -1841,6 +1900,7 @@ void LLAgent::autoPilot(F32 *delta_yaw) } *delta_yaw = yaw; + if (follow == 3) return; // We're close enough, all we need to do is turn // Compute when to start slowing down F32 slow_distance; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index f2dac54af..667f35583 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3897,8 +3897,6 @@ void handle_object_sit(LLViewerObject* object, const LLVector3& offset = LLVecto } // [/RLVa:KB] - gAgent.stopAutoPilot(true); - gMessageSystem->newMessageFast(_PREHASH_AgentRequestSit); gMessageSystem->nextBlockFast(_PREHASH_AgentData); gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); @@ -3921,9 +3919,10 @@ void handle_object_sit_or_stand() return; } + gAgent.stopAutoPilot(true); + if (sitting_on_selection()) { - gAgent.stopAutoPilot(true); gAgent.standUp(); return; } @@ -9649,6 +9648,7 @@ class ListObjectSit : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { + gAgent.stopAutoPilot(true); handle_object_sit(gObjectList.findObject(LFIDBearer::getActiveSelectedID())); return true; } From 3ba1c886728177489e682085ac407c334ac11f19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sat, 11 Jan 2020 03:01:28 -0500 Subject: [PATCH 170/281] Remove reference to dead control --- indra/newview/llviewerwindow.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index eb3fb00c7..8fdd639f1 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2081,8 +2081,6 @@ void LLViewerWindow::adjustRectanglesForFirstUse(const LLRect& window) adjust_rect_top_right("FloaterMiniMapRect", window); - adjust_rect_top_right("FloaterLagMeter", window); - adjust_rect_top_left("FloaterBuildOptionsRect", window); adjust_rect_bottom_left("FloaterActiveSpeakersRect", window); From 265336463d9e6316c881e8d3d355dc4ac46d3385 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sat, 11 Jan 2020 04:32:42 -0500 Subject: [PATCH 171/281] Add FMOD Logo to login screen to comply with licensing Adds code to hide the new UI when compiled without FMOD Studio --- indra/newview/CMakeLists.txt | 1 + indra/newview/llpanellogin.cpp | 4 ++++ .../newview/skins/default/textures/FMOD Logo.png | Bin 0 -> 8803 bytes .../newview/skins/default/textures/textures.xml | 2 ++ .../skins/default/xui/en-us/panel_login.xml | 2 ++ .../skins/frenchtouch/textures/FMOD Logo.png | Bin 0 -> 9688 bytes .../newview/skins/italia/textures/FMOD Logo.png | Bin 0 -> 9688 bytes .../skins/kirstenLite2/textures/FMOD Logo.png | Bin 0 -> 9688 bytes .../newview/skins/kliteat/textures/FMOD Logo.png | Bin 0 -> 9688 bytes .../skins/new_silver/textures/FMOD Logo.png | Bin 0 -> 9688 bytes .../skins/orangelife/textures/FMOD Logo.png | Bin 0 -> 9688 bytes .../skins/secondlove/textures/FMOD Logo.png | Bin 0 -> 9688 bytes .../newview/skins/silver/textures/FMOD Logo.png | Bin 0 -> 9688 bytes .../skins/snowwhite/textures/FMOD Logo.png | Bin 0 -> 9688 bytes .../skins/stpatrick/textures/FMOD Logo.png | Bin 0 -> 9688 bytes .../skins/white_emerald/textures/FMOD Logo.png | Bin 0 -> 9688 bytes 16 files changed, 9 insertions(+) create mode 100644 indra/newview/skins/default/textures/FMOD Logo.png create mode 100644 indra/newview/skins/frenchtouch/textures/FMOD Logo.png create mode 100644 indra/newview/skins/italia/textures/FMOD Logo.png create mode 100644 indra/newview/skins/kirstenLite2/textures/FMOD Logo.png create mode 100644 indra/newview/skins/kliteat/textures/FMOD Logo.png create mode 100644 indra/newview/skins/new_silver/textures/FMOD Logo.png create mode 100644 indra/newview/skins/orangelife/textures/FMOD Logo.png create mode 100644 indra/newview/skins/secondlove/textures/FMOD Logo.png create mode 100644 indra/newview/skins/silver/textures/FMOD Logo.png create mode 100644 indra/newview/skins/snowwhite/textures/FMOD Logo.png create mode 100644 indra/newview/skins/stpatrick/textures/FMOD Logo.png create mode 100644 indra/newview/skins/white_emerald/textures/FMOD Logo.png diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 54c9329b5..72e6e6432 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1433,6 +1433,7 @@ endif (OPENAL) if (USE_FMODSTUDIO) list(APPEND LLSTARTUP_COMPILE_DEFINITIONS "LL_FMODSTUDIO=1") + set_source_files_properties(llpanellogin.cpp PROPERTIES COMPILE_DEFINITIONS "LL_FMODSTUDIO=1") endif (USE_FMODSTUDIO) set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_DEFINITIONS "${LLSTARTUP_COMPILE_DEFINITIONS}") diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index bafedd9f3..31756e8ca 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -237,6 +237,10 @@ LLPanelLogin::LLPanelLogin(const LLRect& rect) reshape(rect.getWidth(), rect.getHeight()); +#ifndef LL_FMODSTUDIO + getChildView("fmod_logo")->setVisible(false); +#endif + LLComboBox* username_combo(getChild("username_combo")); username_combo->setCommitCallback(boost::bind(LLPanelLogin::onSelectLoginEntry, _2)); username_combo->setFocusLostCallback(boost::bind(&LLPanelLogin::onLoginComboLostFocus, this, username_combo)); diff --git a/indra/newview/skins/default/textures/FMOD Logo.png b/indra/newview/skins/default/textures/FMOD Logo.png new file mode 100644 index 0000000000000000000000000000000000000000..0675b5d13dda17d89b20189a9bfef2bcb9fa9c54 GIT binary patch literal 8803 zcmXwf2UL?y(>BtT8mbCN?^Tc*DbfN0L3-~XNR<{kh;$;sh=@XHq9P!W(2Eq2-a#M< zy^26W5u}$tJm350oMiW!ncbP4*?aHV-K0DLgJ^Euy+uSsM5C*tX-q^!j3Lz9Dai@H zDt%1TgyQCN9jibhA_?B>?~TyUst_U~E+SpcN2a0E_*{H2oBXdtzc#_EKGOmNvX7#p zO~m(^L+xTWZt0sjHW62fP?|k@#~feEeU^ShCcmXGvKou<0IHhwD+RjH>u?86Q$=hB9*h%77-5Y2-hSGg76_e zi|huQj%a?mdyVKZtQk7ldZ#)j*NBLi&57o^r1XxLy)L&cn>o2g{4Yv=*BLlsxaJaC0#}#S2qC*3gN>8KJk z@;rNF@t<1aW<{6GFtlw9?KO*_$uc>W`?^Z-WkQL<1m*vc&A%FJT-ONW5q}N+{@+m5 z9P2ww$Hna^{!irhD=l4>>nefXtv}8@_n$qKxZiwWN0Mtg!5&8mTDkwJWo9ti|6e4^ z?-!R{3lPQ5(WWHZUkkqgM9b{Hx_{4m_VIM+f-Gno5>g4~z zEG2;~zEv5}8`obppY@*ex*OtVKXqNYFyk;1H;IoE*Az-z?0cOi+Jdy5+#HmZx zo=C6wGzafIaeR7>_Z9;`w3aMES}g9wf^4sC;6k=I@@({b|9IAG@I*{%Y}2C&9HPatc5qtlQrsuSFaOP&)?2ug!o#xv z1te4yX`+G8O7Z;9*^7ILC_4d>8T`+)hkNC;b(!Z|5xQ)HJ$mEW z;%VvUa~&6f;>J7Qjt^;7)cVk{bt7!oKbK)h86<6Wk7v~TZqg#qPBE?mhk^Ey;1*pQv&-GD%c7KR1nedAz!Cs_gTpE8Wwl zPizO2_vPI|dQ&x0WOWH(aj6er*6*`7(QLdUk#VE%AeC>+O>Q8&b^Ge4YOM9TIQGr=cpJ;zm)tBUms6o z;s?!s3;i^VjW5q_lapjJrx$Yl&WI_b$~B)UTiel_unX$4h?O_LGneL6c4*|b8W&)_ zF5?ej(CGX#f71tng7h-Y!$3L2e2hTB;%_EY*oWt-?T4hL$<)o1-zM#XwyV#g^DFZ6 z8{AX*>Hb=?zxW>H&6Mg6JS>WEp#37t>yJMs@xKs}7oiIsewJ$SL5YIYpN7&qPAuG- zw1V$~R~1ZR$iryB%$r$ac;{&hL$wasc&*KZ;QRJ2u$BIBgh^|E8`0pXX>(c3Qo#-4 z8G**r5vue1$o2t511xO(ZWG$~`&#-(K z9z`375}hJLrwU2}{a2uKbZU-lJ%WXb#z(bJ%KD&WyFPG^=Fsd^4wy-|$fQ>E8)&i% zC(N$*#tV_!r&lwv3CB3dH?Gsk(G~}CGpt+RF%=P`Vjg^YAN1sICFU#?^sL%Pir72l?xKFZ+89! zsmm??IBR6$ti$}FdQ|pz^)d$E+XYTa=b3qf=TG)hb4=>v`?zj9I#(`b(!i>$k5C}( zo)KOl^2ZA%z-!Yy%?T#o7F93Va8+ciFRAU)S<*)NcTBHnFHH&O_2=s~F7C2t4qR0e zHR?zblR`$Jj(=e7mi}3ETQAdZNv7teGI;qgE;kg(HPKWk?-V!cSdo&--F6qKTckJi zPyJEYXl!ZZ?O8OlY#wdi_qfX-|3!NuQLo2KFr{#+GGJ^=f@AhILaOe-XU`yd&BY=N zO-MzgBrEz_y2Da*Nl&|LI~pRNiqN)Oy9vkqMFpZrh$+3*h}20tg2YN6Nztay=z!(3 zyRxQnGVl-@N}NaNt>ZZc6n;UL7yI=yj8RUE)9nn>laQ=ryonkNSG?1E~UkF z*BQ=O!sA6z2D21_D5!Jy=#r>8@*;Co*WYgA6Kt?)V1eb)yTmgNM&x*D(^4G~LM9NK z)_(YQnRuylsXLmLUXwHace4K@vruY(Mse_6E+lWKdSgNPCz_6%g{dwtc&B)6pD+tV zEoeeB$SH9;Sl#g5^E;AzmjEzjv5Dgh3kWCfq&e*U{=n=fryvbI2A)B280ivkvSZs< zIl!*Y7@^>NAAx;|txENO?!qH-^Y6VG|C}s{BLz`Ak@}4WGqDNM*t;aP z!=Qt|*0UXUWi$m)+_-oM==LMltpUY-Ztz|9j1$# z48I^qF1YR`2!@d71@q)kr002N>|4s|QG?e)>^;55wkGFe1XI_a%!AyaIWU|MOCBs) zTOu-|q@G|hyfLLascUVoLkpArJUoDL@9zt#AzL=f@ca_*x1Xwh$CsPho1z^46{pr& zGbFSEovqq=zCO?YcM}@9tWt6oFY=~}mc3QXQE<(F1UBps9#_sut!+xRAU>Ph-`}?# zw|KDo3_tlK^c?>~U8+&4R4U_OXjC&ZkLy7Iwo!L`K3Pqe`etG?BdOYQXMJY!p`alL zN`E}PeJU=(oy|b63YJTvY+{)uqg--vihK7v%LFsUer^C=0Qw(3FnidnP4`#K0LG4s zPUtC)6>P5g!BzLhBBHdRg5@HDcgL;pq9>81ZAVGGsm}kfM)t40@ZrqK!*Ick5c!xI z|AimJidu}ioCngiogzi=;)r$Cmc#is43EH6wfT>$AwKy!r_LUio-ac}(z%dl{G2+j z7R#sOBt-Axf0?fPz(;J)EG@r9Rx-fvqTuDj11qzA;PAL~bvdKkYsziSAs@<`A0Rr? zis&RP9dqUI_v2@`%6}0(Gkp1co%Fm@G12f=M)||pMh!OSKg{WMZ8ay!&`!1hJ3mFI|I!Ysv0bx7R9>H!CISDIMgZ4w`Mh$ zaIYWa{sLfPt8jgzoU=R6tec*CeziM0SBy_J0Eqh9m4P0WDF6MM;2xia8^ckNQly8wiI-Y&O9iI_-?-M1?T$sGB zx>W}S)m~OQ+HDkr;shYCd+oz@m>Ul-0+6*4!#mm>?;A(xjtNPiBAjy!rhkd%iecIv{jw+a>VqgWWI@G$-Kh2)q7-MVuCo}=xuvHLyo`mQX*I%A_ z=Z&cs#nasnaQVFZ=Yw;Ky~V;F-_@@##(7I0_f+L~5oXw4b%+E&m$#~Du%MyhcU@=N zjeI|(Pk1rN?==rGH)Zi>_XS3qwoh=ZuG69&=-vU8-|2wQhGJu?JMZXm*3Lbvs-m65 zDLDFlbL-zdhB~=^T3+Ohr3Wt-h5xX!-)Bb&kwFBm_TA{POB#z?DVZ9Fna4R4RfiVM zd@;TGRG#L4&qjra+33N3NO&5Frixh#vWloqSo3)&xSodUo2&e$$C|*j9^T3MtE8CH zv*K?lf%Wr|cRivajjejQYo}T%y+ghHVFn7^c^$zW(>M!u)Cyk}W7yy;s)7W#JB^iN zC3QJR7Sbe)DBz=X>BZ+_MP$>TXHKXwdd!RGr_6O%KWj2RuR~a^uPg!DN7BzNHz}#G z$<9e)$aTQ8xc-tHom0ED&ya=5`JoA$qo^2#bu{kyoQC6O#;vbi8N2v?)n*>Mi&cW#y9LW=GM!)|lj zc@}Zp*CYqhrV-|Gv{DF`ebHFH6BL`Ci+SEjkCE&nVU)EY83}{gb>i9yX#+9;)OYK6 zllL%7iwmpUVOQLz!YLSuP|g{MKP??$Gf2sWO!=_L3W5 ztxp9D`ZImf$OT5I%LK*hFi-Xkr3C2H_GMzkkq{z!)K3!m{H9@+*;86T22v= zGANZU*sc6DqI5Mlm3h_}Gj~LaKj20F$bK$DOlSerQE*mp=6+FhpL(@*CRis>H>RwG zV~*`83i^b@p5Q42Op=nN|NcKCeja$Ph)mQvW;yu=t*Nc^!<61Tc4f_h0{L@C6zc~( z$ilm7l!9l=C0kw0*Ykx5@+$KOr7**vW)3^yNNL@xgWU=X-&`6I!XX8@9&|{$YGEsf zs2kkzytAo}k?I+dZb9Hl?TgxKW&b&M=5qL_w%HvmM-3_Z51I-bE@GvF@yp2xVz-=q zNvL*$hA}lrM(LZOky4{%AM(^?IQsS+Kqs9T0nm7V;*$LQpSUh{MElyb?RuC4+!*+sZ>wa^zvpfJh zEPu5_&xQPvdV@|G>+4$dxU+UT{i|h(boKadSPpw~EibZ?8BB{G>;LQ%-K%P5DUfFd#~i8_|XT-iLHv13F0o9PE^ zc+G8Az;ue46W>X_cr2rl#VD>udVs4N83cfOSBL|5cpo~*^ zz1F6_RQaEnFh*DobUy->ydoN*@r<2)k@57elr%BW-k5i!aW#w_@4${i;$80=<+C$_ z8VlDAUMcUGXRWW+jxfk}X3gDlsltfq^MtRKRGb(3rsANHe6gx@|!KoLSd6m?b zRplQoU><8Xr~W6fe@wFuqNW45A%nzo<`ryx%m-i;oKdebl~fm)?H|n2JcwxVa zx9v2r4Xh6FG7L|%tAZ=004ehI_Qmb@LMN=63>9($`JKm&V5xN zS;M6&4^U=rUZ~tud5Tvx7jlL7kwUFNm3ZhyR;u@ZR$+RzO9#DpfaqPLUXkTcpBj!p z!&Vm^cy9Qvn2c`B9cHvBG&j8+mOjxNC=u3b-b>7iAsa!b@=m$M*f4{P@7$MoV9ONn z)Yi6M*1}q!u_V2+&1_1Hv%^XcK@+8M$%QPm`Au2u5pTl(b|iO#5nECT<()c0+(Ua|2WJ*Sko1^ES*nu=j?&t`AYL|` zg~^mdlRIqIz4wqSQwV^wpdsm%+jdP%(%YHiuV+_KyWILhlt zeY~wI?DZbKq4-gR5X^dQ^b$Y+>_;|@N;AokUW>*^$j~;zo-=RMA z7XjAGnng-iaT%IwXMaNmXPgxFi3CENpBZ0jM03X1KB&h78v<)NWv7J)H_2=SVN~d+ zJ<~q8->``&UnYTt$;%3z-<>YW51SerpYKnj8hw`I!%C%@cSS}aRwZ*DSC}Y=$>_e= zFi*QP+wa|6NIWGjVL1IApEgA<^OCFCgNOK(7b!nNLf_^NP<&H#4qgh~Rv27(4l7r@ z>jOijvUO=#>>mp_-VgK0n<1;JaCppiqaGEg{!}R@>2U1ga;@?3ReK#T5~?HMuGdk* zz{E)w^-C*=8uU#uB>aNwA4dGi#3D_8L~xcbQ$`UB&_-4-|4wtT^VInFz#ZHUU!ei5 z+_CnL{f?VrVfKMIk0cMvpz}Gy2mVZhZ0ESan@g3I$y??92N}&RBXRbUH&2Y#h9`7K z{;^$9P{O-M&fu1QSxlhU`Cv;Gi?AnPVj zrumx)$*`2)Pix|phj0@V_<$(cAQPVh3C3idpBS!2~nZJPBxfv+9Dh((TpzsIfH1X zGPZjyH(lLBCqA>1H@hptU8jY*D89+k2#Db9qIk$i4o_ii&1Q&zI4wm%gReR$8QT#}B?j zx^v@3f?U>D6Z1JhI1A~_dTeY|=}#Ap!Di7eGlz$+c|p-(J=oaG{7tm!=T&{SMx(IX zXF0zFuz4zqd{vcpi;Hc4fWkbB8ERU`kN!Z^Jv$9=)rUU1Jv{E)zF+{3xji^iQ-rer z@?y4RZmz>7(+KCfGlCBP(Erz}Hqx61vj|0d+9{NqeUY^Nm7BZA)x5zSOtHjfcLG(I zP9AU<+qe7qMb!t<>uigC`gxy(9@^5lVpP0lTRD%!no9b~-`jB4f-5!JzuPPOTLZu> zrv1T??cSp@VrBV!WdR#jxAk?OY<9QF@cLXXX+Vibcb7+TuuCh zcLAC?fH|cxS84r1hriWcFD_`rq%#3_W5c+1P)s(Nb`qgb#j%O)do|$=$lf;AsI$mb$t~&nQjYr}gINuVMZlnuSc-XT?xIxX_ z=Uz3rThnjThSOhm>_(#9eq>y<4g*8$E_U?iDH*`;D+eO`z)t#`;-ElQBm`}P~XO*?D)Tbd|9QIC)&Q$&94 zY2#D2Y~Xj3^nAZ=jPxV3vQq{D3iehB9G&Dudex_!-di ze5@h~3bRMqE03Cwf%nkbzZdmMmDFpCqGIO~-@R8DQw@e)Mr$GQaQAuEg`31|iH=`w z+D`dcXWkmzyr1Bae}`vrlI;E73TwV=*&D;)nR_du4}o{(nJ^Cg$~#e)Mq$-Bhj6RQ z%Iu6`VuEV%yk?#GjJ^wLi4v$MJojtl?p^QwGyc?oxRI833n$AM_?0(*)F|1Hd!%xN zLyG$7e|_4k*yVT*ci{@^n4uFL05|i z+l_Ews5O_0qvP?BBn3{ZdcV&**=Nf%+Srttu_^Kk!cO7|L5eTwD8Cy}8tUw`XB%<4R15WzUs;nh_u0M+aU>Ir6WHSUD`yG) z>0O+>Ww(ld4OJTLVR_`cxdmZwwP>haFKbj_2J%D=uG@V+Wd?QPKQCAruCwPV(vG)W z%@baqUfaa^-$tB-dEQpu&rCaQijrc5PuIV{4^vtiONqbT?ZjUtOomP4;OCebYi(~e z-xsPosQQa82kXtTZMA=XKp63x2qP_*e0Kj`Vu%8*;XyL4zGp1LzphaH9uEVW*=!mB z)W+}GxjhI&XADh!sB>l9CkY%vnZh@22*y#$1u2b6XWxKFy=)kMMy`2C_HE7?oSFAD z5}vj-((GIzZSnp)ZlL6E`PsvQ*8J%4sU7=2=-f0ojN(=`iPys<_ClGlPP3(CoC{;X zpT<0&6z>3-L$Q+DIazFwT)Ho{gvTv$voE(_O9!Zkq9IXP=0iu_=b6(~oA{U!_m*fP z)yaVadcuM2?=GHfa6Z>ONQk;F)eqQobCsRby-+$kO-(5ch_-+A!y&hp$sPag-z79r z8PTe+yRgF28d8*1qH!X+&{7$)U3RGEs9|GD;ri}DmzC+vEDGV_fI_ak3hpG24H`d= zkR0x2XY@(YQ4WVvptY&!PD`U{T_%=ghK{Dz%1Bn8ZeM=i4mz)oxMG74i__HUzqRz@ zp%(CUK4#yIm`5SyA>9n?o%5sYeiBWMXX~Ksm8=BSVqx&d$I6fGatL?LZ=&r<%|j;) z39GzU%;A`_!`#$S{?Wwx$ieASpZ++Sb>Oc8e{9OT=Y-`&Dkv z?Rhp9GEv&@%`0t}}j zD`X}Is`VF4$;+n|jup)BV2)8o>yszd9K>wdv<;@3yk{NG2jv0n#)3qJ5%1t)r#?6F zC4rZ%q6m*w7Xy0kZ_TXJjb2--B!QUixpN;~OY|AP@+fD$uXwgR{q%=3*hq1z7pWXV zxj_HIp2V90x&jpgih zz#`i1qW*qh+rXvOht21k(J3wPewk=CdGHq{JfwRQ*Fo1Z*w%)IGbFGFJWRKwRaDtn z7e1#6{2IasX4jX+Z5)T z()GScF2|!mgwN3TyBTLULY%=J^o-7B=WST?X=lwZ_=a1{rk<>E^zeCNJIund60vSh z(~!pXwl8x0qmX5zR*Us4DnklUr8{Ik{i-U#cI&%J9mCOxTnKqxtzy_vC=~>jhr=4p z7;Ss{RL(GzXsjI%4F?6~nUb@YjfA}%?SMD_2o=t0q3e_>M633E6>!1v zsf;PB`~=V6B4q+d%r+I^Z+jJx)CIz5r#IFs$kk7!LF=+DHReA#imoWu;xGZ*o|QV+ P_ujf%V9g43$Cv*P29?9R literal 0 HcmV?d00001 diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 6e7f64881..064391d9f 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -57,6 +57,8 @@ with the same filename but different name + + diff --git a/indra/newview/skins/default/xui/en-us/panel_login.xml b/indra/newview/skins/default/xui/en-us/panel_login.xml index 9a490a516..acaff50f6 100644 --- a/indra/newview/skins/default/xui/en-us/panel_login.xml +++ b/indra/newview/skins/default/xui/en-us/panel_login.xml @@ -80,6 +80,8 @@ + + + + + Script: + + + Associated with: + + + You can contribute: + + + Associate with: + + + + + + EasySit Animator 1.2.4 + + + Kyle's Superhero RPG + + + Yes + + + + + + You are not a contributor to any experiences. + + diff --git a/indra/newview/skins/default/xui/en-us/panel_toolbar.xml b/indra/newview/skins/default/xui/en-us/panel_toolbar.xml index 069b308b2..ac62af691 100644 --- a/indra/newview/skins/default/xui/en-us/panel_toolbar.xml +++ b/indra/newview/skins/default/xui/en-us/panel_toolbar.xml @@ -145,6 +145,16 @@ + + + + + + - - - - - - + + +