diff options
Diffstat (limited to 'embed')
-rw-r--r-- | embed/ephy-embed.c | 18 | ||||
-rw-r--r-- | embed/ephy-embed.h | 5 | ||||
-rw-r--r-- | embed/mozilla/mozilla-embed.cpp | 8 |
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 |