summaryrefslogtreecommitdiff
path: root/indra/newview/llnavigationbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llnavigationbar.cpp')
-rw-r--r--indra/newview/llnavigationbar.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index cfe2e6bf6a..19dbbeb60e 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -58,6 +58,7 @@
#include "llweb.h"
#include "llhints.h"
+#include "llfloatersidepanelcontainer.h"
#include "llinventorymodel.h"
#include "lllandmarkactions.h"
@@ -290,6 +291,7 @@ BOOL LLNavigationBar::postBuild()
mBtnBack = getChild<LLPullButton>("back_btn");
mBtnForward = getChild<LLPullButton>("forward_btn");
mBtnHome = getChild<LLButton>("home_btn");
+ mBtnLandmarks = getChild<LLButton>("landmarks_btn");
mCmbLocation= getChild<LLLocationInputCtrl>("location_combo");
@@ -305,6 +307,8 @@ BOOL LLNavigationBar::postBuild()
mBtnHome->setClickedCallback(boost::bind(&LLNavigationBar::onHomeButtonClicked, this));
+ mBtnLandmarks->setClickedCallback(boost::bind(&LLNavigationBar::onLandmarksButtonClicked, this));
+
mCmbLocation->setCommitCallback(boost::bind(&LLNavigationBar::onLocationSelection, this));
mTeleportFinishConnection = LLViewerParcelMgr::getInstance()->
@@ -320,7 +324,7 @@ BOOL LLNavigationBar::postBuild()
LLTeleportHistory::getInstance()->setHistoryChangedCallback(
boost::bind(&LLNavigationBar::onTeleportHistoryChanged, this));
- LLHints::registerHintTarget("nav_bar", getHandle());
+ LLHints::getInstance()->registerHintTarget("nav_bar", getHandle());
mNavigationPanel = getChild<LLLayoutPanel>("navigation_layout_panel");
mFavoritePanel = getChild<LLLayoutPanel>("favorites_layout_panel");
@@ -401,6 +405,12 @@ void LLNavigationBar::onHomeButtonClicked()
gAgent.teleportHome();
}
+void LLNavigationBar::onLandmarksButtonClicked()
+{
+ LLFloaterReg::toggleInstanceOrBringToFront("places");
+ LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "open_landmark_tab"));
+}
+
void LLNavigationBar::onTeleportHistoryMenuItemClicked(const LLSD& userdata)
{
int idx = userdata.asInteger();