summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatermap.cpp
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2011-03-23 01:26:03 +0000
committerDon Kjer <don@lindenlab.com>2011-03-23 01:26:03 +0000
commit1e0608ff51efc69a14010f2ce5dba3acabe16e49 (patch)
tree326e829b4233658ba8698e06ff17267618e93a62 /indra/newview/llfloatermap.cpp
parentbecc9d09970755f9cc0d95c46b9f2d81d5b856b5 (diff)
parente4a4d75104916968ce03337094b1194e0daff438 (diff)
Merge with viewer-development
Diffstat (limited to 'indra/newview/llfloatermap.cpp')
-rw-r--r--indra/newview/llfloatermap.cpp49
1 files changed, 9 insertions, 40 deletions
diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp
index 80920c80d6..641e64247b 100644
--- a/indra/newview/llfloatermap.cpp
+++ b/indra/newview/llfloatermap.cpp
@@ -42,7 +42,6 @@
#include "llviewercamera.h"
#include "lldraghandle.h"
#include "lltextbox.h"
-#include "llviewermenu.h"
#include "llfloaterworldmap.h"
#include "llagent.h"
@@ -63,7 +62,6 @@ const S32 MAP_PADDING_BOTTOM = 0;
LLFloaterMap::LLFloaterMap(const LLSD& key)
: LLFloater(key),
- mPopupMenu(NULL),
mTextBoxEast(NULL),
mTextBoxNorth(NULL),
mTextBoxWest(NULL),
@@ -83,8 +81,14 @@ LLFloaterMap::~LLFloaterMap()
BOOL LLFloaterMap::postBuild()
{
mMap = getChild<LLNetMap>("Net Map");
- mMap->setToolTipMsg(gSavedSettings.getBOOL("DoubleClickTeleport") ?
- getString("AltToolTipMsg") : getString("ToolTipMsg"));
+ if (gSavedSettings.getBOOL("DoubleClickTeleport"))
+ {
+ mMap->setToolTipMsg(getString("AltToolTipMsg"));
+ }
+ else if (gSavedSettings.getBOOL("DoubleClickShowWorldMap"))
+ {
+ mMap->setToolTipMsg(getString("ToolTipMsg"));
+ }
sendChildToBack(mMap);
mTextBoxNorth = getChild<LLTextBox> ("floater_map_north");
@@ -96,17 +100,6 @@ BOOL LLFloaterMap::postBuild()
mTextBoxSouthWest = getChild<LLTextBox> ("floater_map_southwest");
mTextBoxNorthWest = getChild<LLTextBox> ("floater_map_northwest");
- LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
-
- registrar.add("Minimap.Zoom", boost::bind(&LLFloaterMap::handleZoom, this, _2));
- registrar.add("Minimap.Tracker", boost::bind(&LLFloaterMap::handleStopTracking, this, _2));
-
- mPopupMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_mini_map.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
- if (mPopupMenu && !LLTracker::isTracking(0))
- {
- mPopupMenu->setItemEnabled ("Stop Tracking", false);
- }
-
stretchMiniMap(getRect().getWidth() - MAP_PADDING_LEFT - MAP_PADDING_RIGHT
,getRect().getHeight() - MAP_PADDING_TOP - MAP_PADDING_BOTTOM);
@@ -150,24 +143,13 @@ BOOL LLFloaterMap::handleDoubleClick(S32 x, S32 y, MASK mask)
// If DoubleClickTeleport is on, double clicking the minimap will teleport there
gAgent.teleportViaLocationLookAt(pos_global);
}
- else
+ else if (gSavedSettings.getBOOL("DoubleClickShowWorldMap"))
{
LLFloaterReg::showInstance("world_map");
}
return TRUE;
}
-BOOL LLFloaterMap::handleRightMouseDown(S32 x, S32 y, MASK mask)
-{
- if (mPopupMenu)
- {
- mPopupMenu->buildDrawLabels();
- mPopupMenu->updateParent(LLMenuGL::sMenuContainer);
- LLMenuGL::showPopup(this, mPopupMenu, x, y);
- }
- return TRUE;
-}
-
void LLFloaterMap::setDirectionPos( LLTextBox* text_box, F32 rotation )
{
// Rotation is in radians.
@@ -238,11 +220,6 @@ void LLFloaterMap::draw()
getDragHandle()->setMouseOpaque(TRUE);
}
- if (LLTracker::isTracking(0))
- {
- mPopupMenu->setItemEnabled ("Stop Tracking", true);
- }
-
LLFloater::draw();
}
@@ -309,14 +286,6 @@ void LLFloaterMap::handleZoom(const LLSD& userdata)
}
}
-void LLFloaterMap::handleStopTracking (const LLSD& userdata)
-{
- if (mPopupMenu)
- {
- mPopupMenu->setItemEnabled ("Stop Tracking", false);
- LLTracker::stopTracking ((void*)LLTracker::isTracking(NULL));
- }
-}
void LLFloaterMap::setMinimized(BOOL b)
{
LLFloater::setMinimized(b);