Merge remote-tracking branch 'Liru/master'
This commit is contained in:
@@ -47,6 +47,17 @@
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>IMNameSystem</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>For names in chat tabs. 0 = Old Style, 1 = Display Names and Username, 2 = Displayname only, 3 = Old Style (Display Name)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>S32</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>LandManagementNameSystem</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -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<LLComboBox>("chat_tabs_namesystem_combobox"))
|
||||
combo->setCurrentByIndex(mChatTabNames);
|
||||
if (combo = getChild<LLComboBox>("friends_namesystem_combobox"))
|
||||
combo->setCurrentByIndex(mFriendNames);
|
||||
if (combo = getChild<LLComboBox>("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);
|
||||
|
||||
@@ -87,6 +87,7 @@ private:
|
||||
bool mLegacyEndScroll;
|
||||
bool mItalicizeActions;
|
||||
bool mLegacyLogLaunch;
|
||||
S32 mChatTabNames;
|
||||
S32 mFriendNames;
|
||||
S32 mGroupMembersNames;
|
||||
S32 mLandManagementNames;
|
||||
|
||||
@@ -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<bool>::slot_t& slot)
|
||||
{
|
||||
return mSupportsExport.connect(slot);
|
||||
}
|
||||
|
||||
boost::signals2::connection LFSimFeatureHandler::setDestinationGuideURLCallback(const SignaledType<std::string>::slot_t& slot)
|
||||
{
|
||||
return mDestinationGuideURL.connect(slot);
|
||||
}
|
||||
|
||||
boost::signals2::connection LFSimFeatureHandler::setSearchURLCallback(const SignaledType<std::string>::slot_t& slot)
|
||||
{
|
||||
return mSearchURL.connect(slot);
|
||||
}
|
||||
|
||||
boost::signals2::connection LFSimFeatureHandler::setSayRangeCallback(const SignaledType<U32>::slot_t& slot)
|
||||
{
|
||||
return mSayRange.connect(slot);
|
||||
}
|
||||
|
||||
boost::signals2::connection LFSimFeatureHandler::setShoutRangeCallback(const SignaledType<U32>::slot_t& slot)
|
||||
{
|
||||
return mShoutRange.connect(slot);
|
||||
}
|
||||
|
||||
boost::signals2::connection LFSimFeatureHandler::setWhisperRangeCallback(const SignaledType<U32>::slot_t& slot)
|
||||
{
|
||||
return mWhisperRange.connect(slot);
|
||||
}
|
||||
|
||||
@@ -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<bool>::slot_t& slot);
|
||||
boost::signals2::connection setDestinationGuideURLCallback(const SignaledType<std::string>::slot_t& slot);
|
||||
boost::signals2::connection setSearchURLCallback(const SignaledType<std::string>::slot_t& slot);
|
||||
boost::signals2::connection setSayRangeCallback(const SignaledType<U32>::slot_t& slot);
|
||||
boost::signals2::connection setShoutRangeCallback(const SignaledType<U32>::slot_t& slot);
|
||||
boost::signals2::connection setWhisperRangeCallback(const SignaledType<U32>::slot_t& slot);
|
||||
boost::signals2::connection setSupportsExportCallback(const SignaledType<bool>::slot_t& slot) { return mSupportsExport.connect(slot); }
|
||||
boost::signals2::connection setDestinationGuideURLCallback(const SignaledType<std::string>::slot_t& slot) { return mDestinationGuideURL.connect(slot); }
|
||||
boost::signals2::connection setSearchURLCallback(const SignaledType<std::string>::slot_t& slot) { return mSearchURL.connect(slot); }
|
||||
boost::signals2::connection setSayRangeCallback(const SignaledType<U32>::slot_t& slot) { return mSayRange.connect(slot); }
|
||||
boost::signals2::connection setShoutRangeCallback(const SignaledType<U32>::slot_t& slot) { return mShoutRange.connect(slot); }
|
||||
boost::signals2::connection setWhisperRangeCallback(const SignaledType<U32>::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<std::string> mDestinationGuideURL;
|
||||
std::string mMapServerURL;
|
||||
SignaledType<std::string> mSearchURL;
|
||||
SignaledType<std::string> mGridName;
|
||||
SignaledType<U32> mSayRange;
|
||||
SignaledType<U32> mShoutRange;
|
||||
SignaledType<U32> mWhisperRange;
|
||||
|
||||
@@ -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<LLMultiFloater*>(getParent()))
|
||||
mf->updateFloaterTitle(this);
|
||||
}
|
||||
|
||||
LLFloaterIMPanel::~LLFloaterIMPanel()
|
||||
|
||||
@@ -92,6 +92,7 @@
|
||||
#include <iomanip>
|
||||
|
||||
#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<bool> show_channel("ShowSimChannel");
|
||||
|
||||
static const LLCachedControl<bool> 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
|
||||
|
||||
@@ -56,6 +56,13 @@
|
||||
<check_box bottom_delta="-20" follows="left|top" control_name="ShowLocalChatFloaterBar" label="Show chat bar in torn-off local chat floater" name="show_local_chat_floater_bar"/>
|
||||
<check_box bottom_delta="-20" control_name="ContactsUseHorizontalButtons" follows="top" height="16" label="Use horizontal buttons for contacts floater (Needs restart)" tool_tip="When enabled, the buttons on the Friends and Groups panels will be at the bottom, horizontally arranged, instead of vertically arranged on the right." name="horiz_butt"/>
|
||||
<text bottom_delta="-14" left="16" follows="top" name="namesystems_text_box">Format for names in lists of/for:</text>
|
||||
<text bottom_delta="-18" left="20" follows="top" name="chat_tabs_namesystem_text_box">Chat Tabs:</text>
|
||||
<combo_box bottom_delta="-5" left_delta="140" follows="top" height="18" control_name="IMNameSystem" name="chat_tabs_namesystem_combobox" width="130">
|
||||
<combo_item name="Old Names" value="0">Old Names</combo_item>
|
||||
<combo_item name="Display Names (with Username)" value="1">Display Names (w/Username)</combo_item>
|
||||
<combo_item name="Display Names only" value="2">Display Names only</combo_item>
|
||||
<combo_item name="Old Names (with Display Names)" value="3">Old Names (w/Display)</combo_item>
|
||||
</combo_box>
|
||||
<text bottom_delta="-18" left="20" follows="top" name="friends_namesystem_text_box">Friends:</text>
|
||||
<combo_box bottom_delta="-5" left_delta="140" follows="top" height="18" control_name="FriendNameSystem" name="friends_namesystem_combobox" width="130">
|
||||
<combo_item name="Old Names" value="0">Old Names</combo_item>
|
||||
|
||||
Reference in New Issue
Block a user