diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2003-08-02 03:42:21 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2003-08-02 03:42:21 +0800 |
commit | d0251310f8d4236076dd03affe2dad19f404a390 (patch) | |
tree | 61635c902d1ff9e524a17f4558f0495a2a0b20b6 /embed/mozilla/mozilla-embed.cpp | |
parent | dd1eeaa291d5cf7fe390615a281825f722cdea8a (diff) | |
download | gsoc2013-epiphany-d0251310f8d4236076dd03affe2dad19f404a390.tar gsoc2013-epiphany-d0251310f8d4236076dd03affe2dad19f404a390.tar.gz gsoc2013-epiphany-d0251310f8d4236076dd03affe2dad19f404a390.tar.bz2 gsoc2013-epiphany-d0251310f8d4236076dd03affe2dad19f404a390.tar.lz gsoc2013-epiphany-d0251310f8d4236076dd03affe2dad19f404a390.tar.xz gsoc2013-epiphany-d0251310f8d4236076dd03affe2dad19f404a390.tar.zst gsoc2013-epiphany-d0251310f8d4236076dd03affe2dad19f404a390.zip |
Restore the "ge_dom_mouse_down" signal.
2003-08-01 Christian Persch <chpe@cvs.gnome.org>
* embed/mozilla/mozilla-embed.cpp: (mozilla_embed_dom_mouse_down_cb):
* embed/ephy-embed.h:
* embed/ephy-embed.c: (ephy_embed_base_init):
Restore the "ge_dom_mouse_down" signal.
Diffstat (limited to 'embed/mozilla/mozilla-embed.cpp')
-rw-r--r-- | embed/mozilla/mozilla-embed.cpp | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp index fa78a245b..f0d85ba59 100644 --- a/embed/mozilla/mozilla-embed.cpp +++ b/embed/mozilla/mozilla-embed.cpp @@ -1456,7 +1456,7 @@ mozilla_embed_dom_mouse_down_cb (GtkMozEmbed *embed, gpointer dom_event, { EphyEmbedEvent *info; EventContext event_context; - gint return_value = 0; + gint return_value = FALSE; EphyWrapper *wrapper; nsresult result; EphyEmbedEventType type; @@ -1474,24 +1474,30 @@ mozilla_embed_dom_mouse_down_cb (GtkMozEmbed *embed, gpointer dom_event, event_context.Init (wrapper); result = event_context.GetMouseEventInfo (static_cast<nsIDOMMouseEvent*>(dom_event), info); + if (NS_FAILED (result)) return FALSE; ephy_embed_event_get_event_type (info, &type); - - if (NS_SUCCEEDED(result) && (type == EPHY_EMBED_EVENT_MOUSE_BUTTON3)) + + nsCOMPtr<nsIDOMDocument> domDoc; + result = event_context.GetTargetDocument (getter_AddRefs(domDoc)); + if (NS_SUCCEEDED(result)) { - nsCOMPtr<nsIDOMDocument> domDoc; - result = event_context.GetTargetDocument (getter_AddRefs(domDoc)); + result = wrapper->PushTargetDocument (domDoc); + if (NS_SUCCEEDED(result)) { - result = wrapper->PushTargetDocument (domDoc); - if (NS_SUCCEEDED(result)) + g_signal_emit_by_name (membed, "ge_dom_mouse_down", + info, &return_value); + + if (return_value == FALSE && + type == EPHY_EMBED_EVENT_MOUSE_BUTTON3) { g_signal_emit_by_name (membed, "ge_context_menu", - info, &return_value); - wrapper->PopTargetDocument (); + info, &return_value); } - } + wrapper->PopTargetDocument (); + } } g_object_unref (info); |