diff options
| author | Andrew Dyukov <adyukov@productengine.com> | 2009-12-25 22:21:58 +0200 |
|---|---|---|
| committer | Andrew Dyukov <adyukov@productengine.com> | 2009-12-25 22:21:58 +0200 |
| commit | bed1ec4525f0bcfe634c4677feb29dbbdc3442c8 (patch) | |
| tree | 4ce25858d91e633d6d7c3ecad14a1df1b54d96c6 /indra/newview/llchiclet.cpp | |
| parent | 614a214870e223ea187bda32169a1859380844d3 (diff) | |
Fixed minor bug EXT-2929 ([BSI] Context menu on chiclets should not have
"show session" enabled when chiclet window is visible).
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llchiclet.cpp')
| -rw-r--r-- | indra/newview/llchiclet.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 2719f10a3d..660018530f 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -722,8 +722,11 @@ void LLIMP2PChiclet::updateMenuItems() if(getSessionId().isNull()) return; + LLIMFloater* open_im_floater = LLIMFloater::findInstance(getSessionId()); + bool open_window_exists = open_im_floater && open_im_floater->getVisible(); + mPopupMenu->getChild<LLUICtrl>("Send IM")->setEnabled(!open_window_exists); + bool is_friend = LLAvatarActions::isFriend(getOtherParticipantId()); - mPopupMenu->getChild<LLUICtrl>("Add Friend")->setEnabled(!is_friend); } @@ -1067,6 +1070,18 @@ void LLIMGroupChiclet::changed(LLGroupChange gc) } } +void LLIMGroupChiclet::updateMenuItems() +{ + if(!mPopupMenu) + return; + if(getSessionId().isNull()) + return; + + LLIMFloater* open_im_floater = LLIMFloater::findInstance(getSessionId()); + bool open_window_exists = open_im_floater && open_im_floater->getVisible(); + mPopupMenu->getChild<LLUICtrl>("Chat")->setEnabled(!open_window_exists); +} + BOOL LLIMGroupChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask) { if(!mPopupMenu) @@ -1076,6 +1091,7 @@ BOOL LLIMGroupChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask) if (mPopupMenu) { + updateMenuItems(); mPopupMenu->arrangeAndClear(); LLMenuGL::showPopup(this, mPopupMenu, x, y); } |
