aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-web-view.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2012-05-30 19:02:33 +0800
committerCarlos Garcia Campos <carlosgc@gnome.org>2012-06-25 18:19:47 +0800
commitbd89147c9cf4df8fdc1cd2757a86f03f197a1862 (patch)
tree9275247f47d3933d3605dbfd2167dd2072b3e663 /embed/ephy-web-view.c
parent85a2991c85929be430cc9252adce98185e33c5be (diff)
downloadgsoc2013-epiphany-bd89147c9cf4df8fdc1cd2757a86f03f197a1862.tar
gsoc2013-epiphany-bd89147c9cf4df8fdc1cd2757a86f03f197a1862.tar.gz
gsoc2013-epiphany-bd89147c9cf4df8fdc1cd2757a86f03f197a1862.tar.bz2
gsoc2013-epiphany-bd89147c9cf4df8fdc1cd2757a86f03f197a1862.tar.lz
gsoc2013-epiphany-bd89147c9cf4df8fdc1cd2757a86f03f197a1862.tar.xz
gsoc2013-epiphany-bd89147c9cf4df8fdc1cd2757a86f03f197a1862.tar.zst
gsoc2013-epiphany-bd89147c9cf4df8fdc1cd2757a86f03f197a1862.zip
Add support for new windows in WebKit2
https://bugzilla.gnome.org/show_bug.cgi?id=678593
Diffstat (limited to 'embed/ephy-web-view.c')
-rw-r--r--embed/ephy-web-view.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 93f79aa90..220bc7052 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -2521,11 +2521,15 @@ load_error_cb (WebKitWebView *web_view,
}
#ifdef HAVE_WEBKIT2
-/* TODO: WebKitWebView::close */
+static void
+close_web_view_cb (WebKitWebView *web_view,
+ gpointer user_data)
+
#else
static gboolean
close_web_view_cb (WebKitWebView *web_view,
gpointer user_data)
+#endif
{
GtkWidget *widget = gtk_widget_get_toplevel (GTK_WIDGET (web_view));
@@ -2537,9 +2541,11 @@ close_web_view_cb (WebKitWebView *web_view,
else
gtk_widget_destroy (widget);
+#ifndef HAVE_WEBKIT2
return TRUE;
-}
#endif
+}
+
static void
zoom_changed_cb (WebKitWebView *web_view,
@@ -2662,7 +2668,9 @@ ephy_web_view_init (EphyWebView *web_view)
#endif
#ifdef HAVE_WEBKIT2
- /* TODO: WebKitWebView::close */
+ g_signal_connect (web_view, "close",
+ G_CALLBACK (close_web_view_cb),
+ NULL);
#else
g_signal_connect (web_view, "close-web-view",
G_CALLBACK (close_web_view_cb),