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.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.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/llchiclet.cpp | 4 +++- indra/newview/llchiclet.h | 4 ++-- indra/newview/llsyswellwindow.cpp | 17 +++++++++++++++++ indra/newview/llsyswellwindow.h | 9 +++++++++ 4 files changed, 31 insertions(+), 3 deletions(-) (limited to 'indra/newview/llsyswellwindow.cpp') diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 08782abf0d..c7f77810df 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -239,6 +239,8 @@ LLIMWellChiclet::LLIMWellChiclet(const Params& p) LLIMModel::instance().addNoUnreadMsgsCallback(boost::bind(&LLIMWellChiclet::messageCountChanged, this, _1)); LLIMMgr::getInstance()->addSessionObserver(this); + + LLIMWellWindow::getInstance()->setSysWellChiclet(this); } LLIMWellChiclet::~LLIMWellChiclet() @@ -266,7 +268,7 @@ LLNotificationChiclet::LLNotificationChiclet(const Params& p) // ensure that notification well window exists, to synchronously // handle toast add/delete events. - LLNotificationWellWindow::getInstance(); + LLNotificationWellWindow::getInstance()->setSysWellChiclet(this); } void LLNotificationChiclet::connectCounterUpdatersToSignal(const std::string& notification_type) diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index a2fda483f0..353fc01c34 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -791,6 +791,8 @@ public: void setToggleState(BOOL toggled); + void setNewMessagesState(bool new_messages); + protected: LLSysWellChiclet(const Params& p); @@ -804,8 +806,6 @@ protected: */ void changeLitState(); - void setNewMessagesState(bool new_messages); - protected: class FlashToLitTimer; LLButton* mButton; 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() { diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index 43b2723df0..fea145a17e 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -47,6 +47,7 @@ class LLFlatListView; class LLChiclet; class LLIMChiclet; class LLScriptChiclet; +class LLSysWellChiclet; class LLSysWellWindow : public LLDockableFloater @@ -78,6 +79,8 @@ public: void onStartUpToastClick(S32 x, S32 y, MASK mask); + void setSysWellChiclet(LLSysWellChiclet* chiclet) { mSysWellChiclet = chiclet; } + // size constants for the window and for its elements static const S32 MAX_WINDOW_HEIGHT = 200; static const S32 MIN_WINDOW_WIDTH = 318; @@ -104,11 +107,17 @@ protected: virtual const std::string& getAnchorViewName() = 0; void reshapeWindow(); + void releaseNewMessagesState(); // pointer to a corresponding channel's instance LLNotificationsUI::LLScreenChannel* mChannel; LLFlatListView* mMessageList; + /** + * Reference to an appropriate Well chiclet to release "new message" state. EXT-3147 + */ + LLSysWellChiclet* mSysWellChiclet; + /** * Special panel which is used as separator of Notifications & IM Rows. * It is always presents in the list and shown when it is necessary. -- cgit v1.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.3