From c0b60841ce14a1c449ede17284d2aa6939322be3 Mon Sep 17 00:00:00 2001 From: MaximB ProductEngine Date: Thu, 18 Oct 2012 16:50:40 +0300 Subject: CHUI-412 (User restricted in resizing conversation floater width) fixed --- indra/newview/llimfloatercontainer.cpp | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) (limited to 'indra') diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index c9c7e94af9..8a6659667d 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(mTabContainer->getPanelByIndex(tab_idx)); + if (floaterp) { - LLFloater* floaterp = dynamic_cast(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) -- cgit v1.2.3 From 36ea92678e028abb54e02c603b657dfa10c91da1 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Thu, 18 Oct 2012 11:44:52 -0700 Subject: CHUI-329: The text is now gray due to CHUI 410. The only change in this commit is that parenthesis surround the nearby chat text (Nearby chat). --- indra/newview/llimfloatercontainer.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index c9c7e94af9..6edda76ad2 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -1175,8 +1175,18 @@ 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); + std::string display_name; + + //Stores the display name for the conversation line item + if(is_nearby_chat) + { + //Adds parenthesis in code since these are independent of the translated string + display_name = "(" + LLTrans::getString("NearbyChatTitle") + ")"; + } + else + { + display_name = 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 -- cgit v1.2.3 From 2301c7cff60eca879f605a3ee3f26b960597d8c3 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Thu, 18 Oct 2012 13:16:00 -0700 Subject: CHUI-329: Post code review commit, instead of hard coded the parenthesis, created a custom string in string.xml. The reasoning for this is because some languages may not use the parenthesis or perhaps even use brackets if needed...basically allows for flexibility. --- indra/newview/llimfloatercontainer.cpp | 11 +---------- indra/newview/skins/default/xui/en/strings.xml | 1 + 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'indra') diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 6edda76ad2..5d328bb283 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -1175,18 +1175,9 @@ void LLIMFloaterContainer::setNearbyDistances() void LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid, bool isWidgetSelected /*= false*/) { bool is_nearby_chat = uuid.isNull(); - std::string display_name; //Stores the display name for the conversation line item - if(is_nearby_chat) - { - //Adds parenthesis in code since these are independent of the translated string - display_name = "(" + LLTrans::getString("NearbyChatTitle") + ")"; - } - else - { - display_name = LLIMModel::instance().getName(uuid); - } + 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. Nearby chat + (Nearby chat) whispers: shouts: Connecting to in-world Voice Chat... -- cgit v1.2.3