Commits

leslie_linden committed c891c28

* 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.

Comments (0)

Files changed (3)

indra/newview/lltoolbarview.cpp

 
 #include "lltoolbarview.h"
 
+#include "llappviewer.h"
 #include "lldir.h"
 #include "llxmlnode.h"
 #include "lltoolbar.h"
 #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);
 	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;
 }
 
 	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");
+	}
+}
+

indra/newview/skins/default/xui/en/floater_avatar.xml

 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <floater
+ open_positioning="cascading"
+ ignore_ui_scale="false"
  legacy_header_height="225"
  can_minimize="true"
  can_close="true"
  single_instance="true"
  help_topic="avatar"
  save_rect="true"
+ save_visibility="true"
  title="AVATAR PICKER"
  width="635">
     <web_browser

indra/newview/skins/default/xui/en/floater_destinations.xml

 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <floater
  open_positioning="cascading"
+ ignore_ui_scale="false"
  legacy_header_height="225"
  can_minimize="true"
  can_close="true"
  single_instance="true"
  help_topic="destinations"
  save_rect="true"
+ save_visibility="true"
  title="DESTINATIONS"
  width="840">
     <web_browser