summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimsessiontab.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2013-03-13 19:09:00 -0400
committerOz Linden <oz@lindenlab.com>2013-03-13 19:09:00 -0400
commitbf95c1cae7a84d1a97dacd8ea7f1b6af8be067a9 (patch)
tree85a0f5fef2af8276cf99388a46193624838dfb6b /indra/newview/llfloaterimsessiontab.cpp
parentd348deb7049cbaef7c228000525c7ee5a265464c (diff)
parent04e78ce4fdd3bbc0e4daa1daabbff2de1c425601 (diff)
merge changes for 3.5.0-beta3
Diffstat (limited to 'indra/newview/llfloaterimsessiontab.cpp')
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp31
1 files changed, 20 insertions, 11 deletions
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index d3fcfbbc56..9fd22b1537 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -61,6 +61,7 @@ LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id)
, mRefreshTimer(new LLTimer())
, mIsHostAttached(false)
, mHasVisibleBeenInitialized(false)
+ , mIsParticipantListExpanded(true)
{
setAutoFocus(FALSE);
mSession = LLIMModel::getInstance()->findIMSession(mSessionID);
@@ -180,6 +181,7 @@ void LLFloaterIMSessionTab::addToHost(const LLUUID& session_id)
// LLFloater::mLastHostHandle = floater_container (a "future" host)
conversp->setHost(floater_container);
conversp->setHost(NULL);
+
conversp->forceReshape();
}
// Added floaters share some state (like sort order) with their host
@@ -253,6 +255,7 @@ BOOL LLFloaterIMSessionTab::postBuild()
p.root = NULL;
p.use_ellipses = true;
p.options_menu = "menu_conversation.xml";
+ p.name = "root";
mConversationsRoot = LLUICtrlFactory::create<LLFolderView>(p);
mConversationsRoot->setCallbackRegistrar(&mCommitCallbackRegistrar);
// Attach that root to the scroller
@@ -268,6 +271,12 @@ BOOL LLFloaterIMSessionTab::postBuild()
mRefreshTimer->setTimerExpirySec(0);
mRefreshTimer->start();
initBtns();
+
+ if (mIsParticipantListExpanded != (bool)gSavedSettings.getBOOL("IMShowControlPanel"))
+ {
+ LLFloaterIMSessionTab::onSlide(this);
+ }
+
return result;
}
@@ -324,13 +333,6 @@ void LLFloaterIMSessionTab::onFocusReceived()
}
LLTransientDockableFloater::onFocusReceived();
-
- LLFloaterIMContainer* container = LLFloaterReg::findTypedInstance<LLFloaterIMContainer>("im_container");
- if (container)
- {
- container->selectConversationPair(mSessionID, true);
- container->showStub(! getHost());
- }
}
void LLFloaterIMSessionTab::onFocusLost()
@@ -644,7 +646,7 @@ void LLFloaterIMSessionTab::updateHeaderAndToolbar()
// Participant list should be visible only in torn off floaters.
bool is_participant_list_visible =
!is_not_torn_off
- && gSavedSettings.getBOOL("IMShowControlPanel")
+ && mIsParticipantListExpanded
&& !mIsP2PChat;
mParticipantListPanel->setVisible(is_participant_list_visible);
@@ -775,9 +777,8 @@ void LLFloaterIMSessionTab::onSlide(LLFloaterIMSessionTab* self)
// Expand/collapse the IM control panel
self->mParticipantListPanel->setVisible(expand);
-
- gSavedSettings.setBOOL("IMShowControlPanel", expand);
-
+ gSavedSettings.setBOOL("IMShowControlPanel", expand);
+ self->mIsParticipantListExpanded = expand;
self->mExpandCollapseBtn->setImageOverlay(self->getString(expand ? "collapse_icon" : "expand_icon"));
}
}
@@ -801,10 +802,18 @@ void LLFloaterIMSessionTab::onTearOffClicked()
mSaveRect = isTornOff();
initRectControl();
LLFloater::onClickTearOff(this);
+ LLFloaterIMContainer* container = LLFloaterReg::findTypedInstance<LLFloaterIMContainer>("im_container");
+
if (isTornOff())
{
+ container->selectAdjacentConversation(false);
forceReshape();
}
+ //Upon re-docking the torn off floater, select the corresponding conversation line item
+ else
+ {
+ container->selectConversation(mSessionID);
+ }
refreshConversation();
updateGearBtn();
}