From a126153d1deb203697a7213b15889bd747e92148 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Mon, 23 Feb 2004 23:56:08 +0000 Subject: Do not use gnome vfs to check the scheme because it can handle only 2004-02-24 Marco Pesenti Gritti * src/ephy-tab.c: (address_has_web_scheme): Do not use gnome vfs to check the scheme because it can handle only supported methods. --- ChangeLog | 7 +++++++ src/ephy-tab.c | 26 +++++++++----------------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index a379ca3a5..1db752b27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-02-24 Marco Pesenti Gritti + + * 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 * 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; } -- cgit