aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-12-23 23:46:58 +0800
committerChristian Persch <chpe@src.gnome.org>2004-12-23 23:46:58 +0800
commitae406f215282f65b7179ffbbe94eb1ce69768099 (patch)
tree9712fdc7129c54c8280d17a3422af6e8113e1420 /embed
parent98224f1760350ef3dfe6d8062d2c0627c02eb150 (diff)
downloadgsoc2013-epiphany-ae406f215282f65b7179ffbbe94eb1ce69768099.tar
gsoc2013-epiphany-ae406f215282f65b7179ffbbe94eb1ce69768099.tar.gz
gsoc2013-epiphany-ae406f215282f65b7179ffbbe94eb1ce69768099.tar.bz2
gsoc2013-epiphany-ae406f215282f65b7179ffbbe94eb1ce69768099.tar.lz
gsoc2013-epiphany-ae406f215282f65b7179ffbbe94eb1ce69768099.tar.xz
gsoc2013-epiphany-ae406f215282f65b7179ffbbe94eb1ce69768099.tar.zst
gsoc2013-epiphany-ae406f215282f65b7179ffbbe94eb1ce69768099.zip
A lib/ephy-signal-accumulator.c: (ephy_signal_accumulator_object): A
2004-12-23 Christian Persch <chpe@cvs.gnome.org> * embed/ephy-embed.c: (ephy_embed_base_init): * embed/ephy-embed.h: * embed/mozilla/mozilla-embed.cpp: * lib/Makefile.am: * lib/ephy-marshal.list: A lib/ephy-signal-accumulator.c: (ephy_signal_accumulator_object): A lib/ephy-signal-accumulator.h: * src/ephy-tab.c: (ephy_tab_new_window_cb): Fix new_window signal.
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-embed.c18
-rw-r--r--embed/ephy-embed.h5
-rw-r--r--embed/mozilla/mozilla-embed.cpp8
3 files changed, 16 insertions, 15 deletions
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index 83b2948c0..3f8c68ba3 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -23,6 +23,7 @@
#include "ephy-embed.h"
#include "ephy-marshal.h"
+#include "ephy-signal-accumulator.h"
#include "mozilla-embed-single.h"
#include "mozilla-embed.h"
@@ -104,22 +105,21 @@ ephy_embed_base_init (gpointer g_class)
/**
* EphyEmbed::ge-new-window:
* @embed:
- * @new_embed: a newly-generated child #EphyEmbed
- * @mask: @new_embed's #EphyChromeMask
+ * @mask: a #EphyChromeMask
*
* The ::ge_new_window signal is emitted when a new window has been opened by
* the embed. For example, when a JavaScript popup window is opened.
+ * Return a new #EphyEmbed.
**/
g_signal_new ("ge_new_window",
EPHY_TYPE_EMBED,
- G_SIGNAL_RUN_FIRST,
+ G_SIGNAL_RUN_FIRST | G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (EphyEmbedIface, new_window),
- NULL, NULL,
- ephy_marshal_VOID__POINTER_INT,
- G_TYPE_NONE,
- 2,
- G_TYPE_POINTER,
- G_TYPE_INT);
+ ephy_signal_accumulator_object, ephy_embed_get_type,
+ ephy_marshal_OBJECT__ENUM,
+ G_TYPE_OBJECT,
+ 1,
+ EPHY_TYPE_EMBED_CHROME_MASK);
/**
* EphyEmbed::ge-popup-blocked:
* @embed:
diff --git a/embed/ephy-embed.h b/embed/ephy-embed.h
index ab0a900d7..5da274649 100644
--- a/embed/ephy-embed.h
+++ b/embed/ephy-embed.h
@@ -124,9 +124,6 @@ struct _EphyEmbedIface
void (* net_state) (EphyEmbed *embed,
const char *uri,
EmbedState state);
- void (* new_window) (EphyEmbed *embed,
- EphyEmbed **new_embed,
- EphyEmbedChrome chromemask);
gboolean (* dom_mouse_click) (EphyEmbed *embed,
EphyEmbedEvent *event);
gboolean (* dom_mouse_down) (EphyEmbed *embed,
@@ -144,6 +141,8 @@ struct _EphyEmbedIface
void (* modal_alert_closed) (EphyEmbed *embed);
void (* document_type) (EphyEmbed *embed,
EmbedDocumentType type);
+ EphyEmbed * (* new_window) (EphyEmbed *embed,
+ EphyEmbedChrome chromemask);
/* Methods */
void (* load_url) (EphyEmbed *embed,
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp
index 4a33a80ff..14a62ff46 100644
--- a/embed/mozilla/mozilla-embed.cpp
+++ b/embed/mozilla/mozilla-embed.cpp
@@ -1078,11 +1078,13 @@ mozilla_embed_new_window_cb (GtkMozEmbed *embed,
}
}
- g_signal_emit_by_name (membed, "ge_new_window", &new_embed, mask);
+ g_signal_emit_by_name (membed, "ge_new_window", mask, &new_embed);
g_assert (new_embed != NULL);
-
- *newEmbed = GTK_MOZ_EMBED(new_embed);
+
+ gtk_moz_embed_set_chrome_mask (GTK_MOZ_EMBED (new_embed), chrome_mask);
+
+ *newEmbed = GTK_MOZ_EMBED (new_embed);
}
static void