aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
Diffstat (limited to 'embed')
-rw-r--r--embed/mozilla/mozilla-embed.cpp18
1 files changed, 16 insertions, 2 deletions
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);
}