summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorYuri Chebotarev <ychebotarev@productengine.com>2010-01-04 15:42:18 +0200
committerYuri Chebotarev <ychebotarev@productengine.com>2010-01-04 15:42:18 +0200
commit0782f64b642756c02ffa1ec72c2f2e5874ed26e9 (patch)
tree33cb4ab8014f245a173a7db369e89ffcd434bb53 /indra
parente673fdea3f9e6a3e48736461e00fd8bb1f2a2876 (diff)
fix for normal EXT-3763 URL clicked on nearby chat toast opens chat history, not URL in browser.
also move real action from mouse_down to mouse_up (since clicking on url is processing in mouse_up). --HG-- branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llchatitemscontainerctrl.cpp26
-rw-r--r--indra/newview/llchatitemscontainerctrl.h1
2 files changed, 25 insertions, 2 deletions
diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
index 92df281307..60a37ac4af 100644
--- a/indra/newview/llchatitemscontainerctrl.cpp
+++ b/indra/newview/llchatitemscontainerctrl.cpp
@@ -253,10 +253,32 @@ void LLNearbyChatToastPanel::onMouseEnter (S32 x, S32 y, MASK mask)
BOOL LLNearbyChatToastPanel::handleMouseDown (S32 x, S32 y, MASK mask)
{
+ return LLPanel::handleMouseDown(x,y,mask);
+}
+
+BOOL LLNearbyChatToastPanel::handleMouseUp (S32 x, S32 y, MASK mask)
+{
if(mSourceType != CHAT_SOURCE_AGENT)
- return LLPanel::handleMouseDown(x,y,mask);
+ return LLPanel::handleMouseUp(x,y,mask);
+
+ LLChatMsgBox* text_box = getChild<LLChatMsgBox>("msg_text", false);
+ S32 local_x = x - text_box->getRect().mLeft;
+ S32 local_y = y - text_box->getRect().mBottom;
+
+ //if text_box process mouse up (ussually this is click on url) - we didn't show nearby_chat.
+ if (text_box->pointInView(local_x, local_y) )
+ {
+ if (text_box->handleMouseUp(local_x,local_y,mask) == TRUE)
+ return TRUE;
+ else
+ {
+ LLFloaterReg::showInstance("nearby_chat",LLSD());
+ return FALSE;
+ }
+ }
+
LLFloaterReg::showInstance("nearby_chat",LLSD());
- return LLPanel::handleMouseDown(x,y,mask);
+ return LLPanel::handleMouseUp(x,y,mask);
}
void LLNearbyChatToastPanel::setHeaderVisibility(EShowItemHeader e)
diff --git a/indra/newview/llchatitemscontainerctrl.h b/indra/newview/llchatitemscontainerctrl.h
index 0a85c52401..f4b8655054 100644
--- a/indra/newview/llchatitemscontainerctrl.h
+++ b/indra/newview/llchatitemscontainerctrl.h
@@ -68,6 +68,7 @@ public:
void onMouseLeave (S32 x, S32 y, MASK mask);
void onMouseEnter (S32 x, S32 y, MASK mask);
BOOL handleMouseDown (S32 x, S32 y, MASK mask);
+ BOOL handleMouseUp (S32 x, S32 y, MASK mask);
virtual BOOL postBuild();