diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 49c1f9fbc6..938b666ecc 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -17483,5 +17483,18 @@ Change of this parameter will affect the layout of buttons in notification toast
3
+
+ FSNetMapDoubleClickAction
+
+
diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp
index 4039254f8a..3da1468852 100644
--- a/indra/newview/llfloatermap.cpp
+++ b/indra/newview/llfloatermap.cpp
@@ -85,14 +85,16 @@ LLFloaterMap::~LLFloaterMap()
BOOL LLFloaterMap::postBuild()
{
mMap = getChild("Net Map");
- if (gSavedSettings.getBOOL("DoubleClickTeleport"))
- {
- mMap->setToolTipMsg(getString("AltToolTipMsg"));
- }
- else if (gSavedSettings.getBOOL("DoubleClickShowWorldMap"))
- {
- mMap->setToolTipMsg(getString("ToolTipMsg"));
- }
+ // Synchronize tooltips throughout instances
+ //if (gSavedSettings.getBOOL("DoubleClickTeleport"))
+ //{
+ // mMap->setToolTipMsg(getString("AltToolTipMsg"));
+ //}
+ //else if (gSavedSettings.getBOOL("DoubleClickShowWorldMap"))
+ //{
+ // mMap->setToolTipMsg(getString("ToolTipMsg"));
+ //}
+ // Synchronize tooltips throughout instances
sendChildToBack(mMap);
mTextBoxNorth = getChild ("floater_map_north");
@@ -152,25 +154,28 @@ BOOL LLFloaterMap::handleDoubleClick(S32 x, S32 y, MASK mask)
LLVector3d pos_global = mMap->viewPosToGlobal(x, y);
- // If we're not tracking a beacon already, double-click will set one
- if (!LLTracker::isTracking(NULL))
- {
- LLFloaterWorldMap* world_map = LLFloaterWorldMap::getInstance();
- if (world_map)
- {
- world_map->trackLocation(pos_global);
- }
- }
-
- if (gSavedSettings.getBOOL("DoubleClickTeleport"))
- {
- // If DoubleClickTeleport is on, double clicking the minimap will teleport there
- gAgent.teleportViaLocationLookAt(pos_global);
- }
- else if (gSavedSettings.getBOOL("DoubleClickShowWorldMap"))
- {
- LLFloaterReg::showInstance("world_map");
- }
+ // Synchronize double click handling throughout instances
+ //// If we're not tracking a beacon already, double-click will set one
+ //if (!LLTracker::isTracking(NULL))
+ //{
+ // LLFloaterWorldMap* world_map = LLFloaterWorldMap::getInstance();
+ // if (world_map)
+ // {
+ // world_map->trackLocation(pos_global);
+ // }
+ //}
+ //
+ //if (gSavedSettings.getBOOL("DoubleClickTeleport"))
+ //{
+ // // If DoubleClickTeleport is on, double clicking the minimap will teleport there
+ // gAgent.teleportViaLocationLookAt(pos_global);
+ //}
+ //else if (gSavedSettings.getBOOL("DoubleClickShowWorldMap"))
+ //{
+ // LLFloaterReg::showInstance("world_map");
+ //}
+ mMap->performDoubleClickAction(pos_global);
+ // Synchronize double click handling throughout instances
return TRUE;
}
@@ -359,9 +364,9 @@ void LLFloaterMap::handleShowProfile()
mMap->showProfile();
}
-// Avatar tracking feature
+// Avatar tracking feature
void LLFloaterMap::handleStartTracking()
{
mMap->startTracking();
}
-// Avatar tracking feature
\ No newline at end of file
+// Avatar tracking feature
\ No newline at end of file
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index ab5469b719..eb6b4512c0 100644
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -95,8 +95,12 @@ const F64 COARSEUPDATE_MAX_Z = 1020.0f;
const F32 WIDTH_PIXELS = 2.f;
const S32 CIRCLE_STEPS = 100;
-std::map LLNetMap::sAvatarMarksMap; // Ansariel
-F32 LLNetMap::sScale; // Ansariel: Synchronizing netmaps throughout instances
+std::map LLNetMap::sAvatarMarksMap; //
+F32 LLNetMap::sScale; // Synchronizing netmaps throughout instances
+
+// Synchronize tooltips throughout instances
+std::string LLNetMap::sToolTipMsg;
+// Synchronize tooltips throughout instances
LLNetMap::LLNetMap (const Params & p)
: LLUICtrl (p),
@@ -116,7 +120,8 @@ LLNetMap::LLNetMap (const Params & p)
mObjectImagep(),
mClosestAgentToCursor(),
mClosestAgentAtLastRightClick(),
- mToolTipMsg(),
+ // Synchronize tooltips throughout instances
+ //mToolTipMsg(),
mPopupMenu(NULL)
{
mDotRadius = llmax(DOT_SCALE * mPixelsPerMeter, MIN_DOT_RADIUS);
@@ -125,10 +130,10 @@ LLNetMap::LLNetMap (const Params & p)
LLNetMap::~LLNetMap()
{
- // Fixing borked minimap zoom level persistance
+ // Fixing borked minimap zoom level persistance
//gSavedSettings.setF32("MiniMapScale", mScale);
gSavedSettings.setF32("MiniMapScale", sScale);
- // Fixing borked minimap zoom level persistance
+ // Fixing borked minimap zoom level persistance
}
BOOL LLNetMap::postBuild()
@@ -137,14 +142,17 @@ BOOL LLNetMap::postBuild()
registrar.add("Minimap.Zoom", boost::bind(&LLNetMap::handleZoom, this, _2));
registrar.add("Minimap.Tracker", boost::bind(&LLNetMap::handleStopTracking, this, _2));
- //
+ //
registrar.add("Minimap.Mark", boost::bind(&LLNetMap::handleMark, this, _2));
registrar.add("Minimap.ClearMarks", boost::bind(&LLNetMap::handleClearMarks, this));
- //
+ //
registrar.add("Minimap.Cam", boost::bind(&LLNetMap::handleCam, this));
registrar.add("Minimap.ShowProfile", boost::bind(&LLNetMap::handleShowProfile, this));
registrar.add("Minimap.StartTracking", boost::bind(&LLNetMap::handleStartTracking, this));
mPopupMenu = LLUICtrlFactory::getInstance()->createFromFile("menu_mini_map.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+
+ // Synchronize tooltips throughout instances
+ LLNetMap::updateToolTipMsg();
return TRUE;
}
@@ -153,7 +161,8 @@ void LLNetMap::setScale( F32 scale )
scale = llclamp(scale, MAP_SCALE_MIN, MAP_SCALE_MAX);
mCurPan *= scale / mScale;
mScale = scale;
- sScale = scale; // Ansariel: Synchronize scale throughout instances
+ // Synchronize scale throughout instances
+ sScale = scale;
if (mObjectImagep.notNull())
{
@@ -178,11 +187,12 @@ void LLNetMap::setScale( F32 scale )
void LLNetMap::draw()
{
- // Ansariel: Synchronize netmap scale throughout instances
+ // : Synchronize netmap scale throughout instances
if (mScale != sScale)
{
setScale(sScale);
}
+ // : Synchronize netmap scale throughout instances
static LLFrameTimer map_timer;
static LLUIColor map_avatar_color = LLUIColorTable::instance().getColor("MapAvatarColor", LLColor4::white);
@@ -421,11 +431,12 @@ void LLNetMap::draw()
if (muteListInstance->isMuted(uuid)) color = map_avatar_muted_color;
else if (gCacheName->getFullName(uuid, fullName) && muteListInstance->isLinden(fullName)) color = map_avatar_linden_color;
- // Mark Avatars with special colors - Ansariel
+ // Mark Avatars with special colors
if (LLNetMap::sAvatarMarksMap.find(uuid) != LLNetMap::sAvatarMarksMap.end())
{
color = LLNetMap::sAvatarMarksMap[uuid];
}
+ // Mark Avatars with special colors
//color based on contact sets prefs
if(LGGContactSets::getInstance()->hasFriendColorThatShouldShow(uuid,FALSE,FALSE,FALSE,TRUE))
@@ -746,7 +757,9 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, MASK mask )
// [RLVa:KB] - Checked: 2010-10-19 (RLVa-1.2.2b) | Modified: RLVa-1.2.2b
region_name = ((!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? region->getName() : RlvStrings::getString(RLV_STRING_HIDDEN_REGION));
// [/RLVa:KB]
- if (!region_name.empty())
+ // Synchronize tooltips throughout instances
+ //if (!region_name.empty())
+ if (!region_name.empty() && LLNetMap::sToolTipMsg != "[REGION]")
{
region_name += "\n";
}
@@ -754,7 +767,10 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, MASK mask )
// LLStringUtil::format_map_t args;
args["[REGION]"] = region_name;
- std::string msg = mToolTipMsg;
+ // Synchronize tooltips throughout instances
+ //std::string msg = mToolTipMsg;
+ std::string msg = LLNetMap::sToolTipMsg;
+ // Synchronize tooltips throughout instances
LLStringUtil::format(msg, args);
LLToolTipMgr::instance().show(LLToolTip::Params()
.message(msg)
@@ -832,7 +848,7 @@ BOOL LLNetMap::handleToolTipAgent(const LLUUID& avatar_id)
p.message(av_name.getCompleteName());
}
- // Ansariel: Get rid of the useless and clumsy I-button on the hovertip
+ // Get rid of the useless and clumsy I-button on the hovertip
//p.image.name("Inspector_I");
p.click_callback(boost::bind(showAvatarInspector, avatar_id));
p.visible_time_near(6.f);
@@ -982,9 +998,10 @@ void LLNetMap::createObjectImage()
memset( data, 0, img_size * img_size * 4 );
mObjectImagep = LLViewerTextureManager::getLocalTexture( mObjectRawImagep.get(), FALSE);
}
- // Ansariel: Synchronize scale throughout instances
+ // Synchronize scale throughout instances
//setScale(mScale);
setScale(sScale);
+ // Synchronize scale throughout instances
mUpdateNow = true;
}
@@ -1063,31 +1080,35 @@ BOOL LLNetMap::handleDoubleClick(S32 x, S32 y, MASK mask)
{
LLVector3d pos_global = viewPosToGlobal(x, y);
- bool double_click_teleport = gSavedSettings.getBOOL("DoubleClickTeleport");
- bool double_click_show_world_map = gSavedSettings.getBOOL("DoubleClickShowWorldMap");
+ // Synchronize double click handling throughout instances
+ //bool double_click_teleport = gSavedSettings.getBOOL("DoubleClickTeleport");
+ //bool double_click_show_world_map = gSavedSettings.getBOOL("DoubleClickShowWorldMap");
- if (double_click_teleport || double_click_show_world_map)
- {
- // If we're not tracking a beacon already, double-click will set one
- if (!LLTracker::isTracking(NULL))
- {
- LLFloaterWorldMap* world_map = LLFloaterWorldMap::getInstance();
- if (world_map)
- {
- world_map->trackLocation(pos_global);
- }
- }
- }
+ //if (double_click_teleport || double_click_show_world_map)
+ //{
+ // // If we're not tracking a beacon already, double-click will set one
+ // if (!LLTracker::isTracking(NULL))
+ // {
+ // LLFloaterWorldMap* world_map = LLFloaterWorldMap::getInstance();
+ // if (world_map)
+ // {
+ // world_map->trackLocation(pos_global);
+ // }
+ // }
+ //}
+
+ //if (double_click_teleport)
+ //{
+ // // If DoubleClickTeleport is on, double clicking the minimap will teleport there
+ // gAgent.teleportViaLocationLookAt(pos_global);
+ //}
+ //else if (double_click_show_world_map)
+ //{
+ // LLFloaterReg::showInstance("world_map");
+ //}
+ performDoubleClickAction(pos_global);
+ // Synchronize double click handling throughout instances
- if (double_click_teleport)
- {
- // If DoubleClickTeleport is on, double clicking the minimap will teleport there
- gAgent.teleportViaLocationLookAt(pos_global);
- }
- else if (double_click_show_world_map)
- {
- LLFloaterReg::showInstance("world_map");
- }
return TRUE;
}
@@ -1177,7 +1198,7 @@ void LLNetMap::handleStopTracking (const LLSD& userdata)
}
}
-// additional functions
+// additional functions
void LLNetMap::handleMark(const LLSD& userdata)
{
setAvatarMark(userdata);
@@ -1209,7 +1230,7 @@ void LLNetMap::clearAvatarMarks()
{
LLNetMap::sAvatarMarksMap.clear();
}
-//
+//
void LLNetMap::camAvatar()
{
@@ -1249,7 +1270,7 @@ void LLNetMap::handleShowProfile()
}
-// Avatar tracking feature
+// Avatar tracking feature
void LLNetMap::handleStartTracking()
{
startTracking();
@@ -1266,4 +1287,58 @@ void LLNetMap::startTracking()
}
}
}
-// Avatar tracking feature
\ No newline at end of file
+// Avatar tracking feature
+
+// Synchronize tooltips throughout instances
+// static
+void LLNetMap::updateToolTipMsg()
+{
+ S32 fsNetMapDoubleClickAction = gSavedSettings.getS32("FSNetMapDoubleClickAction");
+ switch (fsNetMapDoubleClickAction)
+ {
+ case 1:
+ LLNetMap::setToolTipMsg(LLTrans::getString("NetMapDoubleClickShowWorldMapToolTipMsg"));
+ break;
+ case 2:
+ LLNetMap::setToolTipMsg(LLTrans::getString("NetMapDoubleClickTeleportToolTipMsg"));
+ break;
+ default:
+ LLNetMap::setToolTipMsg(LLTrans::getString("NetMapDoubleClickNoActionToolTipMsg"));
+ break;
+ }
+}
+// Synchronize tooltips throughout instances
+
+// Synchronize double click handling throughout instances
+void LLNetMap::performDoubleClickAction(LLVector3d pos_global)
+{
+ S32 fsNetMapDoubleClickAction = gSavedSettings.getS32("FSNetMapDoubleClickAction");
+
+ // 1 = Double click show world map
+ // 2 = Double click teleport
+ if (fsNetMapDoubleClickAction == 1 || fsNetMapDoubleClickAction == 2)
+ {
+ // If we're not tracking a beacon already, double-click will set one
+ if (!LLTracker::isTracking(NULL))
+ {
+ LLFloaterWorldMap* world_map = LLFloaterWorldMap::getInstance();
+ if (world_map)
+ {
+ world_map->trackLocation(pos_global);
+ }
+ }
+ }
+
+ switch (fsNetMapDoubleClickAction)
+ {
+ case 1:
+ LLFloaterReg::showInstance("world_map");
+ break;
+ case 2:
+ gAgent.teleportViaLocationLookAt(pos_global);
+ break;
+ default:
+ break;
+ }
+}
+// Synchronize double click handling throughout instances
\ No newline at end of file
diff --git a/indra/newview/llnetmap.h b/indra/newview/llnetmap.h
index a5a4d7f910..1abe9a2f9f 100644
--- a/indra/newview/llnetmap.h
+++ b/indra/newview/llnetmap.h
@@ -80,11 +80,18 @@ public:
/*virtual*/ BOOL handleDoubleClick( S32 x, S32 y, MASK mask );
void setScale( F32 scale );
- void setToolTipMsg(const std::string& msg) { mToolTipMsg = msg; }
+ // Synchronize tooltips throughout instances
+ //void setToolTipMsg(const std::string& msg) { mToolTipMsg = msg; }
+ static void setToolTipMsg(const std::string& msg) { sToolTipMsg = msg; }
+ static void updateToolTipMsg();
+ // Synchronize tooltips throughout instances
void renderScaledPointGlobal( const LLVector3d& pos, const LLColor4U &color, F32 radius );
LLVector3d viewPosToGlobal(S32 x,S32 y);
LLUUID getClosestAgentAtLastRightClick() const { return mClosestAgentAtLastRightClick; }
+ // Synchronize double click handling throughout instances
+ void performDoubleClickAction(LLVector3d pos_global);
+
private:
const LLVector3d& getObjectImageCenterGlobal() { return mObjectImageCenterGlobal; }
void renderPoint(const LLVector3 &pos, const LLColor4U &color,
@@ -109,7 +116,7 @@ private:
LLUIColor mBackgroundColor;
F32 mScale; // Size of a region in pixels
- static F32 sScale; // Ansariel: Used to synchronize netmaps throughout instances
+ static F32 sScale; // Used to synchronize netmaps throughout instances
F32 mPixelsPerMeter; // world meters to map pixels
F32 mObjectMapTPM; // texels per meter on map
@@ -132,7 +139,10 @@ private:
LLVector3d mClosestAgentPosition;
LLVector3d mClosestAgentAtLastRightClickPos;
- std::string mToolTipMsg;
+ // Synchronize tooltips throughout instances
+ //std::string mToolTipMsg;
+ static std::string sToolTipMsg;
+ // Synchronize tooltips throughout instances
static std::map sAvatarMarksMap;
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 7f148bda36..227097ecaf 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -623,8 +623,10 @@ BOOL LLPanelPeople::postBuild()
LLLayoutPanel* minilayout = (LLLayoutPanel*)getChildView("minimaplayout",true);
minilayout->setMinDim(140);
mMiniMap = (LLNetMap*)getChildView("Net Map",true);
- mMiniMap->setToolTipMsg(gSavedSettings.getBOOL("DoubleClickTeleport") ?
- getString("AltMiniMapToolTipMsg") : getString("MiniMapToolTipMsg"));
+ // Synchronize tooltips throughout instances
+ //mMiniMap->setToolTipMsg(gSavedSettings.getBOOL("DoubleClickTeleport") ?
+ // getString("AltMiniMapToolTipMsg") : getString("MiniMapToolTipMsg"));
+ // /FS:Ansariel> Synchronize tooltips throughout instances
gSavedSettings.getControl("LimitRadarByRange")->getCommitSignal()->connect(boost::bind(&LLPanelPeople::handleLimitRadarByRange, this, _2));
mRecentList = getChild(RECENT_TAB_NAME)->getChild("avatar_list");
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index e5cedd5b49..5771df98c9 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -82,6 +82,7 @@
// NaCl - Antispam Registry
#include "NACLantispam.h"
// NaCl End
+#include "llnetmap.h"
#ifdef TOGGLE_HACKED_GODLIKE_VIEWER
BOOL gHackGodmode = FALSE;
@@ -686,6 +687,13 @@ static void handleAutohideChatbarChanged(const LLSD& new_value)
}
//
+// Synchronize tooltips throughout instances
+static void handleNetMapDoubleClickActionChanged()
+{
+ LLNetMap::updateToolTipMsg();
+}
+// Synchronize tooltips throughout instances
+
////////////////////////////////////////////////////////////////////////////
void settings_setup_listeners()
@@ -867,6 +875,9 @@ void settings_setup_listeners()
gSavedSettings.getControl("_NACL_AntiSpamAmount")->getSignal()->connect(boost::bind(&handleNaclAntiSpamAmountChanged, _2));
// NaCl End
gSavedSettings.getControl("AutohideChatBar")->getSignal()->connect(boost::bind(&handleAutohideChatbarChanged, _2));
+
+ // Synchronize tooltips throughout instances
+ gSavedSettings.getControl("FSNetMapDoubleClickAction")->getSignal()->connect(boost::bind(&handleNetMapDoubleClickActionChanged));
}
#if TEST_CACHED_CONTROL
diff --git a/indra/newview/skins/default/xui/de/floater_map.xml b/indra/newview/skins/default/xui/de/floater_map.xml
index 437a1d11e6..72aaeb87b2 100644
--- a/indra/newview/skins/default/xui/de/floater_map.xml
+++ b/indra/newview/skins/default/xui/de/floater_map.xml
@@ -1,10 +1,10 @@
- [REGION](Doppelklicken, um Karte zu öffnen; Umschalt-Taste gedrückt halten und ziehen, um zu schwenken)
+ [AGENT][REGION] (Doppelklicken, um Karte zu öffnen; Umschalt-Taste gedrückt halten und ziehen, um zu schwenken)
- [REGION](Doppelklicken, um zu teleportieren; Umschalt-Taste gedrückt halten und ziehen, um zu schwenken)
+ [REGION] (Doppelklicken, um zu teleportieren; Umschalt-Taste gedrückt halten und ziehen, um zu schwenken)
Minikarte
diff --git a/indra/newview/skins/default/xui/de/panel_preferences_move.xml b/indra/newview/skins/default/xui/de/panel_preferences_move.xml
index 205c3d79a6..1f09417e03 100644
--- a/indra/newview/skins/default/xui/de/panel_preferences_move.xml
+++ b/indra/newview/skins/default/xui/de/panel_preferences_move.xml
@@ -67,6 +67,14 @@
+
+ Doppelklick auf Minikarte:
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml
index 7f9e836fea..51832db918 100644
--- a/indra/newview/skins/default/xui/de/strings.xml
+++ b/indra/newview/skins/default/xui/de/strings.xml
@@ -5273,4 +5273,16 @@ Setzen Sie den Editorpfad in Anführungszeichen
Maximale Bandbreite gesetzt auf: [VALUE] kbit/s.
+
+
+
+ [AGENT][REGION] (Doppelklicken, um Karte zu öffnen; Umschalt-Taste gedrückt halten und ziehen, um zu schwenken)
+
+
+ [REGION] (Doppelklicken, um zu teleportieren; Umschalt-Taste gedrückt halten und ziehen, um zu schwenken)
+
+
+ [REGION]
+
+
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_move.xml b/indra/newview/skins/default/xui/en/panel_preferences_move.xml
index 4032728f38..fab3f0b006 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_move.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_move.xml
@@ -520,13 +520,48 @@
top_pad="0"
height="20"
width="350" />
+
+
+ Double click on Minimap:
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 7db3b0628b..7e8737dde5 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -4034,4 +4034,10 @@ Try enclosing path to the editor with double quotes.
Maximum Bandwidth Set To: [VALUE] kbps.
+
+
+ [AGENT][REGION] (Double-click to open Map, shift-drag to pan)
+ [REGION] (Double-click to teleport, shift-drag to pan)
+ [REGION]
+