aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/mozilla-embed.cpp
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-08-02 03:42:21 +0800
committerChristian Persch <chpe@src.gnome.org>2003-08-02 03:42:21 +0800
commitd0251310f8d4236076dd03affe2dad19f404a390 (patch)
tree61635c902d1ff9e524a17f4558f0495a2a0b20b6 /embed/mozilla/mozilla-embed.cpp
parentdd1eeaa291d5cf7fe390615a281825f722cdea8a (diff)
downloadgsoc2013-epiphany-d0251310f8d4236076dd03affe2dad19f404a390.tar.gz
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.cpp26
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);