epiphany r8628 - trunk/src



Author: xan
Date: Sun Nov 30 20:48:17 2008
New Revision: 8628
URL: http://svn.gnome.org/viewvc/epiphany?rev=8628&view=rev

Log:
ephy-window: connect web view to web-view-ready signal when it's created.

Otherwise we rely on the view to be in the active tab in order for us
to be listening to the signal. That's the case right now, but could
change if we implement "always open in new tab" functionality.

Modified:
   trunk/src/ephy-window.c

Modified: trunk/src/ephy-window.c
==============================================================================
--- trunk/src/ephy-window.c	(original)
+++ trunk/src/ephy-window.c	Sun Nov 30 20:48:17 2008
@@ -2435,6 +2435,7 @@
 		    EphyWindow *window)
 {
 	EphyEmbed *embed;
+	WebKitWebView *new_web_view;
 
 	embed = ephy_shell_new_tab_full (ephy_shell_get_default (),
 					 NULL, NULL, NULL,
@@ -2444,7 +2445,12 @@
 					 FALSE,
 					 0);
 
-	return EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed);
+	new_web_view = EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed);
+	g_signal_connect_object (new_web_view, "web-view-ready",
+				 G_CALLBACK (web_view_ready_cb),
+				 NULL, 0);
+
+	return new_web_view;
 }
 
 static void
@@ -2476,9 +2482,6 @@
 		g_signal_handlers_disconnect_by_func (web_view,
 						      G_CALLBACK (create_web_view_cb),
 						      window);
-		g_signal_handlers_disconnect_by_func (web_view,
-						      G_CALLBACK (web_view_ready_cb),
-						      NULL);
 
 		g_signal_handlers_disconnect_by_func (embed,
 						      G_CALLBACK (sync_tab_popup_windows),
@@ -2563,9 +2566,6 @@
 		g_signal_connect_object (web_view, "create-web-view",
 					 G_CALLBACK (create_web_view_cb),
 					 window, 0);
-		g_signal_connect_object (web_view, "web-view-ready",
-					 G_CALLBACK (web_view_ready_cb),
-					 NULL, 0);
 
 		g_signal_connect_object (embed, "notify::hidden-popup-count",
 					 G_CALLBACK (sync_tab_popup_windows),



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]