summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolbarview.cpp
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-10-20 15:48:25 -0700
committerLeslie Linden <leslie@lindenlab.com>2011-10-20 15:48:25 -0700
commitb65ad565c9f3a702408e1bd12e7df2ccaf3dd03e (patch)
treee12300bd438e4aa565651f3e4ce4a2587fec4b79 /indra/newview/lltoolbarview.cpp
parent6998c5ebc7aad43d44f1bb6e42e20503c2ff144f (diff)
* Changed destination guide to open by default in the top left on first login
* Made the avatar pickers and destinations guide properly stack and position themselves. Reviewed by Richard.
Diffstat (limited to 'indra/newview/lltoolbarview.cpp')
-rw-r--r--indra/newview/lltoolbarview.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index 67ac081581..619d17efad 100644
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -29,6 +29,7 @@
#include "lltoolbarview.h"
+#include "llappviewer.h"
#include "lldir.h"
#include "llxmlnode.h"
#include "lltoolbar.h"
@@ -36,12 +37,18 @@
#include "lltooldraganddrop.h"
#include "llclipboard.h"
+#include "llagent.h" // HACK for destinations guide on startup
+#include "llfloaterreg.h" // HACK for destinations guide on startup
+#include "llviewercontrol.h" // HACK for destinations guide on startup
+
#include <boost/foreach.hpp>
LLToolBarView* gToolBarView = NULL;
static LLDefaultChildRegistry::Register<LLToolBarView> r("toolbar_view");
+void handleLoginToolbarSetup();
+
bool isToolDragged()
{
return (LLToolDragAndDrop::getInstance()->getSource() == LLToolDragAndDrop::SOURCE_VIEWER);
@@ -97,6 +104,8 @@ BOOL LLToolBarView::postBuild()
mToolbarBottom->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
mToolbarBottom->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
mToolbarBottom->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
+
+ LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&handleLoginToolbarSetup));
return TRUE;
}
@@ -466,3 +475,18 @@ bool LLToolBarView::isModified() const
return modified;
}
+
+
+//
+// HACK to bring up destinations guide at startup
+//
+
+void handleLoginToolbarSetup()
+{
+ // Open the destinations guide by default on first login, per Rhett
+ if (gSavedSettings.getBOOL("FirstLoginThisInstall") || gAgent.isFirstLogin())
+ {
+ LLFloaterReg::showInstance("destinations");
+ }
+}
+