All pastes #22973 Raw Edit

Diff

public text v1 · immutable
#22973 ·published 2005-09-15 12:16 UTC
rendered paste body
Index: ephy-bookmark-action.c===================================================================RCS file: /cvs/gnome/epiphany/src/bookmarks/ephy-bookmark-action.c,vretrieving revision 1.66diff -u -p -r1.66 ephy-bookmark-action.c--- ephy-bookmark-action.c	26 Jul 2005 17:41:04 -0000	1.66+++ ephy-bookmark-action.c	15 Sep 2005 12:16:46 -0000@@ -374,7 +374,25 @@ activate_cb (GtkWidget *widget,  	bookmarks = ephy_shell_get_bookmarks (ephy_shell_get_default ()); -	address = ephy_bookmarks_resolve_address (bookmarks, location, text);+	/* The entered search term is empty "" */+	if (strcmp ("", text) == 0)+	{+		GnomeVFSURI *uri = gnome_vfs_uri_new (location);+		if (uri)+		{+			address = g_strconcat (gnome_vfs_uri_get_scheme (uri),+						"://",+						gnome_vfs_uri_get_host_name (uri),+						NULL);+			gnome_vfs_uri_unref (uri);+		}+	}+	+	/* We still do not have a valid address, do the smart replacement */+	if (!address)+	{+		address = ephy_bookmarks_resolve_address (bookmarks, location, text);+	} 	g_return_if_fail (address != NULL);  	ephy_link_open (EPHY_LINK (action), address, NULL,