From e09959df0d51eb8f4d37719d2753d2016390b25b Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 2 Apr 2013 17:11:07 -0700 Subject: CHUI-849 : WIP : Prevents Finding Widgets in highly used code by getting pointers to widgets in PostBuild --- indra/newview/llfloaterimcontainer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 7296ec3ced..e481e056f1 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -221,7 +221,8 @@ BOOL LLFloaterIMContainer::postBuild() mExpandCollapseBtn->setClickedCallback(boost::bind(&LLFloaterIMContainer::onExpandCollapseButtonClicked, this)); mStubCollapseBtn = getChild("stub_collapse_btn"); mStubCollapseBtn->setClickedCallback(boost::bind(&LLFloaterIMContainer::onStubCollapseButtonClicked, this)); - getChild("speak_btn")->setClickedCallback(boost::bind(&LLFloaterIMContainer::onSpeakButtonClicked, this)); + mSpeakBtn = getChild("speak_btn"); + mSpeakBtn->setClickedCallback(boost::bind(&LLFloaterIMContainer::onSpeakButtonClicked, this)); childSetAction("add_btn", boost::bind(&LLFloaterIMContainer::onAddButtonClicked, this)); @@ -1873,7 +1874,6 @@ void LLFloaterIMContainer::reSelectConversation() void LLFloaterIMContainer::updateSpeakBtnState() { - LLButton* mSpeakBtn = getChild("speak_btn"); mSpeakBtn->setToggleState(LLVoiceClient::getInstance()->getUserPTTState()); mSpeakBtn->setEnabled(LLAgent::isActionAllowed("speak")); } -- cgit v1.2.3 From 7b0c364a6bfc3dc47197d1bb0af025b303ef5079 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 3 Apr 2013 15:07:26 +0300 Subject: CHUI-838 FIXED (Opening chat history for groups only works once per session, if at all) --- indra/newview/llfloaterimcontainer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 58817485fb..7e281bd99b 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1211,7 +1211,8 @@ bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata) //Enable Chat history item for ad-hoc and group conversations if ("can_chat_history" == item && uuids.size() > 0) { - return LLLogChat::isTranscriptExist(uuids.front()); + bool is_group = (getCurSelectedViewModelItem()->getType() == LLConversationItem::CONV_SESSION_GROUP); + return LLLogChat::isTranscriptExist(uuids.front(),is_group); } // If nothing is selected(and selected item is not group chat), everything needs to be disabled -- cgit v1.2.3 From fa36f85b007a124c418fd8cfc0e836cc7fdc86cf Mon Sep 17 00:00:00 2001 From: PavelK ProductEngine Date: Tue, 9 Apr 2013 20:50:54 +0300 Subject: CHUI-797 FIXED Only one separated conversation window is shown after exiting from mouselook view Added all separated conversation floaters to skip list used in gFloaterView->popVisibleAll(skip_list) in llagent.cpp since LLFloaterIMContainer::setVisible() takes control of them by itself. --- indra/newview/llfloaterimcontainer.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index f89e818928..8575f6f055 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -54,6 +54,7 @@ #include "llworld.h" #include "llsdserialize.h" #include "llviewerobjectlist.h" +#include "boost/foreach.hpp" // // LLFloaterIMContainer @@ -660,6 +661,23 @@ void LLFloaterIMContainer::setVisible(BOOL visible) LLMultiFloater::setVisible(visible); } +void LLFloaterIMContainer::getDetachedConversationFloaters(floater_list_t& floaters) +{ + typedef conversations_widgets_map::value_type conv_pair; + BOOST_FOREACH(conv_pair item, mConversationsWidgets) + { + LLConversationViewSession* widget = dynamic_cast(item.second); + if (widget) + { + LLFloater* session_floater = widget->getSessionFloater(); + if (session_floater && session_floater->isDetachedAndNotMinimized()) + { + floaters.push_back(session_floater); + } + } + } +} + void LLFloaterIMContainer::setVisibleAndFrontmost(BOOL take_focus, const LLSD& key) { LLMultiFloater::setVisibleAndFrontmost(take_focus, key); -- cgit v1.2.3 From 0b41fd503bf4388e911b21ab98479baebd5da31a Mon Sep 17 00:00:00 2001 From: mberezhnoy Date: Wed, 10 Apr 2013 00:07:02 +0300 Subject: CHUI-899 (The size of conversations panel does not persist between sessions if user relogin while messages pane is collapsed. ) --- indra/newview/llfloaterimcontainer.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 7e281bd99b..f89e818928 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -63,7 +63,8 @@ LLFloaterIMContainer::LLFloaterIMContainer(const LLSD& seed, const Params& param mExpandCollapseBtn(NULL), mConversationsRoot(NULL), mConversationsEventStream("ConversationsEvents"), - mInitialized(false) + mInitialized(false), + mIsFirstLaunch(true) { mEnableCallbackRegistrar.add("IMFloaterContainer.Check", boost::bind(&LLFloaterIMContainer::isActionChecked, this, _2)); mCommitCallbackRegistrar.add("IMFloaterContainer.Action", boost::bind(&LLFloaterIMContainer::onCustomAction, this, _2)); @@ -663,6 +664,11 @@ void LLFloaterIMContainer::setVisibleAndFrontmost(BOOL take_focus, const LLSD& k { LLMultiFloater::setVisibleAndFrontmost(take_focus, key); selectConversationPair(getSelectedSession(), false, take_focus); + if (mInitialized && mIsFirstLaunch) + { + collapseMessagesPane(gSavedPerAccountSettings.getBOOL("ConversationsMessagePaneCollapsed")); + mIsFirstLaunch = false; + } } void LLFloaterIMContainer::updateResizeLimits() -- cgit v1.2.3 From 0193a7b74ccc09788e8d2503244f30ac231546cc Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Tue, 16 Apr 2013 04:55:09 +0300 Subject: CHUI-808 FIXED Draggable separator between conversations and message pane is not discoverable: - final solution; --- indra/newview/llfloaterimcontainer.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 8575f6f055..043ffacffb 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -817,15 +817,12 @@ void LLFloaterIMContainer::assignResizeLimits() bool is_conv_pane_expanded = !mConversationsPane->isCollapsed(); bool is_msg_pane_expanded = !mMessagesPane->isCollapsed(); - // With two panels visible number of borders is three, because the borders - // between the panels are merged into one - S32 number_of_visible_borders = llmin((is_conv_pane_expanded? 2 : 0) + (is_msg_pane_expanded? 2 : 0), 3); - S32 summary_width_of_visible_borders = number_of_visible_borders * LLPANEL_BORDER_WIDTH; - S32 conv_pane_target_width = is_conv_pane_expanded? - (is_msg_pane_expanded? - mConversationsPane->getRect().getWidth() - : mConversationsPane->getExpandedMinDim()) - : mConversationsPane->getMinDim(); + S32 summary_width_of_visible_borders = (is_msg_pane_expanded ? mConversationsStack->getPanelSpacing() : 0) + 1; + + S32 conv_pane_target_width = is_conv_pane_expanded + ? ( is_msg_pane_expanded?mConversationsPane->getRect().getWidth():mConversationsPane->getExpandedMinDim() ) + : mConversationsPane->getMinDim(); + S32 msg_pane_min_width = is_msg_pane_expanded ? mMessagesPane->getExpandedMinDim() : 0; S32 new_min_width = conv_pane_target_width + msg_pane_min_width + summary_width_of_visible_borders; -- cgit v1.2.3 From 09b70845e52f75a33c608062db6516784b31fa72 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 19 Apr 2013 14:52:37 +0300 Subject: CHUI-946 FIXED Return FALSE if key is not handled here. --- indra/newview/llfloaterimcontainer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 043ffacffb..6291f8fb53 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1962,23 +1962,28 @@ bool LLFloaterIMContainer::isScrolledOutOfSight(LLConversationViewSession* conve BOOL LLFloaterIMContainer::handleKeyHere(KEY key, MASK mask ) { + BOOL handled = FALSE; + if(mask == MASK_ALT) { if (KEY_RETURN == key ) { expandConversation(); + handled = TRUE; } if ((KEY_DOWN == key ) || (KEY_RIGHT == key)) { selectNextorPreviousConversation(true); + handled = TRUE; } if ((KEY_UP == key) || (KEY_LEFT == key)) { selectNextorPreviousConversation(false); + handled = TRUE; } } - return TRUE; + return handled; } bool LLFloaterIMContainer::selectAdjacentConversation(bool focus_selected) -- cgit v1.2.3 From 6a339649844a6e016e35e440004a61d07dd490e6 Mon Sep 17 00:00:00 2001 From: mberezhnoy Date: Fri, 19 Apr 2013 15:31:19 +0300 Subject: CHUI-915 ([CHUIBUG]Control+W hides Conversations floater instead of closing active tab) --- indra/newview/llfloaterimcontainer.cpp | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index f89e818928..29a6060b0e 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -2020,7 +2020,9 @@ void LLFloaterIMContainer::expandConversation() } } -void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/) +// For conversations, closeFloater() (linked to Ctrl-W) does not actually close the floater but the active conversation. +// This is intentional so it doesn't confuse the user. onClickCloseBtn() closes the whole floater. +void LLFloaterIMContainer::onClickCloseBtn() { // Always unminimize before trying to close. // Most of the time the user will never see this state. @@ -2029,7 +2031,25 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/) LLMultiFloater::setMinimized(FALSE); } - LLFloater::closeFloater(app_quitting); + LLFloater::closeFloater(); +} + +void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/) +{ + // Check for currently active session + LLUUID session_id = getSelectedSession(); + // If current session is Nearby Chat or there is only one session remaining, close the floater + if (mConversationsItems.size() == 1 || session_id == LLUUID()) + { + onClickCloseBtn(); + } + + // Otherwise, close current conversation + LLFloaterIMSessionTab* active_conversation = LLFloaterIMSessionTab::getConversation(session_id); + if (active_conversation) + { + active_conversation->closeFloater(); + } } // EOF -- cgit v1.2.3 From 6ad4822a05fa2d0cb0a9ab616384b374dc877883 Mon Sep 17 00:00:00 2001 From: PavelK ProductEngine Date: Wed, 17 Apr 2013 19:55:13 +0300 Subject: CHUI-933 FIXED No notification of IMs when coming out of Do Not Disturb mode with Flash Toolbar button preference --- indra/newview/llfloaterimcontainer.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 31bad41773..1fce71898b 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1947,6 +1947,17 @@ void LLFloaterIMContainer::flashConversationItemWidget(const LLUUID& session_id, } } +void LLFloaterIMContainer::highlightConversationItemWidget(const LLUUID& session_id, bool is_highlighted) +{ + //Finds the conversation line item to highlight using the session_id + LLConversationViewSession * widget = dynamic_cast(get_ptr_in_map(mConversationsWidgets,session_id)); + + if (widget) + { + widget->setHighlightState(is_highlighted); + } +} + bool LLFloaterIMContainer::isScrolledOutOfSight(LLConversationViewSession* conversation_item_widget) { llassert(conversation_item_widget != NULL); -- cgit v1.2.3 From 25c222e31770cb2c10e262b02ae9065521986349 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 23 Apr 2013 15:09:41 +0300 Subject: CHUI-943 FIXED "Chat history" menu item is added to context menu for Nearby chat. --- indra/newview/llfloaterimcontainer.cpp | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 1fce71898b..984c658b55 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1164,7 +1164,7 @@ void LLFloaterIMContainer::doToSelectedConversation(const std::string& command, } else if("chat_history" == command) { - if (selectedIDS.size() > 0) + if (selectedIDS.size() > 0) { LLAvatarActions::viewChatHistory(selectedIDS.front()); } @@ -1177,6 +1177,17 @@ void LLFloaterIMContainer::doToSelectedConversation(const std::string& command, } } } + //if there is no LLFloaterIMSession* instance for selected conversation it might be Nearby chat + else + { + if(conversationItem->getType() == LLConversationItem::CONV_SESSION_NEARBY) + { + if("chat_history" == command) + { + LLFloaterReg::showInstance("preview_conversation", LLSD(LLUUID::null), true); + } + } + } } void LLFloaterIMContainer::doToSelected(const LLSD& userdata) @@ -1232,8 +1243,19 @@ bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata) //Enable Chat history item for ad-hoc and group conversations if ("can_chat_history" == item && uuids.size() > 0) { - bool is_group = (getCurSelectedViewModelItem()->getType() == LLConversationItem::CONV_SESSION_GROUP); - return LLLogChat::isTranscriptExist(uuids.front(),is_group); + //Disable menu item if selected participant is user agent + if(uuids.front() != gAgentID) + { + if (getCurSelectedViewModelItem()->getType() == LLConversationItem::CONV_SESSION_NEARBY) + { + return LLLogChat::isNearbyTranscriptExist(); + } + else + { + bool is_group = (getCurSelectedViewModelItem()->getType() == LLConversationItem::CONV_SESSION_GROUP); + return LLLogChat::isTranscriptExist(uuids.front(),is_group); + } + } } // If nothing is selected(and selected item is not group chat), everything needs to be disabled -- cgit v1.2.3 From d2c9543a19fa4ed008bbda841885bd1f34c289a0 Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Fri, 26 Apr 2013 06:39:08 +0300 Subject: CHUI-859 FIXED Conversation panel moves when new message received with Open Conversation window preference --- indra/newview/llfloaterimcontainer.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 7519942901..a3a0093346 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -804,13 +804,6 @@ void LLFloaterIMContainer::reshapeFloaterAndSetResizeLimits(bool collapse, S32 d setCanMinimize(at_least_one_panel_is_expanded); assignResizeLimits(); - - // force set correct size for the title after show/hide minimize button - LLRect cur_rect = getRect(); - LLRect force_rect = cur_rect; - force_rect.mRight = cur_rect.mRight + 1; - setRect(force_rect); - setRect(cur_rect); } void LLFloaterIMContainer::assignResizeLimits() @@ -2105,4 +2098,10 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/) } } +void LLFloaterIMContainer::handleReshape(const LLRect& rect, bool by_user) +{ + LLMultiFloater::handleReshape(rect, by_user); + storeRectControl(); +} + // EOF -- cgit v1.2.3 From 503605641a6285064765b6057dbad67df84140e2 Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Mon, 29 Apr 2013 23:01:07 +0300 Subject: CHUI-956 FIXED Vertical scrollbar in conversation list not scrolls off bottom --- indra/newview/llfloaterimcontainer.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index a3a0093346..1bb2ce01e4 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -206,6 +206,7 @@ BOOL LLFloaterIMContainer::postBuild() // a scroller for folder view LLRect scroller_view_rect = mConversationsListPanel->getRect(); scroller_view_rect.translate(-scroller_view_rect.mLeft, -scroller_view_rect.mBottom); + scroller_view_rect.mBottom += getChild("conversations_pane_buttons_stack")->getRect().getHeight(); LLScrollContainer::Params scroller_params(LLUICtrlFactory::getDefaultParams()); scroller_params.rect(scroller_view_rect); -- cgit v1.2.3 From 8431da8de0e8130aedc1ce134b45ba4f6dfb5d83 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 30 Apr 2013 16:09:52 +0300 Subject: CHUI-953 FIXED Close conversation floater when quitting viewer --- indra/newview/llfloaterimcontainer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 1bb2ce01e4..b88888da3b 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -2086,7 +2086,7 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/) // Check for currently active session LLUUID session_id = getSelectedSession(); // If current session is Nearby Chat or there is only one session remaining, close the floater - if (mConversationsItems.size() == 1 || session_id == LLUUID()) + if (mConversationsItems.size() == 1 || session_id == LLUUID() || app_quitting) { onClickCloseBtn(); } -- cgit v1.2.3 From 5f05e5841f5e748984a7dd7ac4e18070fc716857 Mon Sep 17 00:00:00 2001 From: mberezhnoy Date: Fri, 3 May 2013 13:01:00 +0300 Subject: CHUI-963 (Toggling chat fui button twice tears off nearby chat to lower left corner also deletes other open conversations) --- indra/newview/llfloaterimcontainer.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index b88888da3b..7626a3eab8 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -2081,6 +2081,11 @@ void LLFloaterIMContainer::onClickCloseBtn() LLFloater::closeFloater(); } +void LLFloaterIMContainer::closeHostedFloater() +{ + onClickCloseBtn(); +} + void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/) { // Check for currently active session -- cgit v1.2.3 From 75f97d4ffe517d07e4b528de9e5f2d2c800510fb Mon Sep 17 00:00:00 2001 From: mberezhnoy Date: Thu, 16 May 2013 09:16:58 +0300 Subject: CHUI-963 (Toggling chat fui button twice tears off nearby chat to lower left corner also deletes other open conversations) --- indra/newview/llfloaterimcontainer.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 7626a3eab8..51796b7486 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -2067,6 +2067,15 @@ void LLFloaterIMContainer::expandConversation() } } +// By default, if torn off session is currently frontmost, LLFloater::isFrontmost() will return FALSE, which can lead to some bugs +// So LLFloater::isFrontmost() is overriden here to check both selected session and the IM floater itself +/*virtual*/ +BOOL LLFloaterIMContainer::isFrontmost() +{ + LLFloaterIMSessionTab* selected_session = LLFloaterIMSessionTab::getConversation(mSelectedSession); + return (selected_session && selected_session->isFrontmost()) || LLFloater::isFrontmost(); +} + // For conversations, closeFloater() (linked to Ctrl-W) does not actually close the floater but the active conversation. // This is intentional so it doesn't confuse the user. onClickCloseBtn() closes the whole floater. void LLFloaterIMContainer::onClickCloseBtn() -- cgit v1.2.3 From bf5f53bf6467fca2783f10d07eae8d111af5dd82 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 20 May 2013 15:55:06 +0300 Subject: CHUI-953 FIXED Set dnd and close all conversation before quittinq. --- indra/newview/llfloaterimcontainer.cpp | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 51796b7486..700bc94105 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1212,7 +1212,7 @@ void LLFloaterIMContainer::doToSelectedGroup(const LLSD& userdata) if (action == "group_profile") { - LLGroupActions::show(mSelectedSession); + LLGroupActions::show(mSelectedSession); } else if (action == "activate_group") { @@ -2095,8 +2095,31 @@ void LLFloaterIMContainer::closeHostedFloater() onClickCloseBtn(); } +void LLFloaterIMContainer::closeAllConversations() +{ + conversations_widgets_map::iterator widget_it = mConversationsWidgets.begin(); + for (;widget_it != mConversationsWidgets.end(); ++widget_it) + { + if (widget_it->first != LLUUID()) + { + LLConversationViewSession* widget = dynamic_cast(widget_it->second); + if (widget) + { + widget->destroyView(); + mConversationsItems.erase(widget_it->first); + mConversationsWidgets.erase(widget_it->first); + } + } + } +} void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/) { + if(app_quitting) + { + gAgent.setDoNotDisturb(true); + closeAllConversations(); + } + // Check for currently active session LLUUID session_id = getSelectedSession(); // If current session is Nearby Chat or there is only one session remaining, close the floater @@ -2110,6 +2133,11 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/) if (active_conversation) { active_conversation->closeFloater(); + if(app_quitting) + { + LLFloater::closeFloater(app_quitting); + } + } } -- cgit v1.2.3 From ef69d31b993fe849526799f225dd0eda12c82dab Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 29 May 2013 15:53:36 +0300 Subject: CHUI-918 FIXED "Close all conversations" menu item is added to context menu. --- indra/newview/llfloaterimcontainer.cpp | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 700bc94105..4bfb19ce36 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -977,7 +977,7 @@ void LLFloaterIMContainer::setSortOrder(const LLConversationSort& order) conversation_floater->setSortOrder(order); } } - + gSavedSettings.setU32("ConversationSortOrder", (U32)order); } @@ -1149,6 +1149,10 @@ void LLFloaterIMContainer::doToSelectedConversation(const std::string& command, { LLFloater::onClickClose(conversationFloater); } + else if("close_all_conversations" == command) + { + closeAllConversations(); + } else if("open_voice_conversation" == command) { gIMMgr->startCall(conversationItem->getUUID()); @@ -2097,20 +2101,21 @@ void LLFloaterIMContainer::closeHostedFloater() void LLFloaterIMContainer::closeAllConversations() { - conversations_widgets_map::iterator widget_it = mConversationsWidgets.begin(); - for (;widget_it != mConversationsWidgets.end(); ++widget_it) + LLDynamicArray ids; + for (conversations_items_map::iterator it_session = mConversationsItems.begin(); it_session != mConversationsItems.end(); it_session++) { - if (widget_it->first != LLUUID()) + LLUUID session_id = it_session->first; + if (session_id != LLUUID()) { - LLConversationViewSession* widget = dynamic_cast(widget_it->second); - if (widget) - { - widget->destroyView(); - mConversationsItems.erase(widget_it->first); - mConversationsWidgets.erase(widget_it->first); - } + ids.push_back(session_id); } } + + for (LLDynamicArray::const_iterator it = ids.begin(); it != ids.end(); ++it) + { + LLFloaterIMSession *conversationFloater = LLFloaterIMSession::findInstance(*it); + LLFloater::onClickClose(conversationFloater); + } } void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/) { -- cgit v1.2.3 From 773a296383ebad29ad3f7a618405535e306d71b1 Mon Sep 17 00:00:00 2001 From: mberezhnoy Date: Wed, 29 May 2013 19:04:02 +0300 Subject: CHUI-915 ([CHUIBUG]Control+W hides Conversations floater instead of closing active tab) --- indra/newview/llfloaterimcontainer.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 4bfb19ce36..3783ae60e7 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -2132,17 +2132,19 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/) { onClickCloseBtn(); } - - // Otherwise, close current conversation - LLFloaterIMSessionTab* active_conversation = LLFloaterIMSessionTab::getConversation(session_id); - if (active_conversation) + else { - active_conversation->closeFloater(); - if(app_quitting) + // Otherwise, close current conversation + LLFloaterIMSessionTab* active_conversation = LLFloaterIMSessionTab::getConversation(session_id); + if (active_conversation) { - LLFloater::closeFloater(app_quitting); - } + active_conversation->closeFloater(); + if(app_quitting) + { + LLFloater::closeFloater(app_quitting); + } + } } } -- cgit v1.2.3 From 430af6f731b2b822dd91d3163d7e206e3559a211 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 4 Jun 2013 14:49:07 +0300 Subject: CHUI-918 FIXED Close only selected conversations instead of closing all conversations. --- indra/newview/llfloaterimcontainer.cpp | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 3783ae60e7..60ece0aab1 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -981,7 +981,7 @@ void LLFloaterIMContainer::setSortOrder(const LLConversationSort& order) gSavedSettings.setU32("ConversationSortOrder", (U32)order); } -void LLFloaterIMContainer::getSelectedUUIDs(uuid_vec_t& selected_uuids) +void LLFloaterIMContainer::getSelectedUUIDs(uuid_vec_t& selected_uuids, bool participant_uuids/* = true*/) { const std::set selectedItems = mConversationsRoot->getSelectionList(); @@ -994,7 +994,7 @@ void LLFloaterIMContainer::getSelectedUUIDs(uuid_vec_t& selected_uuids) conversationItem = static_cast((*it)->getViewModelItem()); //When a one-on-one conversation exists, retrieve the participant id from the conversation floater - if(conversationItem->getType() == LLConversationItem::CONV_SESSION_1_ON_1) + if(conversationItem->getType() == LLConversationItem::CONV_SESSION_1_ON_1 && participant_uuids) { LLFloaterIMSession * conversation_floaterp = LLFloaterIMSession::findInstance(conversationItem->getUUID()); LLUUID participant_id = conversation_floaterp->getOtherParticipantUUID(); @@ -1149,9 +1149,10 @@ void LLFloaterIMContainer::doToSelectedConversation(const std::string& command, { LLFloater::onClickClose(conversationFloater); } - else if("close_all_conversations" == command) + else if("close_selected_conversations" == command) { - closeAllConversations(); + getSelectedUUIDs(selectedIDS,false); + closeSelectedConversations(selectedIDS); } else if("open_voice_conversation" == command) { @@ -2117,6 +2118,22 @@ void LLFloaterIMContainer::closeAllConversations() LLFloater::onClickClose(conversationFloater); } } + +void LLFloaterIMContainer::closeSelectedConversations(const uuid_vec_t& ids) +{ + for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it) + { + //We don't need to close Nearby chat, so skip it + if (*it != LLUUID()) + { + LLFloaterIMSession *conversationFloater = LLFloaterIMSession::findInstance(*it); + if(conversationFloater) + { + LLFloater::onClickClose(conversationFloater); + } + } + } +} void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/) { if(app_quitting) -- cgit v1.2.3 From 57b21335ba232d4023ec2cda81153d02bc190f6b Mon Sep 17 00:00:00 2001 From: mberezhnoy Date: Wed, 5 Jun 2013 20:57:54 +0300 Subject: CHUI-953 (Viewer does not quit after confirming to quit first time) removed DND hack --- indra/newview/llfloaterimcontainer.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 3783ae60e7..01278e0637 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -2121,8 +2121,8 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/) { if(app_quitting) { - gAgent.setDoNotDisturb(true); closeAllConversations(); + onClickCloseBtn(); } // Check for currently active session @@ -2139,11 +2139,6 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/) if (active_conversation) { active_conversation->closeFloater(); - if(app_quitting) - { - LLFloater::closeFloater(app_quitting); - } - } } } -- cgit v1.2.3 From 0b458690ceb8d7cbb9b1b8b5620def2a08af2524 Mon Sep 17 00:00:00 2001 From: mberezhnoy Date: Fri, 7 Jun 2013 20:05:43 +0300 Subject: CHUI-953 (Viewer does not quit after confirming to quit first time) Added missing "else" statement --- indra/newview/llfloaterimcontainer.cpp | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 918c85b07e..5432e68f14 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -2141,21 +2141,23 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/) closeAllConversations(); onClickCloseBtn(); } - - // Check for currently active session - LLUUID session_id = getSelectedSession(); - // If current session is Nearby Chat or there is only one session remaining, close the floater - if (mConversationsItems.size() == 1 || session_id == LLUUID() || app_quitting) - { - onClickCloseBtn(); - } else { - // Otherwise, close current conversation - LLFloaterIMSessionTab* active_conversation = LLFloaterIMSessionTab::getConversation(session_id); - if (active_conversation) + // Check for currently active session + LLUUID session_id = getSelectedSession(); + // If current session is Nearby Chat or there is only one session remaining, close the floater + if (mConversationsItems.size() == 1 || session_id == LLUUID() || app_quitting) { - active_conversation->closeFloater(); + onClickCloseBtn(); + } + else + { + // Otherwise, close current conversation + LLFloaterIMSessionTab* active_conversation = LLFloaterIMSessionTab::getConversation(session_id); + if (active_conversation) + { + active_conversation->closeFloater(); + } } } } -- cgit v1.2.3 From 0cf9597bd55782b4a463f3e07767269e80432db6 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 11 Jun 2013 15:30:31 +0300 Subject: CHUI-926 FIXED FUI button will stay highlight(orange) if there are unread IMs when the conversation floater is minimized. --- indra/newview/llfloaterimcontainer.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 5432e68f14..8b38e54a8e 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -47,6 +47,7 @@ #include "llfloaterpreference.h" #include "llimview.h" #include "llnotificationsutil.h" +#include "lltoolbarview.h" #include "lltransientfloatermgr.h" #include "llviewercontrol.h" #include "llconversationview.h" @@ -597,6 +598,7 @@ void LLFloaterIMContainer::setMinimized(BOOL b) //Switching from minimized to un-minimized if(was_minimized && !b) { + gToolBarView->flashCommand(LLCommandId("chat"), false); LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(mSelectedSession); if(session_floater && !session_floater->isTornOff()) -- cgit v1.2.3 From 8349b8234fba4df5a3e4b36e8f226d85e30d8a4c Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 17 Jul 2013 20:48:22 +0300 Subject: =?UTF-8?q?CHUI-987=20FIXED=20(Viewer=20crashes=20when=20you=20try?= =?UTF-8?q?=20drag=20and=20drop=20any=20object=20from=20inventory=20onto?= =?UTF-8?q?=20avatar=E2=80=99s=20name=20in=20resident=20picker)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- indra/newview/llfloaterimcontainer.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 29216f8d9a..396e31dd27 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -116,6 +116,10 @@ void LLFloaterIMContainer::sessionAdded(const LLUUID& session_id, const std::str void LLFloaterIMContainer::sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) { + if(!isInVisibleChain()) + { + setVisibleAndFrontmost(false); + } selectConversationPair(session_id, true); collapseMessagesPane(false); } -- cgit v1.2.3 From d59b6e1d0a5accbff43167c8e4be1874917fc4e8 Mon Sep 17 00:00:00 2001 From: PavelK ProductEngine Date: Thu, 27 Jun 2013 18:28:54 +0300 Subject: CHUI-817 FIX Revealing the "Conversations" window reveals hidden Nearby Chat window as well --- indra/newview/llfloaterimcontainer.cpp | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 396e31dd27..4591b80ac4 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -267,7 +267,6 @@ BOOL LLFloaterIMContainer::postBuild() void LLFloaterIMContainer::onOpen(const LLSD& key) { LLMultiFloater::onOpen(key); - openNearbyChat(); reSelectConversation(); assignResizeLimits(); } @@ -631,7 +630,6 @@ void LLFloaterIMContainer::setVisible(BOOL visible) LLFloaterReg::toggleInstanceOrBringToFront(name); selectConversationPair(LLUUID(NULL), false, false); } - openNearbyChat(); flashConversationItemWidget(mSelectedSession,false); LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(mSelectedSession); @@ -661,7 +659,11 @@ void LLFloaterIMContainer::setVisible(BOOL visible) LLConversationViewSession* widget = dynamic_cast(widget_it->second); if (widget) { - widget->setVisibleIfDetached(visible); + LLFloater* session_floater = widget->getSessionFloater(); + if (session_floater != nearby_chat) + { + widget->setVisibleIfDetached(visible); + } } } @@ -689,7 +691,12 @@ void LLFloaterIMContainer::getDetachedConversationFloaters(floater_list_t& float void LLFloaterIMContainer::setVisibleAndFrontmost(BOOL take_focus, const LLSD& key) { LLMultiFloater::setVisibleAndFrontmost(take_focus, key); - selectConversationPair(getSelectedSession(), false, take_focus); + // Do not select "Nearby Chat" conversation, since it will bring its window to front + // Only select other sessions + if (!getSelectedSession().isNull()) + { + selectConversationPair(getSelectedSession(), false, take_focus); + } if (mInitialized && mIsFirstLaunch) { collapseMessagesPane(gSavedPerAccountSettings.getBOOL("ConversationsMessagePaneCollapsed")); @@ -1936,13 +1943,6 @@ void LLFloaterIMContainer::openNearbyChat() } } -void LLFloaterIMContainer::onNearbyChatClosed() -{ - // If nearby chat is the only remaining conversation and it is closed, close whole conversation floater as well - if (mConversationsItems.size() == 1) - closeFloater(); -} - void LLFloaterIMContainer::reSelectConversation() { LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(mSelectedSession); @@ -2080,11 +2080,15 @@ void LLFloaterIMContainer::expandConversation() // By default, if torn off session is currently frontmost, LLFloater::isFrontmost() will return FALSE, which can lead to some bugs // So LLFloater::isFrontmost() is overriden here to check both selected session and the IM floater itself +// Exclude "Nearby Chat" session from the check, as "Nearby Chat" window and "Conversations" floater can be brought +// to front independently /*virtual*/ BOOL LLFloaterIMContainer::isFrontmost() { LLFloaterIMSessionTab* selected_session = LLFloaterIMSessionTab::getConversation(mSelectedSession); - return (selected_session && selected_session->isFrontmost()) || LLFloater::isFrontmost(); + LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::findTypedInstance("nearby_chat"); + return (selected_session && selected_session->isFrontmost() && (selected_session != nearby_chat)) + || LLFloater::isFrontmost(); } // For conversations, closeFloater() (linked to Ctrl-W) does not actually close the floater but the active conversation. -- cgit v1.2.3