From 859bd4706dba82e469d699aebd3f6336c0482c7a Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sun, 8 Aug 2004 17:48:30 +0000 Subject: Allow XUL windows to open new windows. 2004-08-08 Christian Persch * embed/mozilla/mozilla-embed.cpp: Allow XUL windows to open new windows. --- embed/mozilla/mozilla-embed.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'embed') diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp index a07f54831..7d77f1e6c 100644 --- a/embed/mozilla/mozilla-embed.cpp +++ b/embed/mozilla/mozilla-embed.cpp @@ -1158,7 +1158,7 @@ ephy_embed_iface_init (EphyEmbedIface *iface) iface->has_modified_forms = impl_has_modified_forms; } -void +static void xul_visibility_cb (GtkWidget *embed, gboolean visibility, GtkWidget *window) { if (visibility) @@ -1171,12 +1171,23 @@ xul_visibility_cb (GtkWidget *embed, gboolean visibility, GtkWidget *window) } } -void +static void xul_size_to_cb (GtkWidget *embed, gint width, gint height, gpointer dummy) { gtk_widget_set_size_request (embed, width, height); } +static void +xul_new_window_cb (GtkMozEmbed *embed, + GtkMozEmbed **retval, + guint chrome_mask, + gpointer dummy) +{ + g_assert (chrome_mask & GTK_MOZ_EMBED_FLAG_OPENASCHROME); + + *retval = _mozilla_embed_new_xul_dialog (); +} + GtkMozEmbed * _mozilla_embed_new_xul_dialog (void) { @@ -1196,6 +1207,9 @@ _mozilla_embed_new_xul_dialog (void) g_signal_connect_object (embed, "size_to", G_CALLBACK (xul_size_to_cb), NULL, (GConnectFlags) 0); + g_signal_connect_object (embed, "new_window", + G_CALLBACK (xul_new_window_cb), + NULL, (GConnectFlags) 0); return GTK_MOZ_EMBED (embed); } -- cgit v1.2.3