From 819c837557cae318100505b418175ef0e5988eae Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 22 Mar 2013 20:28:52 -0700 Subject: CHUI-889 : Fixed! Collapse/Expand of participants list in torn off panels --- indra/newview/llfloaterimsessiontab.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'indra/newview/llfloaterimsessiontab.cpp') diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index eab2ce7798..0333bacd58 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -698,10 +698,12 @@ void LLFloaterIMSessionTab::updateHeaderAndToolbar() && !mIsP2PChat; mParticipantListAndHistoryStack->collapsePanel(mParticipantListPanel, !is_participant_list_visible); + mParticipantListPanel->setVisible(is_participant_list_visible); // Display collapse image (<<) if the floater is hosted // or if it is torn off but has an open control panel. bool is_expanded = is_not_torn_off || is_participant_list_visible; + mExpandCollapseBtn->setImageOverlay(getString(is_expanded ? "collapse_icon" : "expand_icon")); mExpandCollapseBtn->setToolTip( is_not_torn_off? @@ -818,14 +820,15 @@ void LLFloaterIMSessionTab::onSlide(LLFloaterIMSessionTab* self) { if (!self->mIsP2PChat) { + // The state must toggle the collapsed state of the panel bool should_be_expanded = self->mParticipantListPanel->isCollapsed(); - // Expand/collapse the participant list panel - self->mParticipantListAndHistoryStack->collapsePanel(self->mParticipantListPanel, !should_be_expanded); - self->mParticipantListPanel->setVisible(should_be_expanded); + // Update the expand/collapse flag of the participant list panel and save it gSavedSettings.setBOOL("IMShowControlPanel", should_be_expanded); self->mIsParticipantListExpanded = should_be_expanded; - self->mExpandCollapseBtn->setImageOverlay(self->getString(should_be_expanded ? "collapse_icon" : "expand_icon")); + + // Refresh for immediate feedback + self->refreshConversation(); } } -- cgit v1.2.3 From 5f89fe0b617d5df6d22b58ae7818b80c0eddcf7d Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 25 Mar 2013 23:01:36 -0700 Subject: CHUI-892 : Fixed. restoreFloater() called when floater docked --- indra/newview/llfloaterimsessiontab.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfloaterimsessiontab.cpp') diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 0333bacd58..d15c73a4a3 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -874,7 +874,7 @@ void LLFloaterIMSessionTab::reshapeFloater(bool collapse) void LLFloaterIMSessionTab::restoreFloater() { - if(!isMessagePaneExpanded()) + if(checkIfTornOff() && !isMessagePaneExpanded()) { if(isMinimized()) { -- cgit v1.2.3 From 9adb105999b25f239e4fc92daa249cc9a686790f Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 26 Mar 2013 15:02:34 +0200 Subject: CHUI-862 FIXED Save collapsed state for nearby chat. --- indra/newview/llfloaterimsessiontab.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'indra/newview/llfloaterimsessiontab.cpp') diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index d15c73a4a3..64c1f50074 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -132,6 +132,12 @@ void LLFloaterIMSessionTab::setVisible(BOOL visible) LLFloaterReg::getTypedInstance("im_container")->setVisible(true); } LLFloaterIMSessionTab::addToHost(mSessionID); + LLFloaterIMSessionTab* conversp = LLFloaterIMSessionTab::getConversation(mSessionID); + + if (conversp && conversp->isNearbyChat() && gSavedPerAccountSettings.getBOOL("NearbyChatIsNotCollapsed")) + { + onCollapseToLine(this); + } mInputButtonPanel->setVisible(isTornOff()); } @@ -356,7 +362,7 @@ void LLFloaterIMSessionTab::draw() // Restart the refresh timer mRefreshTimer->setTimerExpirySec(REFRESH_INTERVAL); } - + LLTransientDockableFloater::draw(); } @@ -866,7 +872,7 @@ void LLFloaterIMSessionTab::reshapeFloater(bool collapse) enableResizeCtrls(true, true, true); } - + saveCollapsedState(); setShape(floater_rect, true); mBodyStack->updateLayout(); @@ -876,6 +882,7 @@ void LLFloaterIMSessionTab::restoreFloater() { if(checkIfTornOff() && !isMessagePaneExpanded()) { + if(isMinimized()) { setMinimized(false); @@ -888,6 +895,7 @@ void LLFloaterIMSessionTab::restoreFloater() mBodyStack->updateLayout(); mExpandCollapseLineBtn->setImageOverlay(getString("expandline_icon")); setMessagePaneExpanded(true); + saveCollapsedState(); enableResizeCtrls(true, true, true); } } @@ -1063,6 +1071,14 @@ LLConversationItem* LLFloaterIMSessionTab::getCurSelectedViewModelItem() return conversationItem; } +void LLFloaterIMSessionTab::saveCollapsedState() +{ + LLFloaterIMSessionTab* conversp = LLFloaterIMSessionTab::getConversation(mSessionID); + if(conversp->isNearbyChat()) + { + gSavedPerAccountSettings.setBOOL("NearbyChatIsNotCollapsed", isMessagePaneExpanded()); + } +} BOOL LLFloaterIMSessionTab::handleKeyHere(KEY key, MASK mask ) { if(mask == MASK_ALT) -- cgit v1.2.3 From 9f819806cd0a2301c83a866d06594ce7b2f3c3d5 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 27 Mar 2013 16:08:03 -0700 Subject: CHUI-901 : Fixed! Do touch torn off state in restoreFloater() --- indra/newview/llfloaterimsessiontab.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview/llfloaterimsessiontab.cpp') diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 64c1f50074..5083331167 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -880,9 +880,8 @@ void LLFloaterIMSessionTab::reshapeFloater(bool collapse) void LLFloaterIMSessionTab::restoreFloater() { - if(checkIfTornOff() && !isMessagePaneExpanded()) + if(!isMessagePaneExpanded()) { - if(isMinimized()) { setMinimized(false); -- cgit v1.2.3