diff options
-rw-r--r-- | indra/llmessage/llavatarname.cpp | 6 | ||||
-rw-r--r-- | indra/llmessage/llavatarname.h | 2 | ||||
-rw-r--r-- | indra/llui/llurlentry.cpp | 16 | ||||
-rw-r--r-- | indra/llui/llurlentry.h | 8 | ||||
-rw-r--r-- | indra/llui/llurlregistry.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llfloaterimnearbychat.cpp | 7 |
6 files changed, 36 insertions, 4 deletions
diff --git a/indra/llmessage/llavatarname.cpp b/indra/llmessage/llavatarname.cpp index 2e8886fb51..7e1246f885 100644 --- a/indra/llmessage/llavatarname.cpp +++ b/indra/llmessage/llavatarname.cpp @@ -166,10 +166,10 @@ void LLAvatarName::setExpires(F64 expires) mExpires = LLFrameTimer::getTotalSeconds() + expires; } -std::string LLAvatarName::getCompleteName(bool use_parentheses, bool force_use_display_name) const +std::string LLAvatarName::getCompleteName(bool use_parentheses, bool force_use_complete_name) const { std::string name; - if (sUseDisplayNames || force_use_display_name) + if (sUseDisplayNames || force_use_complete_name) { if (mUsername.empty() || mIsDisplayNameDefault) { @@ -180,7 +180,7 @@ std::string LLAvatarName::getCompleteName(bool use_parentheses, bool force_use_d else { name = mDisplayName; - if(sUseUsernames) + if(sUseUsernames || force_use_complete_name) { if(use_parentheses) { diff --git a/indra/llmessage/llavatarname.h b/indra/llmessage/llavatarname.h index 80b54cded9..20f7140797 100644 --- a/indra/llmessage/llavatarname.h +++ b/indra/llmessage/llavatarname.h @@ -65,7 +65,7 @@ public: // For normal names, returns "James Linden (james.linden)" // When display names are disabled returns just "James Linden" - std::string getCompleteName(bool use_parentheses = true, bool force_use_display_name = false) const; + std::string getCompleteName(bool use_parentheses = true, bool force_use_complete_name = false) const; // Returns "James Linden" or "bobsmith123 Resident" for backwards // compatibility with systems like voice and muting diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 05b7a4a9e9..b211829496 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -768,6 +768,22 @@ std::string LLUrlEntryAgentCompleteName::getName(const LLAvatarName& avatar_name } // +// LLUrlEntryAgentLegacyName describes a Second Life agent legacy name Url, e.g., +// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/legacyname +// x-grid-location-info://lincoln.lindenlab.com/app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/legacyname +// +LLUrlEntryAgentLegacyName::LLUrlEntryAgentLegacyName() +{ + mPattern = boost::regex(APP_HEADER_REGEX "/agent/[\\da-f-]+/legacyname", + boost::regex::perl|boost::regex::icase); +} + +std::string LLUrlEntryAgentLegacyName::getName(const LLAvatarName& avatar_name) +{ + return avatar_name.getLegacyName(); +} + +// // LLUrlEntryAgentDisplayName describes a Second Life agent display name Url, e.g., // secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/displayname // x-grid-location-info://lincoln.lindenlab.com/app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/displayname diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h index 413c20a657..28e9931718 100644 --- a/indra/llui/llurlentry.h +++ b/indra/llui/llurlentry.h @@ -269,6 +269,14 @@ private: /*virtual*/ std::string getName(const LLAvatarName& avatar_name); }; +class LLUrlEntryAgentLegacyName : public LLUrlEntryAgentName +{ +public: + LLUrlEntryAgentLegacyName(); +private: + /*virtual*/ std::string getName(const LLAvatarName& avatar_name); +}; + /// /// LLUrlEntryAgentDisplayName Describes a Second Life agent display name Url, e.g., /// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/displayname diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index 23c6d5a954..fa6593267a 100644 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -57,6 +57,7 @@ LLUrlRegistry::LLUrlRegistry() mUrlEntryHTTPLabel = new LLUrlEntryHTTPLabel(); registerUrl(mUrlEntryHTTPLabel); registerUrl(new LLUrlEntryAgentCompleteName()); + registerUrl(new LLUrlEntryAgentLegacyName()); registerUrl(new LLUrlEntryAgentDisplayName()); registerUrl(new LLUrlEntryAgentUserName()); // LLUrlEntryAgent*Name must appear before LLUrlEntryAgent since diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index 257b39a7dd..7d0ff22ed3 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -304,6 +304,13 @@ void LLFloaterIMNearbyChat::onClose(bool app_quitting) { // Override LLFloaterIMSessionTab::onClose() so that Nearby Chat is not removed from the conversation floater LLFloaterIMSessionTab::restoreFloater(); + if (app_quitting) + { + // We are starting and closing floater in "expanded" state + // Update expanded (restored) rect and position for use in next session + forceReshape(); + storeRectControl(); + } } // virtual |