summaryrefslogtreecommitdiff
path: root/indra/newview/llmediactrl.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2011-03-24 19:37:00 -0700
committerRichard Linden <none@none>2011-03-24 19:37:00 -0700
commita5572505d843778b7f5395e25f9b9d15178bb423 (patch)
tree4bd6108a9ac44fbe3343f9bba29745e7c8905496 /indra/newview/llmediactrl.cpp
parent4af93641973c4ee8805e948ad04d7be306a38835 (diff)
SOCIAL-509 FIX There is no way to copy a user name from web profile with the mouse
Diffstat (limited to 'indra/newview/llmediactrl.cpp')
-rw-r--r--indra/newview/llmediactrl.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index b8c61068c4..0199958c62 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -44,6 +44,7 @@
#include "llslurl.h"
#include "lluictrlfactory.h" // LLDefaultChildRegistry
#include "llkeyboard.h"
+#include "llviewermenu.h"
// linden library includes
#include "llfocusmgr.h"
@@ -106,7 +107,8 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
mErrorPageURL(p.error_page_url),
mTrusted(p.trusted_content),
mWindowShade(NULL),
- mHoverTextChanged(false)
+ mHoverTextChanged(false),
+ mContextMenu(NULL)
{
{
LLColor4 color = p.caret_color().get();
@@ -151,6 +153,7 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
LLMediaCtrl::~LLMediaCtrl()
{
+ delete mContextMenu;
if (mMediaSource)
{
@@ -318,6 +321,12 @@ BOOL LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask )
setFocus( TRUE );
}
+ if (mContextMenu)
+ {
+ mContextMenu->show(x, y);
+ LLMenuGL::showPopup(this, mContextMenu, x, y);
+ }
+
return TRUE;
}
@@ -380,6 +389,8 @@ void LLMediaCtrl::onFocusLost()
//
BOOL LLMediaCtrl::postBuild ()
{
+ mContextMenu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>(
+ "menu_media_ctrl.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance());
setVisibleCallback(boost::bind(&LLMediaCtrl::onVisibilityChange, this, _2));
return TRUE;
}