From 50792b7c2a2fffd8d6fb99c1f5148e9881f0101d Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Tue, 15 Dec 2009 13:22:09 +0200 Subject: fix for normal EXT-3252 IM well closes if the lower IM session has been closed --HG-- branch : product-engine --- indra/newview/llsyswellwindow.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/newview/llsyswellwindow.cpp') diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 1ebf624eeb..c269e0b47e 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -752,6 +752,13 @@ void LLIMWellWindow::addIMRow(const LLUUID& sessionId, S32 chicletCounter, //--------------------------------------------------------------------------------- void LLIMWellWindow::delIMRow(const LLUUID& sessionId) { + //fix for EXT-3252 + //without this line LLIMWellWindow receive onFocusLost + //and hide itself. It was becaue somehow LLIMChicklet was in focus group for + //LLIMWellWindow... + //But I didn't find why this happen.. + gFocusMgr.clearLastFocusForGroup(this); + if (mMessageList->removeItemByValue(sessionId)) { handleItemRemoved(IT_INSTANT_MESSAGE); @@ -771,6 +778,10 @@ void LLIMWellWindow::delIMRow(const LLUUID& sessionId) { setVisible(FALSE); } + else + { + setFocus(true); + } } void LLIMWellWindow::addObjectRow(const LLUUID& object_id, bool new_message/* = false*/) -- cgit v1.2.3 From fe56e4fbfb57e24b83ed644e8b3843abd409ed75 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Tue, 15 Dec 2009 14:28:51 +0200 Subject: fix for bug EXT-3254 IM well expands unexpectedly after attempt to resize problem was with floater minHeight. set minheight to 1 list item height (so 1 item is always visible) --HG-- branch : product-engine --- indra/newview/llsyswellwindow.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'indra/newview/llsyswellwindow.cpp') diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index c269e0b47e..ca7cb0f59f 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -246,6 +246,24 @@ void LLSysWellWindow::handleItemAdded(EItemType added_item_type) // refresh list to recalculate mSeparator position mMessageList->reshape(mMessageList->getRect().getWidth(), mMessageList->getRect().getHeight()); } + + //fix for EXT-3254 + //set limits for min_height. + S32 parent_list_delta_height = getRect().getHeight() - mMessageList->getRect().getHeight(); + + std::vector items; + mMessageList->getItems(items); + + if(items.size()>1)//first item is separator + { + S32 min_height; + S32 min_width; + getResizeLimits(&min_width,&min_height); + + min_height = items[1]->getRect().getHeight() + 2 * mMessageList->getBorderWidth() + parent_list_delta_height; + + setResizeLimits(min_width,min_height); + } } void LLSysWellWindow::handleItemRemoved(EItemType removed_item_type) -- cgit v1.2.3 From 5eb82cdeaa4202ee696308b421d68061d4029b8c Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Tue, 15 Dec 2009 18:56:38 +0200 Subject: Work on task EXT-3147 (Implement new states for message indicators) -- Implemented requirement: Opening either Message Well will clear the "new messages" state (and thus the "lit" status), even though there may still be unread messages --HG-- branch : product-engine --- indra/newview/llsyswellwindow.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'indra/newview/llsyswellwindow.cpp') diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index ca7cb0f59f..ae13071b6b 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -51,6 +51,7 @@ LLSysWellWindow::LLSysWellWindow(const LLSD& key) : LLDockableFloater(NULL, key), mChannel(NULL), mMessageList(NULL), + mSysWellChiclet(NULL), mSeparator(NULL), NOTIFICATION_WELL_ANCHOR_NAME("notification_well_panel"), IM_WELL_ANCHOR_NAME("im_well_panel") @@ -80,6 +81,9 @@ BOOL LLSysWellWindow::postBuild() mMessageList->addItem(mSeparator); + // click on SysWell Window should clear "new message" state (and 'Lit' status). EXT-3147. + setMouseDownCallback(boost::bind(&LLSysWellWindow::releaseNewMessagesState, this)); + return LLDockableFloater::postBuild(); } @@ -174,6 +178,11 @@ void LLSysWellWindow::setVisible(BOOL visible) mChannel->updateShowToastsState(); mChannel->redrawToasts(); } + + if (visible) + { + releaseNewMessagesState(); + } } //--------------------------------------------------------------------------------- @@ -227,6 +236,14 @@ void LLSysWellWindow::reshapeWindow() } } +void LLSysWellWindow::releaseNewMessagesState() +{ + if (NULL != mSysWellChiclet) + { + mSysWellChiclet->setNewMessagesState(false); + } +} + //--------------------------------------------------------------------------------- bool LLSysWellWindow::isWindowEmpty() { -- cgit v1.2.3 From 06f8017674295191d3c4400eacb36e34a167ffa5 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Tue, 15 Dec 2009 19:32:22 +0200 Subject: added more comments to code --HG-- branch : product-engine --- indra/newview/llsyswellwindow.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llsyswellwindow.cpp') diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index ae13071b6b..ea49f9c32e 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -82,6 +82,7 @@ BOOL LLSysWellWindow::postBuild() mMessageList->addItem(mSeparator); // click on SysWell Window should clear "new message" state (and 'Lit' status). EXT-3147. + // mouse up callback is not called in this case. setMouseDownCallback(boost::bind(&LLSysWellWindow::releaseNewMessagesState, this)); return LLDockableFloater::postBuild(); -- cgit v1.2.3 From 9dd2b290318f657b3dca81278f597cc702a6e149 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 16 Dec 2009 15:30:33 +0200 Subject: fixed EXT-2884 Initiation of a voice call should not bring text chat (p2p, ad-hoc, group) Added flag to an LLIMSession which indicated whether it has been created for a voice call. --HG-- branch : product-engine --- indra/newview/llsyswellwindow.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'indra/newview/llsyswellwindow.cpp') diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index ea49f9c32e..f49e7ef0da 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -709,15 +709,15 @@ BOOL LLIMWellWindow::postBuild() void LLIMWellWindow::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) { - if (mMessageList->getItemByValue(session_id) == NULL) - { - S32 chicletCounter = LLIMModel::getInstance()->getNumUnread(session_id); - if (chicletCounter > -1) - { - addIMRow(session_id, chicletCounter, name, other_participant_id); - reshapeWindow(); - } - } + if (!mMessageList->getItemByValue(session_id)) return; + + // For im sessions started as voice call chiclet gets created on the first incoming message + if (gIMMgr->isVoiceCall(session_id)) return; + + if (!gIMMgr->hasSession(session_id)) return; + + addIMRow(session_id, 0, name, other_participant_id); + reshapeWindow(); } //virtual -- cgit v1.2.3 From 68b687b73e69e90d605680d51452f9ddc7e48e64 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 17 Dec 2009 15:47:21 +0200 Subject: Fixed major bug EXT-3539 (IM well floater doesn't appear after IM well button has been pressed) - Fixed wrong condition to chech if item for passed session already exists in the list --HG-- branch : product-engine --- indra/newview/llsyswellwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llsyswellwindow.cpp') diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index f49e7ef0da..feaa22e7f0 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -709,8 +709,8 @@ BOOL LLIMWellWindow::postBuild() void LLIMWellWindow::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) { - if (!mMessageList->getItemByValue(session_id)) return; - + if (mMessageList->getItemByValue(session_id)) return; + // For im sessions started as voice call chiclet gets created on the first incoming message if (gIMMgr->isVoiceCall(session_id)) return; -- cgit v1.2.3 From 30f3397e35df30d444f17b00c43fb6135ddc0604 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Thu, 17 Dec 2009 17:49:08 +0200 Subject: fix. EXT-2884 Initiation of a voice call should not bring text chat (p2p, ad-hoc, group) correct chiclet handling functionality in IM when im session is started as voice call --HG-- branch : product-engine --- indra/newview/llsyswellwindow.cpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'indra/newview/llsyswellwindow.cpp') diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index feaa22e7f0..3769ddb1cc 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -32,6 +32,8 @@ #include "llviewerprecompiledheaders.h" // must be first include +#include "llagent.h" + #include "llflatlistview.h" #include "llfloaterreg.h" #include "llnotifications.h" @@ -857,4 +859,36 @@ void LLIMWellWindow::removeObjectRow(const LLUUID& object_id) } } + +void LLIMWellWindow::addIMRow(const LLUUID& session_id) +{ + if (hasIMRow(session_id)) return; + + LLIMModel* im_model = LLIMModel::getInstance(); + addIMRow(session_id, 0, im_model->getName(session_id), im_model->getOtherParticipantID(session_id)); + reshapeWindow(); +} + +bool LLIMWellWindow::hasIMRow(const LLUUID& session_id) +{ + return mMessageList->getItemByValue(session_id); +} + +void LLIMWellWindow::onNewIM(const LLSD& data) +{ + LLUUID from_id = data["from_id"]; + if (from_id.isNull() || gAgentID == from_id) return; + + LLUUID session_id = data["session_id"]; + if (session_id.isNull()) return; + + if (!gIMMgr->isVoiceCall(session_id)) return; + + if (hasIMRow(session_id)) return; + + //first real message, time to create chiclet + addIMRow(session_id); +} + + // EOF -- cgit v1.2.3