Fixed nearby chat coming up empty when hosted on login.

ziree 2012-02-10 16:03:43 +01:00
parent 72669f4475
commit ea4e0feac5
2 changed files with 19 additions and 23 deletions

View File

@ -170,29 +170,6 @@ BOOL LLFloaterNearbyChat::postBuild()
slide_left->setVisible(false);
LLButton* slide_right = getChild<LLButton>("slide_right_btn");
slide_right->setVisible(false);
if (getDockControl() == NULL)
{
LLIMFloaterContainer* floater_container = LLIMFloaterContainer::getInstance();
if (floater_container)
{
if (gSavedSettings.getBOOL("ChatHistoryTornOff"))
{
// first set the tear-off host to this floater
setHost(floater_container);
// clear the tear-off host right after, the "last host used" will still stick
setHost(NULL);
// reparent the floater to the main view
gFloaterView->addChild(this);
}
else
{
floater_container->addFloater(this, FALSE);
}
floater_container->setVisible(FALSE);
}
}
FSUseNearbyChatConsole = gSavedSettings.getBOOL("FSUseNearbyChatConsole");
gSavedSettings.getControl("FSUseNearbyChatConsole")->getSignal()->connect(boost::bind(&LLFloaterNearbyChat::updateFSUseNearbyChatConsole, this, _2));
@ -405,6 +382,24 @@ void LLFloaterNearbyChat::setVisible(BOOL visible)
void LLFloaterNearbyChat::onOpen(const LLSD& key )
{
LLIMFloaterContainer* floater_container = LLIMFloaterContainer::getInstance();
if (floater_container)
{
if (gSavedSettings.getBOOL("ChatHistoryTornOff"))
{
// first set the tear-off host to this floater
setHost(floater_container);
// clear the tear-off host right after, the "last host used" will still stick
setHost(NULL);
// reparent the floater to the main view
gFloaterView->addChild(this);
}
else
{
floater_container->addFloater(this, FALSE);
}
}
// We override this to put nearbychat in the IM floater. -AO
if(isChatMultiTab() && ! isVisible(this))
{

View File

@ -13,6 +13,7 @@
can_dock="false"
can_close="true"
can_minimize="false"
can_tear_off="true"
single_instance="true"
save_rect="true"
save_visibility="true"