Merge in Dullahan support from future branch!
This commit is contained in:
@@ -9342,6 +9342,31 @@ class ListToggleMute : public view_listener_t
|
||||
}
|
||||
};
|
||||
|
||||
LLMediaCtrl* get_focused_media_ctrl()
|
||||
{
|
||||
auto media_ctrl = dynamic_cast<LLMediaCtrl*>(gFocusMgr.getKeyboardFocus());
|
||||
llassert(media_ctrl); // This listener only applies to media_ctrls
|
||||
return media_ctrl;
|
||||
}
|
||||
|
||||
class MediaCtrlWebInspector : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
get_focused_media_ctrl()->onOpenWebInspector();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class MediaCtrlViewSource : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
get_focused_media_ctrl()->onShowSource();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
struct MarketplaceViewSortAction : view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata)
|
||||
@@ -9693,6 +9718,10 @@ void initialize_menus()
|
||||
LLTextEditor::setIsFriendCallback(LLAvatarActions::isFriend);
|
||||
LLTextEditor::addMenuListeners();
|
||||
|
||||
// Media Ctrl menus
|
||||
addMenu(new MediaCtrlWebInspector(), "Open.WebInspector");
|
||||
addMenu(new MediaCtrlViewSource(), "Open.ViewSource");
|
||||
|
||||
addMenu(new MarketplaceViewSortAction, "Marketplace.ViewSort.Action");
|
||||
addMenu(new MarketplaceViewSortCheckItem, "Marketplace.ViewSort.CheckItem");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user