[epiphany] ephy-shell.c: update for latest changes in WebKitNetworkRequest.



commit 905111b75a1b400a1fe4bd60c191e21449923f77
Author: Xan Lopez <xan gnome org>
Date:   Fri Jun 12 01:27:18 2009 +0300

    ephy-shell.c: update for latest changes in WebKitNetworkRequest.
    
    WebKitNetworkRequest objects won't fail to be constructed since
    WebKitGTK+ 1.1.9, worst case they'll have a bogus URI and trying to
    load them will fail.

 src/ephy-shell.c |   20 +++++++-------------
 1 files changed, 7 insertions(+), 13 deletions(-)
---
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 8e6b6c0..21daf4f 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -517,17 +517,13 @@ ephy_shell_new_tab_full (EphyShell *shell,
 	}
 	else if (flags & EPHY_NEW_TAB_OPEN_PAGE)
 	{
-		/* request can be NULL when trying to load about:blank */
-		if (request)
-		{
-                        ephy_web_view_set_typed_address (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed),
-                                                         webkit_network_request_get_uri (request),
-                                                         EPHY_WEB_VIEW_ADDRESS_EXPIRE_NEXT);
-                        ephy_web_view_load_request (EPHY_WEB_VIEW (EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed)),
-                                                    request);
-		}
+                ephy_web_view_set_typed_address (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed),
+                                                 webkit_network_request_get_uri (request),
+                                                 EPHY_WEB_VIEW_ADDRESS_EXPIRE_NEXT);
+                ephy_web_view_load_request (EPHY_WEB_VIEW (EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed)),
+                                            request);
 
-		is_empty = !request || url_is_empty (webkit_network_request_get_uri (request));
+		is_empty = url_is_empty (webkit_network_request_get_uri (request));
 	}
 
         /* Make sure the initial focus is somewhere sensible and not, for
@@ -579,9 +575,7 @@ ephy_shell_new_tab (EphyShell *shell,
 	embed = ephy_shell_new_tab_full (shell, parent_window,
 					 previous_embed, request, flags,
 					 EPHY_WEB_VIEW_CHROME_ALL, FALSE, 0);
-
-	if (request)
-		g_object_unref (request);
+        g_object_unref (request);
 
 	return embed;
 }



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