diff options
author | Marco Pesenti Gritti <marco@it.gnome.org> | 2003-07-11 04:11:36 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <mpeseng@src.gnome.org> | 2003-07-11 04:11:36 +0800 |
commit | 66c8f535bac55e4aaddbebf7ba284f7d9cd8ed39 (patch) | |
tree | b3de5c8ec667fc9490dc4f5d3856bec982b9f0df /embed/mozilla/mozilla-embed.cpp | |
parent | d446a326bb0243e014e3d4e8e6152b6a6f9b7e28 (diff) | |
download | gsoc2013-epiphany-66c8f535bac55e4aaddbebf7ba284f7d9cd8ed39.tar gsoc2013-epiphany-66c8f535bac55e4aaddbebf7ba284f7d9cd8ed39.tar.gz gsoc2013-epiphany-66c8f535bac55e4aaddbebf7ba284f7d9cd8ed39.tar.bz2 gsoc2013-epiphany-66c8f535bac55e4aaddbebf7ba284f7d9cd8ed39.tar.lz gsoc2013-epiphany-66c8f535bac55e4aaddbebf7ba284f7d9cd8ed39.tar.xz gsoc2013-epiphany-66c8f535bac55e4aaddbebf7ba284f7d9cd8ed39.tar.zst gsoc2013-epiphany-66c8f535bac55e4aaddbebf7ba284f7d9cd8ed39.zip |
Show the doc context menu on ctrl+f10
2003-07-10 Marco Pesenti Gritti <marco@it.gnome.org>
* embed/mozilla/mozilla-embed.cpp:
Show the doc context menu on ctrl+f10
2
Diffstat (limited to 'embed/mozilla/mozilla-embed.cpp')
-rw-r--r-- | embed/mozilla/mozilla-embed.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp index 941698dfe..40d7bc8a8 100644 --- a/embed/mozilla/mozilla-embed.cpp +++ b/embed/mozilla/mozilla-embed.cpp @@ -1349,9 +1349,11 @@ mozilla_embed_dom_key_down_cb (GtkMozEmbed *embed, gpointer dom_event, EventContext ctx; ctx.Init (wrapper); rv = ctx.GetKeyEventInfo (ev, info); - if (NS_SUCCEEDED(rv) && - (info->keycode == nsIDOMKeyEvent::DOM_VK_F10 && - info->modifier == GDK_SHIFT_MASK)) + if (NS_FAILED (rv)) return G_FAILED; + + if (info->keycode == nsIDOMKeyEvent::DOM_VK_F10 && + (info->modifier == GDK_SHIFT_MASK || + info->modifier == GDK_CONTROL_MASK)) { /* Translate relative coordinates to absolute values, and try to avoid covering links by adding a little offset. */ @@ -1361,6 +1363,11 @@ mozilla_embed_dom_key_down_cb (GtkMozEmbed *embed, gpointer dom_event, info->x += x + 6; info->y += y + 6; + if (info->modifier == GDK_CONTROL_MASK) + { + info->context = EMBED_CONTEXT_DOCUMENT; + } + nsCOMPtr<nsIDOMDocument> doc; rv = ctx.GetTargetDocument (getter_AddRefs(doc)); if (NS_SUCCEEDED(rv)) |