Disable close button on nearby chat. Fixed tab locking/unlocking.

master
kadah 2011-02-12 20:40:24 -08:00
parent b3d508e38c
commit 9da2557727
2 changed files with 22 additions and 3 deletions

View File

@ -92,6 +92,21 @@ void LLIMFloaterContainer::onOpen(const LLSD& key)
*/
}
void LLIMFloaterContainer::removeFloater(LLFloater* floaterp)
{
if (floaterp->getName() == "nearby_chat")
{
// only my friends floater now locked
mTabContainer->lockTabs(mTabContainer->getNumLockedTabs() - 1);
}
else if (floaterp->getName() == "imcontacts")
{
// only chat floater now locked
mTabContainer->lockTabs(mTabContainer->getNumLockedTabs() - 1);
}
LLMultiFloater::removeFloater(floaterp);
}
void LLIMFloaterContainer::addFloater(LLFloater* floaterp,
BOOL select_added_floater,
LLTabContainer::eInsertionPoint insertion_point)
@ -105,12 +120,15 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp,
return;
}
if (floaterp->getName() == "imcontacts")
if (floaterp->getName() == "imcontacts" || floaterp->getName() == "nearby_chat")
{
S32 num_locked_tabs = mTabContainer->getNumLockedTabs();
mTabContainer->unlockTabs();
// add contacts window as first tab
LLMultiFloater::addFloater(floaterp, select_added_floater, LLTabContainer::START);
if (floaterp->getName() == "imcontacts")
LLMultiFloater::addFloater(floaterp, select_added_floater, LLTabContainer::START);
else
LLMultiFloater::addFloater(floaterp, select_added_floater, LLTabContainer::RIGHT_OF_CURRENT);
// make sure first two tabs are now locked
mTabContainer->lockTabs(num_locked_tabs + 1);
//gSavedSettings.setBOOL("ContactsTornOff", FALSE);

View File

@ -46,7 +46,8 @@ public:
/*virtual*/ BOOL postBuild();
/*virtual*/ void onOpen(const LLSD& key);
void onCloseFloater(LLUUID& id);
/*virtual*/ void removeFloater(LLFloater* floaterp);
/*virtual*/ void addFloater(LLFloater* floaterp,
BOOL select_added_floater,
LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END);