aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaphael Slinckx <rslinckx@cvs.gnome.org>2005-09-15 20:50:07 +0800
committerRaphaƫl Slinckx <rslinckx@src.gnome.org>2005-09-15 20:50:07 +0800
commitc12bdc7dee5f0521be6e91bdcf09bf88f862d60c (patch)
tree723693ad082df4cb728255f3b4fe324b22cdb349
parentba377bb0e16c6773dd13632bc4793dae58a59e06 (diff)
downloadgsoc2013-epiphany-c12bdc7dee5f0521be6e91bdcf09bf88f862d60c.tar
gsoc2013-epiphany-c12bdc7dee5f0521be6e91bdcf09bf88f862d60c.tar.gz
gsoc2013-epiphany-c12bdc7dee5f0521be6e91bdcf09bf88f862d60c.tar.bz2
gsoc2013-epiphany-c12bdc7dee5f0521be6e91bdcf09bf88f862d60c.tar.lz
gsoc2013-epiphany-c12bdc7dee5f0521be6e91bdcf09bf88f862d60c.tar.xz
gsoc2013-epiphany-c12bdc7dee5f0521be6e91bdcf09bf88f862d60c.tar.zst
gsoc2013-epiphany-c12bdc7dee5f0521be6e91bdcf09bf88f862d60c.zip
If the search term is empty for a smart bookmark use the normal URL
2005-09-15 Raphael Slinckx <rslinckx@cvs.gnome.org> * src/bookmarks/ephy-bookmarks.c: (impl_resolve_address): If the search term is empty for a smart bookmark use the normal URL instead of the smart url with the %s replaced by ""
-rw-r--r--ChangeLog6
-rw-r--r--src/bookmarks/ephy-bookmarks.c18
2 files changed, 24 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index b6191ab08..776cedb5c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-09-15 Raphael Slinckx <rslinckx@cvs.gnome.org>
+
+ * src/bookmarks/ephy-bookmarks.c: (impl_resolve_address):
+ If the search term is empty for a smart bookmark use the normal
+ URL instead of the smart url with the %s replaced by ""
+
2005-09-15 Christian Persch <chpe@cvs.gnome.org>
* embed/mozilla/GtkNSSDialog.cpp:
diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c
index b81ae3d46..3e222eaf6 100644
--- a/src/bookmarks/ephy-bookmarks.c
+++ b/src/bookmarks/ephy-bookmarks.c
@@ -1343,6 +1343,24 @@ impl_resolve_address (EphyBookmarks *eb,
if (address == NULL) return NULL;
+ /* The entered search term is empty "" */
+ if (content == NULL || content[0] == '\0')
+ {
+ GnomeVFSURI *uri = gnome_vfs_uri_new (address);
+ if (uri != NULL)
+ {
+ char *real_address = g_strconcat (
+ gnome_vfs_uri_get_scheme (uri),
+ "://",
+ gnome_vfs_uri_get_host_name (uri),
+ NULL);
+ gnome_vfs_uri_unref (uri);
+
+ return real_address;
+ }
+ }
+
+ /* Either there was a search term, or gnome-vfs URI had a problem */
if (content == NULL) content = "";
result = g_string_new_len (NULL, strlen (content) + strlen (address));