summaryrefslogtreecommitdiff
path: root/indra/newview/llimfloatercontainer.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-09-09 15:06:33 -0700
committerMerov Linden <merov@lindenlab.com>2012-09-09 15:06:33 -0700
commit4869e0c269deafa44874a0110cc1f06bdc310407 (patch)
tree3e8930e92ebb7d8eb7997c89d198d30eaafe6c2e /indra/newview/llimfloatercontainer.cpp
parent6df8c2b42066efad4d46a601ecaabbc9bf1dcd91 (diff)
parent42dbf23dc56e0ab6842dd14b5701ffdb359f8bb6 (diff)
Pull merge richard/viewer-chui
Diffstat (limited to 'indra/newview/llimfloatercontainer.cpp')
-rw-r--r--indra/newview/llimfloatercontainer.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index 978b91b598..faca92e662 100644
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -53,7 +53,8 @@
LLIMFloaterContainer::LLIMFloaterContainer(const LLSD& seed)
: LLMultiFloater(seed),
mExpandCollapseBtn(NULL),
- mConversationsRoot(NULL)
+ mConversationsRoot(NULL),
+ mInitialized(false)
{
mCommitCallbackRegistrar.add("IMFloaterContainer.Action", boost::bind(&LLIMFloaterContainer::onCustomAction, this, _2));
@@ -142,6 +143,17 @@ BOOL LLIMFloaterContainer::postBuild()
LLAvatarNameCache::addUseDisplayNamesCallback(
boost::bind(&LLIMConversation::processChatHistoryStyleUpdate));
+ if (! mMessagesPane->isCollapsed())
+ {
+ S32 list_width = gSavedPerAccountSettings.getS32("ConversationsListPaneWidth");
+ LLRect list_size = mConversationsPane->getRect();
+ S32 left_pad = mConversationsListPanel->getRect().mLeft;
+ list_size.mRight = list_size.mLeft + list_width - left_pad;
+
+ mConversationsPane->handleReshape(list_size, TRUE);
+ }
+ mInitialized = true;
+
// Add callback: we'll take care of view updates on idle
gIdleCallbacks.addFunction(idle, this);
@@ -527,6 +539,16 @@ void LLIMFloaterContainer::onCustomAction(const LLSD& userdata)
void LLIMFloaterContainer::repositioningWidgets()
{
+ if (!mInitialized)
+ {
+ return;
+ }
+
+ if (!mConversationsPane->isCollapsed())
+ {
+ S32 list_width = (mConversationsPane->getRect()).getWidth();
+ gSavedPerAccountSettings.setS32("ConversationsListPaneWidth", list_width);
+ }
LLRect panel_rect = mConversationsListPanel->getRect();
S32 item_height = 16;
int index = 0;