From 5187f5b41f8b748dd7f092d97e69f24a4c43f4ee Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 20 Mar 2013 15:08:02 +0200 Subject: CHUI-869 FIXED Clicking on toast will restore Message pane. --- indra/newview/llfloaterimnearbychat.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index 7c552f98e0..3af3c65045 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -348,6 +348,11 @@ bool LLFloaterIMNearbyChat::isChatVisible() const void LLFloaterIMNearbyChat::showHistory() { openFloater(); + if(!isMessagePaneExpanded()) + { + restoreFloater(); + setFocus(true); + } setResizeLimits(getMinWidth(), EXPANDED_MIN_HEIGHT); } -- cgit v1.2.3 From 78e0dc5aa3650c74aade364b7be4669d58fe8316 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 20 Mar 2013 15:30:27 +0200 Subject: CHUI-860 FIXED Don't call onSlide() to change Participant list's state --- indra/newview/llfloaterimsessiontab.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index cfd239c22f..4ae00fcd5f 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -802,18 +802,12 @@ 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); - } } -- cgit v1.2.3 From cee1a311ad218c6d5ed8ae9924624d959b6be6a0 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 20 Mar 2013 15:41:57 +0200 Subject: CHUI-870 FIXED Expand Message panel after clicking toast. --- indra/newview/llfloaterimcontainer.cpp | 3 +++ indra/newview/llfloaterimsessiontab.cpp | 4 ++++ indra/newview/llfloaterimsessiontab.h | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 2fd8901d9e..5e0cd8ef78 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1329,6 +1329,9 @@ void LLFloaterIMContainer::showConversation(const LLUUID& session_id) { setVisibleAndFrontmost(false); selectConversationPair(session_id, true); + + LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(session_id); + session_floater->restoreFloater(); } void LLFloaterIMContainer::clearAllFlashStates() diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 4ae00fcd5f..5df1a382cd 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -838,6 +838,10 @@ void LLFloaterIMSessionTab::restoreFloater() { if(!isMessagePaneExpanded()) { + if(isMinimized()) + { + setMinimized(false); + } mContentPanel->setVisible(true); mToolbarPanel->setVisible(true); LLRect floater_rect = getRect(); diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h index e41f639037..f22e2b5744 100644 --- a/indra/newview/llfloaterimsessiontab.h +++ b/indra/newview/llfloaterimsessiontab.h @@ -100,6 +100,7 @@ public: virtual BOOL handleKeyHere( KEY key, MASK mask ); bool isMessagePaneExpanded(){return mMessagePaneExpanded;} void setMessagePaneExpanded(bool expanded){mMessagePaneExpanded = expanded;} + void restoreFloater(); protected: @@ -115,7 +116,6 @@ protected: 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); -- cgit v1.2.3 From a48cd164a20734722e25592f5cf22c8344dd4860 Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Wed, 20 Mar 2013 21:51:36 +0200 Subject: CHUI-857 Nearby chat opens as torn off on first login: changed initial setting for nearby chat docked state --- indra/newview/app_settings/settings_per_account.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index 47137c8de9..ada374f892 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -290,7 +290,7 @@ Type Boolean Value - 0 + 1 ShowFavoritesOnLogin -- cgit v1.2.3 From 4a2fb4c64f2079089b78202e53bbe1dbe8ac09c7 Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Wed, 20 Mar 2013 22:27:16 +0200 Subject: CHUI-873 FIXED [CHUIBUG]Torn off nearby chat with message panel hidden has huge bottom padding when opening in mouselook mode --- indra/newview/llfloaterimnearbychat.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index 3af3c65045..b287950c21 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -739,7 +739,14 @@ void LLFloaterIMNearbyChat::startChat(const char* line) LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance("nearby_chat"); if (nearby_chat) { - nearby_chat->show(); + if(!nearby_chat->isTornOff()) + { + nearby_chat->show(); + } + if(nearby_chat->isMinimized()) + { + nearby_chat->setMinimized(false); + } nearby_chat->setVisible(TRUE); nearby_chat->setFocus(TRUE); nearby_chat->mInputEditor->setFocus(TRUE); -- cgit v1.2.3 From 1df1ce7a31df77743675899d4a15458ac84a281a Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Thu, 21 Mar 2013 15:57:44 +0200 Subject: CHUI-858 FIXED Text can be clipped by text input bar in message panel --- indra/newview/skins/default/xui/en/floater_im_session.xml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'indra/newview') 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 e081ea8e74..1ad54bdb6b 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -266,6 +266,7 @@ left="0"> + left="5" + top="0" + bottom="1"> @@ -348,7 +350,6 @@ auto_resize="true" name="input_editor_layout_panel"> -- cgit v1.2.3 From 9887daa3e3224b00ffc46ce69604b3227b14637c Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 21 Mar 2013 18:04:10 +0200 Subject: CHUI-880 FIXED Show Button panel if floater is torned off. Don't show Conversation floater in Mouselook, if Nearby chat is torned off. --- indra/newview/llfloaterimsessiontab.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 5df1a382cd..7b50ce5ae2 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -30,6 +30,7 @@ #include "llfloaterimsessiontab.h" #include "llagent.h" +#include "llagentcamera.h" #include "llavataractions.h" #include "llchatentry.h" #include "llchathistory.h" @@ -125,8 +126,12 @@ void LLFloaterIMSessionTab::setVisible(BOOL visible) if(visible && !mHasVisibleBeenInitialized) { mHasVisibleBeenInitialized = true; - LLFloaterReg::getTypedInstance("im_container")->setVisible(true); + if(!gAgentCamera.cameraMouselook()) + { + LLFloaterReg::getTypedInstance("im_container")->setVisible(true); + } LLFloaterIMSessionTab::addToHost(mSessionID); + mInputButtonPanel->setVisible(isTornOff()); } LLTransientDockableFloater::setVisible(visible); -- cgit v1.2.3 From 4d9e3e159e63a0317a069c9d74c6904d5b222537 Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Thu, 21 Mar 2013 18:29:18 +0200 Subject: CHUI-855 FIXED Text entry bar auto expand does not resize --- indra/newview/llfloaterimsessiontab.cpp | 20 ++++++++++---------- indra/newview/llfloaterimsessiontab.h | 5 +++-- 2 files changed, 13 insertions(+), 12 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 7b50ce5ae2..0dd61568f9 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -58,11 +58,12 @@ LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id) , mSpeakingIndicator(NULL) , mChatHistory(NULL) , mInputEditor(NULL) - , mInputEditorTopPad(0) + , mInputEditorPad(0) , mRefreshTimer(new LLTimer()) , mIsHostAttached(false) , mHasVisibleBeenInitialized(false) , mIsParticipantListExpanded(true) + , mChatLayoutPanel(NULL) { setAutoFocus(FALSE); mSession = LLIMModel::getInstance()->findIMSession(mSessionID); @@ -237,12 +238,15 @@ BOOL LLFloaterIMSessionTab::postBuild() mChatHistory = getChild("chat_history"); mInputEditor = getChild("chat_editor"); - mInputEditor->setTextExpandedCallback(boost::bind(&LLFloaterIMSessionTab::reshapeChatHistory, this)); + + mChatLayoutPanel = getChild("chat_layout_panel"); + + mInputEditor->setTextExpandedCallback(boost::bind(&LLFloaterIMSessionTab::reshapeChatLayoutPanel, this)); mInputEditor->setCommitOnFocusLost( FALSE ); mInputEditor->setPassDelete(TRUE); mInputEditor->setFont(LLViewerChat::getChatFont()); - mInputEditorTopPad = mChatHistory->getRect().mBottom - mInputEditor->getRect().mTop; + mInputEditorPad = mChatLayoutPanel->getRect().getHeight() - mInputEditor->getRect().getHeight(); setOpenPositioning(LLFloaterEnums::POSITIONING_RELATIVE); @@ -708,15 +712,11 @@ void LLFloaterIMSessionTab::forceReshape() } -void LLFloaterIMSessionTab::reshapeChatHistory() +void LLFloaterIMSessionTab::reshapeChatLayoutPanel() { - LLRect chat_rect = mChatHistory->getRect(); + LLRect chat_layout_panel_rect = mChatLayoutPanel->getRect(); LLRect input_rect = mInputEditor->getRect(); - - int delta_height = chat_rect.mBottom - (input_rect.mTop + mInputEditorTopPad); - - chat_rect.setLeftTopAndSize(chat_rect.mLeft, chat_rect.mTop, chat_rect.getWidth(), chat_rect.getHeight() + delta_height); - mChatHistory->setShape(chat_rect); + mChatLayoutPanel->reshape(chat_layout_panel_rect.getWidth(), input_rect.getHeight() + mInputEditorPad, FALSE); } void LLFloaterIMSessionTab::showTranslationCheckbox(BOOL show) diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h index f22e2b5744..e9393c5336 100644 --- a/indra/newview/llfloaterimsessiontab.h +++ b/indra/newview/llfloaterimsessiontab.h @@ -168,7 +168,8 @@ protected: LLOutputMonitorCtrl* mSpeakingIndicator; LLChatHistory* mChatHistory; LLChatEntry* mInputEditor; - int mInputEditorTopPad; // padding between input field and chat history + LLLayoutPanel * mChatLayoutPanel; + int mInputEditorPad; // padding between input field and chat history LLButton* mExpandCollapseLineBtn; LLButton* mExpandCollapseBtn; @@ -195,7 +196,7 @@ private: * and avoid overlapping, since input chat field can be vertically expanded. * Implementation: chat history bottom "follows" top+top_pad of input chat field */ - void reshapeChatHistory(); + void reshapeChatLayoutPanel(); bool checkIfTornOff(); bool mIsHostAttached; -- cgit v1.2.3 From bbfd1c0f2d89de50c0c0e026208036e2bc963104 Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Thu, 21 Mar 2013 18:44:01 +0200 Subject: CHUI-878 FIXED Torn off conversation window width can be reduced and lose vertical scroll bar: manually setting of the floater's minimal size --- indra/newview/llfloaterimsessiontab.cpp | 50 +++++++++++++++++----- indra/newview/llfloaterimsessiontab.h | 5 +++ .../skins/default/xui/en/floater_im_session.xml | 8 ++-- 3 files changed, 49 insertions(+), 14 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 0dd61568f9..eab2ce7798 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -196,12 +196,29 @@ void LLFloaterIMSessionTab::addToHost(const LLUUID& session_id) } } +void LLFloaterIMSessionTab::assignResizeLimits() +{ + bool is_participants_pane_collapsed = mParticipantListPanel->isCollapsed(); + + // disable a layoutstack's functionality when participant list panel is collapsed + mRightPartPanel->setIgnoreReshape(is_participants_pane_collapsed); + + S32 participants_pane_target_width = is_participants_pane_collapsed? + 0 : (mParticipantListPanel->getRect().getWidth() + LLPANEL_BORDER_WIDTH); + + S32 new_min_width = participants_pane_target_width + mRightPartPanel->getExpandedMinDim() + mFloaterExtraWidth; + + setResizeLimits(new_min_width, getMinHeight()); + + this->mParticipantListAndHistoryStack->updateLayout(); +} + BOOL LLFloaterIMSessionTab::postBuild() { BOOL result; mBodyStack = getChild("main_stack"); - + mParticipantListAndHistoryStack = getChild("im_panels"); mCloseBtn = getChild("close_btn"); mCloseBtn->setCommitCallback(boost::bind(&LLFloater::onClickClose, this)); @@ -218,6 +235,8 @@ BOOL LLFloaterIMSessionTab::postBuild() mGearBtn = getChild("gear_btn"); mParticipantListPanel = getChild("speakers_list_panel"); + mRightPartPanel = getChild("right_part_holder"); + mToolbarPanel = getChild("toolbar_panel"); mContentPanel = getChild("body_panel"); mInputButtonPanel = getChild("input_button_layout_panel"); @@ -297,6 +316,15 @@ BOOL LLFloaterIMSessionTab::postBuild() LLFloaterIMSessionTab::onSlide(this); } + // The resize limits for LLFloaterIMSessionTab should be updated, based on current values of width of conversation and message panels + mParticipantListPanel->getResizeBar()->setResizeListener(boost::bind(&LLFloaterIMSessionTab::assignResizeLimits, this)); + mFloaterExtraWidth = + getRect().getWidth() + - mParticipantListAndHistoryStack->getRect().getWidth() + - (mParticipantListPanel->isCollapsed()? 0 : LLPANEL_BORDER_WIDTH); + + assignResizeLimits(); + return result; } @@ -669,8 +697,7 @@ void LLFloaterIMSessionTab::updateHeaderAndToolbar() && mIsParticipantListExpanded && !mIsP2PChat; - mParticipantListPanel->setVisible(is_participant_list_visible); - + mParticipantListAndHistoryStack->collapsePanel(mParticipantListPanel, !is_participant_list_visible); // Display collapse image (<<) if the floater is hosted // or if it is torn off but has an open control panel. @@ -791,15 +818,18 @@ void LLFloaterIMSessionTab::onSlide(LLFloaterIMSessionTab* self) { if (!self->mIsP2PChat) { - bool expand = !self->mParticipantListPanel->getVisible(); - - // Expand/collapse the IM control panel - self->mParticipantListPanel->setVisible(expand); - gSavedSettings.setBOOL("IMShowControlPanel", expand); - self->mIsParticipantListExpanded = expand; - self->mExpandCollapseBtn->setImageOverlay(self->getString(expand ? "collapse_icon" : "expand_icon")); + 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); + gSavedSettings.setBOOL("IMShowControlPanel", should_be_expanded); + self->mIsParticipantListExpanded = should_be_expanded; + self->mExpandCollapseBtn->setImageOverlay(self->getString(should_be_expanded ? "collapse_icon" : "expand_icon")); } } + + self->assignResizeLimits(); } void LLFloaterIMSessionTab::onCollapseToLine(LLFloaterIMSessionTab* self) diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h index e9393c5336..f0899a3c09 100644 --- a/indra/newview/llfloaterimsessiontab.h +++ b/indra/newview/llfloaterimsessiontab.h @@ -140,6 +140,9 @@ protected: void appendMessage(const LLChat& chat, const LLSD &args = 0); std::string appendTime(); + void assignResizeLimits(); + + S32 mFloaterExtraWidth; bool mIsNearbyChat; bool mIsP2PChat; @@ -155,7 +158,9 @@ protected: LLUUID mSessionID; LLLayoutStack* mBodyStack; + LLLayoutStack* mParticipantListAndHistoryStack; LLLayoutPanel* mParticipantListPanel; // add the widgets to that see mConversationsListPanel + LLLayoutPanel* mRightPartPanel; LLLayoutPanel* mContentPanel; LLLayoutPanel* mToolbarPanel; LLLayoutPanel* mInputButtonPanel; 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 1ad54bdb6b..d8b085063f 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -14,7 +14,6 @@ width="394" can_resize="true" can_tear_off="false" - min_width="340" min_height="190" positioning="relative"> Conv_toolbar_open_call @@ -223,9 +222,10 @@ @@ -241,7 +241,7 @@ user_resize="true" auto_resize="true" visible="true" - name="left_part_holder" + name="right_part_holder" min_width="221"> Date: Thu, 21 Mar 2013 18:32:03 -0700 Subject: CHUI-871, CHUI-738 : Fixed! Name tags existence was using a bogus test. Using a boolean for existence and straight logic, no intermediate string --- indra/newview/llvoavatar.cpp | 12 +++++------- indra/newview/llvoavatar.h | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index d295fc60cd..a3093f069d 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -675,7 +675,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mBelowWater(FALSE), mLastAppearanceBlendTime(0.f), mAppearanceAnimating(FALSE), - mNameString(), + mNameIsSet(false), mTitle(), mNameAway(false), mNameDoNotDisturb(false), @@ -3096,8 +3096,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name) } // Rebuild name tag if state change detected - if (mNameString.empty() - || (mNameString.size() == 2 && mNameString[0] == 10 && mNameString[1] == 10) // *TODO : find out why mNameString is sometimes "" + if (!mNameIsSet || new_name || (!title && !mTitle.empty()) || (title && mTitle != title->getString()) @@ -3292,17 +3291,16 @@ void LLVOAvatar::addNameTagLine(const std::string& line, const LLColor4& color, { mNameText->addLine(line, color, (LLFontGL::StyleFlags)style, font); } - mNameString += line; - mNameString += '\n'; + mNameIsSet |= !line.empty(); } void LLVOAvatar::clearNameTag() { - mNameString.clear(); + mNameIsSet = false; if (mNameText) { mNameText->setLabel(""); - mNameText->setString( "" ); + mNameText->setString(""); } mTimeVisible.reset(); } diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index c59a3a150c..9f1f209920 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -939,7 +939,7 @@ protected: static void getAnimLabels(LLDynamicArray* labels); static void getAnimNames(LLDynamicArray* names); private: - std::string mNameString; // UTF-8 title + name + status + bool mNameIsSet; std::string mTitle; bool mNameAway; bool mNameDoNotDisturb; -- cgit v1.2.3 From b2d122975a68a53887c321c8fbca9eeb78add003 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 22 Mar 2013 15:21:58 +0200 Subject: CHUI-879 FIXED Expand and then collapse message pane when floater opens to avoid UI issues. --- indra/newview/llfloaterimnearbychat.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index b287950c21..171509af59 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -283,6 +283,11 @@ void LLFloaterIMNearbyChat::onTearOffClicked() void LLFloaterIMNearbyChat::onOpen(const LLSD& key) { LLFloaterIMSessionTab::onOpen(key); + if(!isMessagePaneExpanded()) + { + restoreFloater(); + onCollapseToLine(this); + } showTranslationCheckbox(LLTranslate::isTranslationConfigured()); } -- cgit v1.2.3 From c8f83f48955911c858fbaba44c6972e546aa8ce7 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 22 Mar 2013 18:58:20 +0200 Subject: CHUI-854 FIXED Don't expand chat in collapsed mode. --- indra/newview/llfloaterimcontainer.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 5e0cd8ef78..bf7fe6db36 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1963,10 +1963,13 @@ bool LLFloaterIMContainer::selectNextorPreviousConversation(bool select_next, bo void LLFloaterIMContainer::expandConversation() { - LLConversationViewSession* widget = dynamic_cast(get_ptr_in_map(mConversationsWidgets,getSelectedSession())); - if (widget) + if(!mConversationsPane->isCollapsed()) { - widget->setOpen(!widget->isOpen()); + LLConversationViewSession* widget = dynamic_cast(get_ptr_in_map(mConversationsWidgets,getSelectedSession())); + if (widget) + { + widget->setOpen(!widget->isOpen()); + } } } -- cgit v1.2.3 From d8c778bf99ffb02d61099e8b557b6fa827ad0429 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 22 Mar 2013 15:39:04 -0700 Subject: CHUI-877 : Fixed! Ignore the Vivox buffy names right now and avoid invalidation avatar name cache when seeing a difference with vivox --- indra/newview/llvoicevivox.cpp | 69 +++++++++++++++--------------------------- indra/newview/llvoicevivox.h | 1 - 2 files changed, 25 insertions(+), 45 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index f3342b7ff1..c3cc90f040 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -1258,7 +1258,7 @@ void LLVivoxVoiceClient::stateMachine() //MARK: stateCreatingSessionGroup case stateCreatingSessionGroup: - if(mSessionTerminateRequested || !mVoiceEnabled && mIsInitialized) + if(mSessionTerminateRequested || (!mVoiceEnabled && mIsInitialized)) { // *TODO: Question: is this the right way out of this state setState(stateSessionTerminated); @@ -1274,7 +1274,7 @@ void LLVivoxVoiceClient::stateMachine() //MARK: stateRetrievingParcelVoiceInfo case stateRetrievingParcelVoiceInfo: // wait until parcel voice info is received. - if(mSessionTerminateRequested || !mVoiceEnabled && mIsInitialized) + if(mSessionTerminateRequested || (!mVoiceEnabled && mIsInitialized)) { // if a terminate request has been received, // bail and go to the stateSessionTerminated @@ -1294,7 +1294,7 @@ void LLVivoxVoiceClient::stateMachine() // Otherwise, if you log in but don't join a proximal channel (such as when your login location has voice disabled), your friends list won't sync. sendFriendsListUpdates(); - if(mSessionTerminateRequested || !mVoiceEnabled && mIsInitialized) + if(mSessionTerminateRequested || (!mVoiceEnabled && mIsInitialized)) { // TODO: Question: Is this the right way out of this state? setState(stateSessionTerminated); @@ -1442,7 +1442,7 @@ void LLVivoxVoiceClient::stateMachine() //MARK: stateRunning case stateRunning: // steady state // Disabling voice or disconnect requested. - if(!mVoiceEnabled && mIsInitialized || mSessionTerminateRequested) + if((!mVoiceEnabled && mIsInitialized) || mSessionTerminateRequested) { leaveAudioSession(); } @@ -2671,33 +2671,19 @@ void LLVivoxVoiceClient::checkFriend(const LLUUID& id) { buddyListEntry *buddy = findBuddy(id); - // Make sure we don't add a name before it's been looked up. + // Make sure we don't add a name before it's been looked up in the avatar name cache LLAvatarName av_name; - if(LLAvatarNameCache::get(id, &av_name)) + if (LLAvatarNameCache::get(id, &av_name)) { - // *NOTE: For now, we feed legacy names to Vivox because I don't know - // if their service can support a mix of new and old clients with - // different sorts of names. + // *NOTE: We feed legacy names to Vivox because we don't know if their service + // can support a mix of new and old clients with different sorts of names. std::string name = av_name.getAccountName(); - - const LLRelationship* relationInfo = LLAvatarTracker::instance().getBuddyInfo(id); - bool canSeeMeOnline = false; - if(relationInfo && relationInfo->isRightGrantedTo(LLRelationship::GRANT_ONLINE_STATUS)) - canSeeMeOnline = true; - - // When we get here, mNeedsSend is true and mInSLFriends is false. Change them as necessary. - if(buddy) + if (buddy) { - // This buddy is already in both lists. - - if(name != buddy->mDisplayName) - { - // The buddy is in the list with the wrong name. Update it with the correct name. - LL_WARNS("Voice") << "Buddy " << id << " has wrong name (\"" << buddy->mDisplayName << "\" should be \"" << name << "\"), updating."<< LL_ENDL; - buddy->mDisplayName = name; - buddy->mNeedsNameUpdate = true; // This will cause the buddy to be resent. - } + // This buddy is already in both lists (vivox buddies and avatar cache). + // Trust the avatar cache more for the display name (vivox display name are notoriously wrong) + buddy->mDisplayName = name; } else { @@ -2706,20 +2692,19 @@ void LLVivoxVoiceClient::checkFriend(const LLUUID& id) buddy->mUUID = id; } - // In all the above cases, the buddy is in the SL friends list (which is how we got here). - buddy->mInSLFriends = true; - buddy->mCanSeeMeOnline = canSeeMeOnline; + const LLRelationship* relationInfo = LLAvatarTracker::instance().getBuddyInfo(id); + buddy->mCanSeeMeOnline = (relationInfo && relationInfo->isRightGrantedTo(LLRelationship::GRANT_ONLINE_STATUS)); + // In all the above cases, the buddy is in the SL friends list and tha name has been resolved (which is how we got here). buddy->mNameResolved = true; - + buddy->mInSLFriends = true; } else { - // This name hasn't been looked up yet. Don't do anything with this buddy list entry until it has. - if(buddy) + // This name hasn't been looked up yet in the avatar cache. Don't do anything with this buddy list entry until it has. + if (buddy) { buddy->mNameResolved = false; } - // Initiate a lookup. // The "lookup completed" callback will ensure that the friends list is rechecked after it completes. lookupName(id); @@ -2827,13 +2812,12 @@ void LLVivoxVoiceClient::sendFriendsListUpdates() { std::ostringstream stream; - if(buddy->mInSLFriends && (!buddy->mInVivoxBuddies || buddy->mNeedsNameUpdate)) + if(buddy->mInSLFriends && !buddy->mInVivoxBuddies) { if(mNumberOfAliases > 0) { // Add (or update) this entry in the vivox buddy list buddy->mInVivoxBuddies = true; - buddy->mNeedsNameUpdate = false; LL_DEBUGS("Voice") << "add/update " << buddy->mURI << " (" << buddy->mDisplayName << ")" << LL_ENDL; stream << "" @@ -5859,7 +5843,6 @@ LLVivoxVoiceClient::buddyListEntry::buddyListEntry(const std::string &uri) : mNameResolved = false; mInVivoxBuddies = false; mInSLFriends = false; - mNeedsNameUpdate = false; } void LLVivoxVoiceClient::processBuddyListEntry(const std::string &uri, const std::string &displayName) @@ -5884,25 +5867,21 @@ LLVivoxVoiceClient::buddyListEntry *LLVivoxVoiceClient::addBuddy(const std::stri buddyListEntry *result = NULL; buddyListMap::iterator iter = mBuddyListMap.find(uri); - if(iter != mBuddyListMap.end()) + if (iter != mBuddyListMap.end()) { // Found a matching buddy already in the map. LL_DEBUGS("Voice") << "adding existing buddy " << uri << LL_ENDL; result = iter->second; } - if(!result) + if (!result) { // participant isn't already in one list or the other. LL_DEBUGS("Voice") << "adding new buddy " << uri << LL_ENDL; result = new buddyListEntry(uri); result->mDisplayName = displayName; - if(IDFromName(uri, result->mUUID)) - { - // Extracted UUID from name successfully. - } - else + if (!IDFromName(uri, result->mUUID)) { LL_DEBUGS("Voice") << "Couldn't find ID for buddy " << uri << " (\"" << displayName << "\")" << LL_ENDL; } @@ -7272,7 +7251,7 @@ void LLVivoxProtocolParser::StartTag(const char *tag, const char **attr) void LLVivoxProtocolParser::EndTag(const char *tag) { const std::string& string = textBuffer; - + responseDepth--; if (ignoringTags) @@ -7371,6 +7350,8 @@ void LLVivoxProtocolParser::EndTag(const char *tag) } else if (!stricmp("Buddy", tag)) { + // NOTE : Vivox does *not* give reliable display name for Buddy tags + // We don't take those very seriously as a result... LLVivoxVoiceClient::getInstance()->processBuddyListEntry(uriString, displayNameString); } else if (!stricmp("BlockRule", tag)) diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index 574027de42..a6f40eb3e9 100644 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -584,7 +584,6 @@ protected: bool mNameResolved; bool mInSLFriends; bool mInVivoxBuddies; - bool mNeedsNameUpdate; }; typedef std::map buddyListMap; -- cgit v1.2.3 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') 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 0af5b073e0557a4918d4094841c3a045a8c71ba9 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Sat, 23 Mar 2013 16:49:51 -0700 Subject: CHUI-888 : Fixed! Overload setVisibleAndFrontmost() so that we set the focus if requested (was dropped in the shuffle before). --- indra/newview/llfloaterimcontainer.cpp | 6 ++++++ indra/newview/llfloaterimcontainer.h | 1 + 2 files changed, 7 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index bf7fe6db36..0cda1f79b3 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -626,6 +626,12 @@ void LLFloaterIMContainer::setVisible(BOOL visible) LLMultiFloater::setVisible(visible); } +void LLFloaterIMContainer::setVisibleAndFrontmost(BOOL take_focus, const LLSD& key) +{ + LLMultiFloater::setVisibleAndFrontmost(take_focus, key); + selectConversationPair(getSelectedSession(), false, take_focus); +} + void LLFloaterIMContainer::updateResizeLimits() { LLMultiFloater::updateResizeLimits(); diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index 2cbc1e99f9..52b672241f 100644 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -60,6 +60,7 @@ public: /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void draw(); /*virtual*/ void setVisible(BOOL visible); + /*virtual*/ void setVisibleAndFrontmost(BOOL take_focus=TRUE, const LLSD& key = LLSD()); /*virtual*/ void updateResizeLimits(); void onCloseFloater(LLUUID& id); -- cgit v1.2.3