From 3468d2d93b7ea3ec4a86445a6187aa6738d8fc16 Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Wed, 13 Mar 2013 16:08:23 +0200 Subject: CHUI-816 [CHUIBUG]CHUI does not remember undocked state and position of Nearby Chat : canceled the erroneous torn-off/docked state saving when nearby chat is closes --- indra/newview/llfloaterimnearbychat.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index cfee5001a6..eb1a1f54ed 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -274,7 +274,7 @@ void LLFloaterIMNearbyChat::onTearOffClicked() LLFloaterIMSessionTab::onTearOffClicked(); // see CHUI-170: Save torn-off state of the nearby chat between sessions - BOOL in_the_multifloater = !isTornOff(); + BOOL in_the_multifloater = (BOOL)getHost(); gSavedSettings.setBOOL("NearbyChatIsNotTornOff", in_the_multifloater); } @@ -297,8 +297,10 @@ void LLFloaterIMNearbyChat::onClose(bool app_quitting) void LLFloaterIMNearbyChat::onClickCloseBtn() { if (!isTornOff()) + { return; - onTearOffClicked(); + } + LLFloaterIMSessionTab::onTearOffClicked(); LLFloaterIMContainer *im_box = LLFloaterIMContainer::findInstance(); if (im_box) -- cgit v1.2.3 From 5cddf709acb93a17059e5539258fc30b534a8e99 Mon Sep 17 00:00:00 2001 From: Cho Date: Thu, 14 Mar 2013 22:34:15 +0100 Subject: CHUI-700 FIX [CHUIBUG]"Zoom in" feature for avatars has disappeared Disabled "Zoom In" menu item in the case where gObjectList.findObject() returns nothing --- indra/newview/llfloaterimcontainer.cpp | 7 ++++++- indra/newview/llpanelpeoplemenus.cpp | 10 ++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 53daaabe3d..e91717312e 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -53,6 +53,7 @@ #include "llcallbacklist.h" #include "llworld.h" #include "llsdserialize.h" +#include "llviewerobjectlist.h" // // LLFloaterIMContainer @@ -1231,7 +1232,7 @@ bool LLFloaterIMContainer::enableContextMenuItem(const std::string& item, uuid_v } // Handle all other options - if (("can_invite" == item) || ("can_chat_history" == item) || ("can_share" == item) || ("can_pay" == item) || ("can_zoom_in" == item)) + if (("can_invite" == item) || ("can_chat_history" == item) || ("can_share" == item) || ("can_pay" == item)) { // Those menu items are enable only if a single avatar is selected return is_single_select; @@ -1261,6 +1262,10 @@ bool LLFloaterIMContainer::enableContextMenuItem(const std::string& item, uuid_v { return LLAvatarActions::canCall(); } + else if ("can_zoom_in" == item) + { + return is_single_select && gObjectList.findObject(single_id); + } else if ("can_show_on_map" == item) { return (is_single_select ? (LLAvatarTracker::instance().isBuddyOnline(single_id) && is_agent_mappable(single_id)) || gAgent.isGodlike() : false); diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp index aa14b74869..49f7361c4a 100644 --- a/indra/newview/llpanelpeoplemenus.cpp +++ b/indra/newview/llpanelpeoplemenus.cpp @@ -40,6 +40,7 @@ #include "lllogchat.h" #include "llviewermenu.h" // for gMenuHolder #include "llconversationmodel.h" +#include "llviewerobjectlist.h" namespace LLPanelPeopleMenus { @@ -212,6 +213,12 @@ bool PeopleContextMenu::enableContextMenuItem(const LLSD& userdata) { return LLAvatarActions::canCall(); } + else if (item == std::string("can_zoom_in")) + { + const LLUUID& id = mUUIDs.front(); + + return gObjectList.findObject(id); + } else if (item == std::string("can_show_on_map")) { const LLUUID& id = mUUIDs.front(); @@ -228,8 +235,7 @@ bool PeopleContextMenu::enableContextMenuItem(const LLSD& userdata) return LLLogChat::isTranscriptExist(mUUIDs.front()); } else if (item == std::string("can_im") || item == std::string("can_invite") || - item == std::string("can_share") || item == std::string("can_pay") || - item == std::string("can_zoom_in")) + item == std::string("can_share") || item == std::string("can_pay")) { return true; } -- cgit v1.2.3 From f0b1d1c7ea6e31e89165ff805bf2314767a7e23d Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Thu, 14 Mar 2013 16:55:11 -0700 Subject: CHUI-853 (Crashing on ejecting member in group): Upon receiving the rejection response message, the incorrect session id was being used to display the message. session_id was being used instead of new_session_id. --- indra/newview/llimview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index cd47a0c171..1d62a32fc2 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2638,7 +2638,7 @@ void LLIMMgr::addMessage( if (gSavedSettings.getBOOL("VoiceCallsFriendsOnly")) { // Evaluate if we need to skip this message when that setting is true (default is false) - LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(session_id); + LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(new_session_id); skip_message = (LLAvatarTracker::instance().getBuddyInfo(other_participant_id) == NULL); // Skip non friends... skip_message &= !session->isGroupSessionType(); // Do not skip group chats... skip_message &= !(other_participant_id == gAgentID); // You are your best friend... Don't skip yourself @@ -2654,7 +2654,7 @@ void LLIMMgr::addMessage( { LLFloaterReg::showInstance("im_container"); LLFloaterReg::getTypedInstance("im_container")-> - flashConversationItemWidget(session_id, true); + flashConversationItemWidget(new_session_id, true); } } -- cgit v1.2.3 From ee4fbb8e37ca20ebfbf85845dbb67941b7abfd29 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 15 Mar 2013 12:33:46 +0200 Subject: CHUI-830 FIXED Button for collapsing torn-off floater(to a single input line) is added. Show toasts for new messages for that conversation, regardless of other prefs. --- indra/newview/app_settings/settings.xml | 11 ++ indra/newview/llfloaterimnearbychat.cpp | 1 + indra/newview/llfloaterimnearbychathandler.cpp | 10 +- indra/newview/llfloaterimsession.cpp | 2 +- indra/newview/llfloaterimsessiontab.cpp | 82 +++++++++++++- indra/newview/llfloaterimsessiontab.h | 15 +++ indra/newview/llimview.cpp | 7 +- indra/newview/skins/default/textures/textures.xml | 2 + .../skins/default/xui/en/floater_im_session.xml | 123 ++++++++++++++++++--- 9 files changed, 227 insertions(+), 26 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index e216c7865d..ca6b9843fd 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4281,6 +4281,17 @@ Boolean Value 1 + + IMShowContentPanel + + Comment + Show Toolbar and Body Panels + Persist + 1 + Type + Boolean + Value + 1 IgnoreAllNotifications diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index eb1a1f54ed..148f6a0609 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -290,6 +290,7 @@ void LLFloaterIMNearbyChat::onOpen(const LLSD& key) void LLFloaterIMNearbyChat::onClose(bool app_quitting) { // Override LLFloaterIMSessionTab::onClose() so that Nearby Chat is not removed from the conversation floater + LLFloaterIMSessionTab::restoreFloater(); onClickCloseBtn(); } diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp index 8870d54cd2..7afcf288ce 100644 --- a/indra/newview/llfloaterimnearbychathandler.cpp +++ b/indra/newview/llfloaterimnearbychathandler.cpp @@ -559,12 +559,14 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg, LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance("im_container"); - if( nearby_chat->hasFocus() + if(( nearby_chat->hasFocus() || im_box->hasFocus() || ( chat_msg.mSourceType == CHAT_SOURCE_AGENT && gSavedSettings.getBOOL("UseChatBubbles") ) || mChannel.isDead() - || !mChannel.get()->getShowToasts() ) // to prevent toasts in Do Not Disturb mode + || !mChannel.get()->getShowToasts() ) + && nearby_chat->isMessagePaneExpanded()) + // to prevent toasts in Do Not Disturb mode return;//no need in toast if chat is visible or if bubble chat is enabled // arrange a channel on a screen @@ -606,7 +608,7 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg, //Don't show nearby toast, if conversation is visible but not focused LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(LLUUID()); - if (session_floater + if (session_floater && session_floater->isMessagePaneExpanded() && session_floater->isInVisibleChain() && !session_floater->isMinimized() && !(session_floater->getHost() && session_floater->getHost()->isMinimized())) { @@ -614,7 +616,7 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg, } //Will show toast when chat preference is set - if(gSavedSettings.getString("NotificationNearbyChatOptions") == "toast") + if((gSavedSettings.getString("NotificationNearbyChatOptions") == "toast") || !session_floater->isMessagePaneExpanded()) { // Add a nearby chat toast. LLUUID id; diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp index 50b2ed8c51..733678364e 100644 --- a/indra/newview/llfloaterimsession.cpp +++ b/indra/newview/llfloaterimsession.cpp @@ -618,7 +618,7 @@ void LLFloaterIMSession::onClose(bool app_quitting) // Last change: // EXT-3516 X Button should end IM session, _ button should hide gIMMgr->leaveSession(mSessionID); - + LLFloaterIMSessionTab::restoreFloater(); // Clean up the conversation *after* the session has been ended LLFloaterIMSessionTab::onClose(app_quitting); } diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 9fd22b1537..c744350dc6 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -194,19 +194,28 @@ BOOL LLFloaterIMSessionTab::postBuild() { BOOL result; + mBodyStack = getChild("main_stack"); + + mCloseBtn = getChild("close_btn"); mCloseBtn->setCommitCallback(boost::bind(&LLFloater::onClickClose, this)); mExpandCollapseBtn = getChild("expand_collapse_btn"); mExpandCollapseBtn->setClickedCallback(boost::bind(&LLFloaterIMSessionTab::onSlide, this)); + mExpandCollapseLineBtn = getChild("minz_btn"); + mExpandCollapseLineBtn->setClickedCallback(boost::bind(&LLFloaterIMSessionTab::onCollapseToLine, this)); + mTearOffBtn = getChild("tear_off_btn"); mTearOffBtn->setCommitCallback(boost::bind(&LLFloaterIMSessionTab::onTearOffClicked, this)); mGearBtn = getChild("gear_btn"); mParticipantListPanel = getChild("speakers_list_panel"); - + mToolbarPanel = getChild("toolbar_panel"); + mContentPanel = getChild("body_panel"); + mInputButtonPanel = getChild("input_button_layout_panel"); + mInputButtonPanel->setVisible(false); // Add a scroller for the folder (participant) view LLRect scroller_view_rect = mParticipantListPanel->getRect(); scroller_view_rect.translate(-scroller_view_rect.mLeft, -scroller_view_rect.mBottom); @@ -264,6 +273,8 @@ BOOL LLFloaterIMSessionTab::postBuild() mConversationsRoot->setFollowsAll(); mConversationsRoot->addChild(mConversationsRoot->mStatusTextBox); + setMessagePaneExpanded(true); + buildConversationViewParticipant(); refreshConversation(); @@ -651,6 +662,7 @@ void LLFloaterIMSessionTab::updateHeaderAndToolbar() 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; @@ -674,6 +686,7 @@ void LLFloaterIMSessionTab::updateHeaderAndToolbar() mTearOffBtn->setImageOverlay(getString(is_not_torn_off? "tear_off_icon" : "return_icon")); mTearOffBtn->setToolTip(getString(is_not_torn_off? "tooltip_to_separate_window" : "tooltip_to_main_window")); + mCloseBtn->setVisible(is_not_torn_off && !mIsNearbyChat); enableDisableCallBtn(); @@ -784,6 +797,65 @@ void LLFloaterIMSessionTab::onSlide(LLFloaterIMSessionTab* self) } } +void LLFloaterIMSessionTab::onCollapseToLine(LLFloaterIMSessionTab* self) +{ + LLFloaterIMContainer* host_floater = dynamic_cast(self->getHost()); + if (!host_floater) + { + if(self->mParticipantListPanel->getVisible()) + { + onSlide(self); + } + + bool expand = self->isMessagePaneExpanded(); + self->mExpandCollapseLineBtn->setImageOverlay(self->getString(expand ? "collapseline_icon" : "expandline_icon")); + self->mContentPanel->setVisible(!expand); + self->mToolbarPanel->setVisible(!expand); + self->reshapeFloater(expand); + self->setMessagePaneExpanded(!expand); + + } +} + +void LLFloaterIMSessionTab::reshapeFloater(bool collapse) +{ + LLRect floater_rect = getRect(); + + if(collapse) + { + mFloaterHeight = floater_rect.getHeight(); + S32 height = mContentPanel->getRect().getHeight() + mToolbarPanel->getRect().getHeight(); + floater_rect.mTop -= height; + enableResizeCtrls(true, true, false); + } + else + { + floater_rect.mTop = floater_rect.mBottom + mFloaterHeight; + enableResizeCtrls(true, true, true); + + } + + setShape(floater_rect, true); + mBodyStack->updateLayout(); + +} + +void LLFloaterIMSessionTab::restoreFloater() +{ + if(!isMessagePaneExpanded()) + { + mContentPanel->setVisible(true); + mToolbarPanel->setVisible(true); + LLRect floater_rect = getRect(); + floater_rect.mTop = floater_rect.mBottom + mFloaterHeight; + setShape(floater_rect, true); + mBodyStack->updateLayout(); + mExpandCollapseLineBtn->setImageOverlay(getString("expandline_icon")); + setMessagePaneExpanded(true); + enableResizeCtrls(true, true, true); + } +} + /*virtual*/ void LLFloaterIMSessionTab::onOpen(const LLSD& key) { @@ -793,12 +865,15 @@ void LLFloaterIMSessionTab::onOpen(const LLSD& key) // Show the messages pane when opening a floater hosted in the Conversations host_floater->collapseMessagesPane(false); } + + mInputButtonPanel->setVisible(isTornOff()); } void LLFloaterIMSessionTab::onTearOffClicked() { - setFollows(isTornOff()? FOLLOWS_ALL : FOLLOWS_NONE); + restoreFloater(); + setFollows(isTornOff()? FOLLOWS_ALL : FOLLOWS_NONE); mSaveRect = isTornOff(); initRectControl(); LLFloater::onClickTearOff(this); @@ -813,7 +888,10 @@ void LLFloaterIMSessionTab::onTearOffClicked() else { container->selectConversation(mSessionID); + } + mInputButtonPanel->setVisible(isTornOff()); + refreshConversation(); updateGearBtn(); } diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h index e8ae557412..e41f639037 100644 --- a/indra/newview/llfloaterimsessiontab.h +++ b/indra/newview/llfloaterimsessiontab.h @@ -98,6 +98,8 @@ public: LLConversationItem* getCurSelectedViewModelItem(); void forceReshape(); virtual BOOL handleKeyHere( KEY key, MASK mask ); + bool isMessagePaneExpanded(){return mMessagePaneExpanded;} + void setMessagePaneExpanded(bool expanded){mMessagePaneExpanded = expanded;} protected: @@ -111,6 +113,9 @@ protected: bool onIMShowModesMenuItemCheck(const LLSD& userdata); bool onIMShowModesMenuItemEnable(const LLSD& userdata); static void onSlide(LLFloaterIMSessionTab *self); + static void onCollapseToLine(LLFloaterIMSessionTab *self); + void reshapeFloater(bool collapse); + void restoreFloater(); // refresh a visual state of the Call button void updateCallBtnState(bool callIsActive); @@ -138,15 +143,22 @@ protected: bool mIsNearbyChat; bool mIsP2PChat; + + bool mMessagePaneExpanded; bool mIsParticipantListExpanded; + LLIMModel::LLIMSession* mSession; // Participants list: model and view LLConversationViewParticipant* createConversationViewParticipant(LLConversationItem* item); LLUUID mSessionID; + LLLayoutStack* mBodyStack; LLLayoutPanel* mParticipantListPanel; // add the widgets to that see mConversationsListPanel + LLLayoutPanel* mContentPanel; + LLLayoutPanel* mToolbarPanel; + LLLayoutPanel* mInputButtonPanel; LLParticipantList* getParticipantList(); conversations_widgets_map mConversationsWidgets; LLConversationViewModel mConversationViewModel; @@ -158,11 +170,14 @@ protected: LLChatEntry* mInputEditor; int mInputEditorTopPad; // padding between input field and chat history + LLButton* mExpandCollapseLineBtn; LLButton* mExpandCollapseBtn; LLButton* mTearOffBtn; LLButton* mCloseBtn; LLButton* mGearBtn; + S32 mFloaterHeight; + private: // Handling selection and contextual menu diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 1d62a32fc2..d04e76c0b3 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -226,17 +226,18 @@ void on_new_message(const LLSD& msg) && !session_floater->isMinimized() && !(session_floater->getHost() && session_floater->getHost()->isMinimized()); - if ("toast" == action && !session_floater_is_open) + bool conversation_floater_collapsed = !session_floater->isMessagePaneExpanded(); + if (("toast" == action && !session_floater_is_open) || conversation_floater_collapsed) { //User is not focused on conversation containing the message - if(session_floater_not_focused) + if(session_floater_not_focused || conversation_floater_collapsed) { if(!LLMuteList::getInstance()->isMuted(participant_id)) { im_box->flashConversationItemWidget(session_id, true); } //The conversation floater isn't focused/open - if(conversation_floater_not_focused) + if(conversation_floater_not_focused || conversation_floater_collapsed) { if(!LLMuteList::getInstance()->isMuted(participant_id) && !gAgent.isDoNotDisturb()) diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index a07d7e4855..93c9cb02cb 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -171,6 +171,8 @@ with the same filename but different name + + diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml index 8f0574177f..1a9199f9e7 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -19,6 +19,12 @@ positioning="relative"> Conv_toolbar_open_call Conv_toolbar_hang_up + + @@ -65,14 +71,28 @@ top="0" left="0" height="355" - width="394"> - + + + - + + @@ -208,7 +235,7 @@ tab_group="2" follows="all" top="0" - height="310" + height="275" width="244" layout="topleft" user_resize="true" @@ -221,13 +248,13 @@ follows="all" layout="topleft" visible="true" - height="275" + height="240" width="244"> - + + + + + + - + + +