diff options
author | Merov Linden <merov@lindenlab.com> | 2012-10-18 21:50:57 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2012-10-18 21:50:57 -0700 |
commit | c14975b8e4dce1f0a257db0b88873eaf71daa110 (patch) | |
tree | 228007513cc0e7221307c8e64ab10e9df287204c /indra | |
parent | d840a60ecc9f7a9e1e9521dc63a79bc73267ed88 (diff) | |
parent | 18e5fa5bbd2f78b4fa6eee8b72666fa9aeb2100e (diff) |
Pull merge from richard/viewer-chui
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llimfloatercontainer.cpp | 38 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/strings.xml | 1 |
2 files changed, 15 insertions, 24 deletions
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index c9c7e94af9..c4eeccecbe 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -286,32 +286,21 @@ void LLIMFloaterContainer::onCloseFloater(LLUUID& id) // virtual void LLIMFloaterContainer::computeResizeLimits(S32& new_min_width, S32& new_min_height) { - bool is_left_pane_expanded = !mConversationsPane->isCollapsed(); - bool is_right_pane_expanded = !mMessagesPane->isCollapsed(); - - S32 conversations_pane_min_dim = mConversationsPane->getMinDim(); - - if (is_right_pane_expanded) + // possibly increase floater's minimum height according to children's minimums + for (S32 tab_idx = 0; tab_idx < mTabContainer->getTabCount(); ++tab_idx) { - S32 conversations_pane_width = - (is_left_pane_expanded ? gSavedPerAccountSettings.getS32("ConversationsListPaneWidth") : conversations_pane_min_dim); - - // possibly increase minimum size constraint due to children's minimums. - for (S32 tab_idx = 0; tab_idx < mTabContainer->getTabCount(); ++tab_idx) + LLFloater* floaterp = dynamic_cast<LLFloater*>(mTabContainer->getPanelByIndex(tab_idx)); + if (floaterp) { - LLFloater* floaterp = dynamic_cast<LLFloater*>(mTabContainer->getPanelByIndex(tab_idx)); - if (floaterp) - { - new_min_width = llmax(new_min_width, - floaterp->getMinWidth() + conversations_pane_width + LLPANEL_BORDER_WIDTH * 2); - new_min_height = llmax(new_min_height, floaterp->getMinHeight()); - } + new_min_height = llmax(new_min_height, floaterp->getMinHeight()); } } - else - { - new_min_width = conversations_pane_min_dim; - } + + S32 conversations_pane_min_dim = mConversationsPane->getRelevantMinDim(); + S32 messages_pane_min_dim = mMessagesPane->getRelevantMinDim(); + + // set floater's minimum width according to relevant minimal children's dimensionals + new_min_width = conversations_pane_min_dim + messages_pane_min_dim + LLPANEL_BORDER_WIDTH*2; } void LLIMFloaterContainer::onNewMessageReceived(const LLSD& data) @@ -1175,8 +1164,9 @@ void LLIMFloaterContainer::setNearbyDistances() void LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid, bool isWidgetSelected /*= false*/) { bool is_nearby_chat = uuid.isNull(); - - std::string display_name = is_nearby_chat ? LLTrans::getString("NearbyChatTitle") : LLIMModel::instance().getName(uuid); + + //Stores the display name for the conversation line item + std::string display_name = is_nearby_chat ? LLTrans::getString("NearbyChatLabel") : LLIMModel::instance().getName(uuid); // Check if the item is not already in the list, exit if it is and has the same name and uuid (nothing to do) // Note: this happens often, when reattaching a torn off conversation for instance diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 696c282887..01da0a3686 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -385,6 +385,7 @@ Please try logging in again in a minute.</string> <!-- Chat --> <string name="NearbyChatTitle">Nearby chat</string> + <string name="NearbyChatLabel">(Nearby chat)</string> <string name="whisper">whispers:</string> <string name="shout">shouts:</string> <string name="ringing">Connecting to in-world Voice Chat...</string> |