summaryrefslogtreecommitdiff
path: root/indra/newview/llmediactrl.cpp
diff options
context:
space:
mode:
authorRye <rye@alchemyviewer.org>2025-08-27 22:36:55 -0400
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-09-02 19:50:57 +0300
commit0fe641a3f20997c970112df7d188510993733338 (patch)
tree6ccdecb536a1f2059dd9b550f9ce59ec81a9ae40 /indra/newview/llmediactrl.cpp
parentdb69b09d82e29ea98c216d84d394f602a72b8f93 (diff)
Changes to support dullahan 1.21 undo/redo/delete/select all edit handlers
Diffstat (limited to 'indra/newview/llmediactrl.cpp')
-rw-r--r--indra/newview/llmediactrl.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 202008f7f9..c7b60b2fd5 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -347,6 +347,7 @@ bool LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask )
{
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registar;
registar.add("Open.WebInspector", boost::bind(&LLMediaCtrl::onOpenWebInspector, this));
+ registar.add("Open.ShowSource", boost::bind(&LLMediaCtrl::onShowSource, this));
// stinson 05/05/2014 : use this as the parent of the context menu if the static menu
// container has yet to be created
@@ -364,8 +365,9 @@ bool LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask )
{
// hide/show debugging options
bool media_plugin_debugging_enabled = gSavedSettings.getBOOL("MediaPluginDebugging");
+ menu->setItemVisible("debug_separator", media_plugin_debugging_enabled);
menu->setItemVisible("open_webinspector", media_plugin_debugging_enabled );
- menu->setItemVisible("debug_separator", media_plugin_debugging_enabled );
+ menu->setItemVisible("show_page_source", media_plugin_debugging_enabled);
menu->show(x, y);
LLMenuGL::showPopup(this, menu, x, y);
@@ -444,6 +446,12 @@ void LLMediaCtrl::onOpenWebInspector()
mMediaSource->getMediaPlugin()->showWebInspector( true );
}
+void LLMediaCtrl::onShowSource()
+{
+ if (mMediaSource && mMediaSource->hasMedia())
+ mMediaSource->getMediaPlugin()->showPageSource();
+}
+
////////////////////////////////////////////////////////////////////////////////
//
bool LLMediaCtrl::handleKeyHere( KEY key, MASK mask )