Proposed fix for FIRE-1091 - There was an error with IM windows getting torn off instead of the contacts floater due to a naming mix-up.
parent
52b9f421ac
commit
b466cdbee3
|
|
@ -44,8 +44,10 @@
|
|||
#include "llfriendcard.h"
|
||||
#include "llgroupactions.h"
|
||||
#include "llgrouplist.h"
|
||||
#include "llimfloatercontainer.h"
|
||||
#include "llsidetray.h"
|
||||
#include "llstartup.h"
|
||||
#include "llviewercontrol.h"
|
||||
|
||||
static const std::string FRIENDS_TAB_NAME = "friends_panel";
|
||||
static const std::string GROUP_TAB_NAME = "groups_panel";
|
||||
|
|
@ -153,6 +155,19 @@ void FSFloaterContacts::updateButtons()
|
|||
|
||||
void FSFloaterContacts::onOpen(const LLSD& key)
|
||||
{
|
||||
if (gSavedSettings.getBOOL("ContactsTornOff"))
|
||||
{
|
||||
LLIMFloaterContainer* floater_container = LLIMFloaterContainer::getInstance();
|
||||
// first set the tear-off host to the conversations container
|
||||
setHost(floater_container);
|
||||
// clear the tear-off host right after, the "last host used" will still stick
|
||||
setHost(NULL);
|
||||
// reparent to floater view
|
||||
gFloaterView->addChild(this);
|
||||
// and remember we are torn off
|
||||
setTornOff(TRUE);
|
||||
}
|
||||
|
||||
if (key.asString() == "friends")
|
||||
{
|
||||
childShowTab("friends_and_groups", "friends_panel");
|
||||
|
|
|
|||
|
|
@ -899,19 +899,8 @@ LLIMFloater* LLIMFloater::show(const LLUUID& session_id)
|
|||
{
|
||||
LLIMFloaterContainer* floater_container = LLIMFloaterContainer::getInstance();
|
||||
|
||||
if (gSavedSettings.getBOOL("ContactsTornOff"))
|
||||
{
|
||||
// first set the tear-off host to the conversations container
|
||||
floater->setHost(floater_container);
|
||||
// clear the tear-off host right after, the "last host used" will still stick
|
||||
floater->setHost(NULL);
|
||||
// reparent to floater view
|
||||
gFloaterView->addChild(floater);
|
||||
// and remember we are torn off
|
||||
floater->setTornOff(TRUE);
|
||||
}
|
||||
// do not add existed floaters to avoid adding torn off instances
|
||||
else if (!exist)
|
||||
if (!exist)
|
||||
{
|
||||
// LLTabContainer::eInsertionPoint i_pt = user_initiated ? LLTabContainer::RIGHT_OF_CURRENT : LLTabContainer::END;
|
||||
// TODO: mantipov: use LLTabContainer::RIGHT_OF_CURRENT if it exists
|
||||
|
|
|
|||
Loading…
Reference in New Issue