diff options
author | Monroe Linden <monroe@lindenlab.com> | 2010-12-01 18:15:59 -0800 |
---|---|---|
committer | Monroe Linden <monroe@lindenlab.com> | 2010-12-01 18:15:59 -0800 |
commit | 880110eb9303ecb4426e6d3598075c4c12280061 (patch) | |
tree | 64c010ae93a8f776f6798456fcdb39725eb5719f /indra/media_plugins/webkit/media_plugin_webkit.cpp | |
parent | a2420db5b3b2ed216bcb3f08fce95a05ee7e6dd5 (diff) |
OCIAL-231 FIX Enable tooltips (for links and images)
Added the necessary plumbing to get link_hovered events from the webkit plugin through to the viewer UI.
This requires a llqtwebkit library built from revision 1799a899e06d or later in http://hg.secondlife.com/llqtwebkit to function. The viewer source changes are backwards-compatible with earlier versions of llqtwebkit, it just won't see any link_hovered events with previous revisions.
Reviewed by Callum.
Diffstat (limited to 'indra/media_plugins/webkit/media_plugin_webkit.cpp')
-rw-r--r-- | indra/media_plugins/webkit/media_plugin_webkit.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 8b70c15b27..1666f877e9 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -605,6 +605,20 @@ private: mAuthPassword = message.getValue("password"); } } + + //////////////////////////////////////////////////////////////////////////////// + // virtual + void onLinkHovered(const EventType& event) + { + if(mInitState >= INIT_STATE_NAVIGATE_COMPLETE) + { + LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "link_hovered"); + message.setValue("link", event.getEventUri()); + message.setValue("title", event.getStringValue()); + message.setValue("text", event.getStringValue2()); + sendMessage(message); + } + } LLQtWebKit::EKeyboardModifier decodeModifiers(std::string &modifiers) { |