diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/ephy-tab.c | 26 |
2 files changed, 16 insertions, 17 deletions
@@ -1,3 +1,10 @@ +2004-02-24 Marco Pesenti Gritti <marco@gnome.org> + + * src/ephy-tab.c: (address_has_web_scheme): + + Do not use gnome vfs to check the scheme because + it can handle only supported methods. + 2004-02-21 Christian Persch <chpe@cvs.gnome.org> * doc/reference/Makefile.am: diff --git a/src/ephy-tab.c b/src/ephy-tab.c index 2f31bc45f..5cf9c83aa 100644 --- a/src/ephy-tab.c +++ b/src/ephy-tab.c @@ -400,25 +400,17 @@ ephy_tab_finalize (GObject *object) static gboolean address_has_web_scheme (const char *address) { - GnomeVFSURI *uri; - const char *scheme; - gboolean has_web_scheme = FALSE; + gboolean has_web_scheme; - uri = gnome_vfs_uri_new (address); - if (uri != NULL) - { - scheme = gnome_vfs_uri_get_scheme (uri); - - has_web_scheme = (strcmp (scheme, "http") == 0 || - strcmp (scheme, "https") == 0 || - strcmp (scheme, "ftp") == 0 || - strcmp (scheme, "file") == 0 || - strcmp (scheme, "data") == 0 || - strcmp (scheme, "about") == 0 || - strcmp (scheme, "gopher") == 0); + if (address == NULL) return FALSE; - gnome_vfs_uri_unref (uri); - } + has_web_scheme = (g_str_has_prefix (address, "http:") || + g_str_has_prefix (address, "https:") || + g_str_has_prefix (address, "ftp:") || + g_str_has_prefix (address, "file:") || + g_str_has_prefix (address, "data:") || + g_str_has_prefix (address, "about:") || + g_str_has_prefix (address, "gopher:")); return has_web_scheme; } |