diff options
| author | Erik Kundiman <erik@megapahit.org> | 2025-09-29 16:29:19 +0800 |
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2025-10-01 16:56:56 +0800 |
| commit | a954d290674db08ecaf3c1e6484a0cb6647b88b5 (patch) | |
| tree | 3b672bac3e7d6807cd485ad5f041f69a5c729f46 /indra/newview/llmediactrl.cpp | |
| parent | e6eaa7e29990431b5207dbb4f8ae5560cf884acb (diff) | |
| parent | a6d4c1d394eef2cea41f6c6bcd751fec746ec17d (diff) | |
Merge tag 'Second_Life_Release#a6d4c1d3-2025.07' into 2025.07
Diffstat (limited to 'indra/newview/llmediactrl.cpp')
| -rw-r--r-- | indra/newview/llmediactrl.cpp | 10 |
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 ) |
