summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAlexanderP ProductEngine <apaschenko@productengine.com>2012-09-04 20:39:49 +0300
committerAlexanderP ProductEngine <apaschenko@productengine.com>2012-09-04 20:39:49 +0300
commit681406427fab95167cb87b54e8315600176bf218 (patch)
tree1684046c240828bcaae16568a4b15eb108fa0b09 /indra
parent26ae00acf7da222b9478fedcfe5746191116991a (diff)
CHUI-311 FIXED (Make conversation list panel size persist between sessions): save current width in the setting_per_account.xml
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llimfloatercontainer.cpp23
-rw-r--r--indra/newview/llimfloatercontainer.h2
2 files changed, 24 insertions, 1 deletions
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index 56648d09b5..480f964939 100644
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -52,7 +52,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));
@@ -139,6 +140,16 @@ 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;
return TRUE;
}
@@ -514,6 +525,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;
diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h
index a72a3e2221..53e3849600 100644
--- a/indra/newview/llimfloatercontainer.h
+++ b/indra/newview/llimfloatercontainer.h
@@ -110,6 +110,8 @@ private:
LLLayoutPanel* mConversationsPane;
LLLayoutStack* mConversationsStack;
+ bool mInitialized;
+
// Conversation list implementation
public:
void removeConversationListItem(const LLUUID& uuid, bool change_focus = true);