diff --git a/indra/newview/app_settings/settings_ascent.xml b/indra/newview/app_settings/settings_ascent.xml index 5d49b854c..41207d047 100644 --- a/indra/newview/app_settings/settings_ascent.xml +++ b/indra/newview/app_settings/settings_ascent.xml @@ -47,6 +47,17 @@ Value 1 + IMNameSystem + + Comment + For names in chat tabs. 0 = Old Style, 1 = Display Names and Username, 2 = Displayname only, 3 = Old Style (Display Name) + Persist + 1 + Type + S32 + Value + 0 + LandManagementNameSystem Comment diff --git a/indra/newview/ascentprefschat.cpp b/indra/newview/ascentprefschat.cpp index 8862d1604..c604a3260 100644 --- a/indra/newview/ascentprefschat.cpp +++ b/indra/newview/ascentprefschat.cpp @@ -265,6 +265,7 @@ void LLPrefsAscentChat::refreshValues() mLegacyEndScroll = gSavedSettings.getBOOL("LiruLegacyScrollToEnd"); mItalicizeActions = gSavedSettings.getBOOL("LiruItalicizeActions"); mLegacyLogLaunch = gSavedSettings.getBOOL("LiruLegacyLogLaunch"); + mChatTabNames = gSavedSettings.getS32("IMNameSystem"); mFriendNames = gSavedSettings.getS32("FriendNameSystem"); mGroupMembersNames = gSavedSettings.getS32("GroupMembersNameSystem"); mLandManagementNames = gSavedSettings.getS32("LandManagementNameSystem"); @@ -348,6 +349,8 @@ void LLPrefsAscentChat::refresh() } //Chat UI ----------------------------------------------------------------------------- + if (combo = getChild("chat_tabs_namesystem_combobox")) + combo->setCurrentByIndex(mChatTabNames); if (combo = getChild("friends_namesystem_combobox")) combo->setCurrentByIndex(mFriendNames); if (combo = getChild("group_members_namesystem_combobox")) @@ -501,6 +504,7 @@ void LLPrefsAscentChat::cancel() gSavedSettings.setBOOL("LiruLegacyScrollToEnd", mLegacyEndScroll); gSavedSettings.setBOOL("LiruItalicizeActions", mItalicizeActions); gSavedSettings.setBOOL("LiruLegacyLogLaunch", mLegacyLogLaunch); + gSavedSettings.setS32("IMNameSystem", mChatTabNames); gSavedSettings.setS32("FriendNameSystem", mFriendNames); gSavedSettings.setS32("GroupMembersNameSystem", mGroupMembersNames); gSavedSettings.setS32("LandManagementNameSystem", mLandManagementNames); diff --git a/indra/newview/ascentprefschat.h b/indra/newview/ascentprefschat.h index c04a2d297..709635d4f 100644 --- a/indra/newview/ascentprefschat.h +++ b/indra/newview/ascentprefschat.h @@ -87,6 +87,7 @@ private: bool mLegacyEndScroll; bool mItalicizeActions; bool mLegacyLogLaunch; + S32 mChatTabNames; S32 mFriendNames; S32 mGroupMembersNames; S32 mLandManagementNames; diff --git a/indra/newview/lfsimfeaturehandler.cpp b/indra/newview/lfsimfeaturehandler.cpp index e06fe5891..83b17125d 100644 --- a/indra/newview/lfsimfeaturehandler.cpp +++ b/indra/newview/lfsimfeaturehandler.cpp @@ -84,6 +84,11 @@ void LFSimFeatureHandler::setSupportedFeatures() has_feature_or_default(mDestinationGuideURL, extras, "destination-guide-url"); mMapServerURL = extras.has("map-server-url") ? extras["map-server-url"].asString() : ""; has_feature_or_default(mSearchURL, extras, "search-server-url"); + if (extras.has("GridName")) + { + const std::string& grid_name(extras["GridName"]); + mGridName = gHippoGridManager->getConnectedGrid()->getGridName() != grid_name ? grid_name : ""; + } } has_feature_or_default(mSayRange, extras, "say-range"); has_feature_or_default(mShoutRange, extras, "shout-range"); @@ -97,6 +102,7 @@ void LFSimFeatureHandler::setSupportedFeatures() mDestinationGuideURL.reset(); mMapServerURL = ""; mSearchURL.reset(); + mGridName.reset(); } mSayRange.reset(); mShoutRange.reset(); @@ -104,33 +110,3 @@ void LFSimFeatureHandler::setSupportedFeatures() } } } - -boost::signals2::connection LFSimFeatureHandler::setSupportsExportCallback(const SignaledType::slot_t& slot) -{ - return mSupportsExport.connect(slot); -} - -boost::signals2::connection LFSimFeatureHandler::setDestinationGuideURLCallback(const SignaledType::slot_t& slot) -{ - return mDestinationGuideURL.connect(slot); -} - -boost::signals2::connection LFSimFeatureHandler::setSearchURLCallback(const SignaledType::slot_t& slot) -{ - return mSearchURL.connect(slot); -} - -boost::signals2::connection LFSimFeatureHandler::setSayRangeCallback(const SignaledType::slot_t& slot) -{ - return mSayRange.connect(slot); -} - -boost::signals2::connection LFSimFeatureHandler::setShoutRangeCallback(const SignaledType::slot_t& slot) -{ - return mShoutRange.connect(slot); -} - -boost::signals2::connection LFSimFeatureHandler::setWhisperRangeCallback(const SignaledType::slot_t& slot) -{ - return mWhisperRange.connect(slot); -} diff --git a/indra/newview/lfsimfeaturehandler.h b/indra/newview/lfsimfeaturehandler.h index c1260d4cc..893edb5a0 100644 --- a/indra/newview/lfsimfeaturehandler.h +++ b/indra/newview/lfsimfeaturehandler.h @@ -41,6 +41,7 @@ public: return *this; } operator Type() const { return mValue; } + const Type& ref() const { return mValue; } void reset() { *this = mDefaultValue; } const Type& getDefault() const { return mDefaultValue; } @@ -61,18 +62,19 @@ public: void setSupportedFeatures(); // Connection setters - boost::signals2::connection setSupportsExportCallback(const SignaledType::slot_t& slot); - boost::signals2::connection setDestinationGuideURLCallback(const SignaledType::slot_t& slot); - boost::signals2::connection setSearchURLCallback(const SignaledType::slot_t& slot); - boost::signals2::connection setSayRangeCallback(const SignaledType::slot_t& slot); - boost::signals2::connection setShoutRangeCallback(const SignaledType::slot_t& slot); - boost::signals2::connection setWhisperRangeCallback(const SignaledType::slot_t& slot); + boost::signals2::connection setSupportsExportCallback(const SignaledType::slot_t& slot) { return mSupportsExport.connect(slot); } + boost::signals2::connection setDestinationGuideURLCallback(const SignaledType::slot_t& slot) { return mDestinationGuideURL.connect(slot); } + boost::signals2::connection setSearchURLCallback(const SignaledType::slot_t& slot) { return mSearchURL.connect(slot); } + boost::signals2::connection setSayRangeCallback(const SignaledType::slot_t& slot) { return mSayRange.connect(slot); } + boost::signals2::connection setShoutRangeCallback(const SignaledType::slot_t& slot) { return mShoutRange.connect(slot); } + boost::signals2::connection setWhisperRangeCallback(const SignaledType::slot_t& slot) { return mWhisperRange.connect(slot); } // Accessors bool simSupportsExport() const { return mSupportsExport; } std::string destinationGuideURL() const { return mDestinationGuideURL; } std::string mapServerURL() const { return mMapServerURL; } std::string searchURL() const { return mSearchURL; } + const std::string& gridName() const { return mGridName.ref(); } U32 sayRange() const { return mSayRange; } U32 shoutRange() const { return mShoutRange; } U32 whisperRange() const { return mWhisperRange; } @@ -84,6 +86,7 @@ private: SignaledType mDestinationGuideURL; std::string mMapServerURL; SignaledType mSearchURL; + SignaledType mGridName; SignaledType mSayRange; SignaledType mShoutRange; SignaledType mWhisperRange; diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index da0f11280..ccc13b61c 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -404,7 +404,17 @@ void LLFloaterIMPanel::onAvatarNameLookup(const LLAvatarName& avatar_name) std::string title; LLAvatarNameCache::getPNSName(avatar_name, title); setTitle(title); - // Singu Note: We could set tab name here, too now. + const S32& ns(gSavedSettings.getS32("IMNameSystem")); + LLAvatarNameCache::getPNSName(avatar_name, title, ns); + if (!ns || ns == 3) // Remove Resident, if applicable. + { + size_t pos(title.find(" Resident")); + if (pos != std::string::npos && !gSavedSettings.getBOOL("LiruShowLastNameResident")) + title.erase(pos, 9); + } + setShortTitle(title); + if (LLMultiFloater* mf = dynamic_cast(getParent())) + mf->updateFloaterTitle(this); } LLFloaterIMPanel::~LLFloaterIMPanel() diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 252ee313c..2d76ba707 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -92,6 +92,7 @@ #include #include "hippogridmanager.h" +#include "lfsimfeaturehandler.h" // [RLVa:KB] #include "rlvactions.h" @@ -528,48 +529,26 @@ void LLStatusBar::refresh() else mBuyLand->setVisible(false); std::string location_name; - if (region) + if (region && parcel) { - const LLVector3& agent_pos_region = gAgent.getPositionAgent(); - S32 pos_x = lltrunc( agent_pos_region.mV[VX] ); - S32 pos_y = lltrunc( agent_pos_region.mV[VY] ); - S32 pos_z = lltrunc( agent_pos_region.mV[VZ] ); - - // Round the numbers based on the velocity - LLVector3 agent_velocity = gAgent.getVelocity(); - F32 velocity_mag_sq = agent_velocity.magVecSquared(); - - const F32 FLY_CUTOFF = 6.f; // meters/sec - const F32 FLY_CUTOFF_SQ = FLY_CUTOFF * FLY_CUTOFF; - const F32 WALK_CUTOFF = 1.5f; // meters/sec - const F32 WALK_CUTOFF_SQ = WALK_CUTOFF * WALK_CUTOFF; - - if (velocity_mag_sq > FLY_CUTOFF_SQ) +// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | Modified: RLVa-1.0.0a + if (RlvActions::hasBehaviour(RLV_BHVR_SHOWLOC)) { - pos_x -= pos_x % 4; - pos_y -= pos_y % 4; - } - else if (velocity_mag_sq > WALK_CUTOFF_SQ) - { - pos_x -= pos_x % 2; - pos_y -= pos_y % 2; - } - - if (parcel) - { - if (!LLAgentUI::buildLocationString(location_name, LLAgentUI::LOCATION_FORMAT_FULL)) - { - location_name = "???"; - } + location_name = llformat("%s (%s) - %s", + RlvStrings::getString(RLV_STRING_HIDDEN_REGION).c_str(), region->getSimAccessString().c_str(), + RlvStrings::getString(RLV_STRING_HIDDEN).c_str()); } else +// [/RLVa:KB] + if (!LLAgentUI::buildLocationString(location_name, LLAgentUI::LOCATION_FORMAT_FULL)) + location_name = "???"; + else { - location_name = region->getName() - + llformat(" %d, %d, %d (%s)", - pos_x, pos_y, pos_z, - region->getSimAccessString().c_str()); + const std::string& grid(LFSimFeatureHandler::instance().gridName()); + if (!grid.empty()) location_name += ", " + grid; } - static LLCachedControl show_channel("ShowSimChannel"); + + static const LLCachedControl show_channel("ShowSimChannel"); if (show_channel && !gLastVersionChannel.empty()) location_name += " - " + gLastVersionChannel; } else @@ -578,15 +557,6 @@ void LLStatusBar::refresh() location_name = "(Unknown)"; } -// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | Modified: RLVa-1.0.0a - if ( (region) && (RlvActions::hasBehaviour(RLV_BHVR_SHOWLOC)) ) // region == NULL if we lose our connection to the grid - { - location_name = llformat("%s (%s) - %s", - RlvStrings::getString(RLV_STRING_HIDDEN_REGION).c_str(), region->getSimAccessString().c_str(), - RlvStrings::getString(RLV_STRING_HIDDEN).c_str()); - } -// [/RLVa:KB] - mTextParcelName->setText(location_name); // x = right edge diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_chat.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_chat.xml index 024f4d5e7..8199d3d8d 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_chat.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_chat.xml @@ -56,6 +56,13 @@ Format for names in lists of/for: + Chat Tabs: + + Old Names + Display Names (w/Username) + Display Names only + Old Names (w/Display) + Friends: Old Names