aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2004-02-24 07:56:08 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2004-02-24 07:56:08 +0800
commita126153d1deb203697a7213b15889bd747e92148 (patch)
treeba524d9d154dbf44f1ca6036e7655ae21adae6f4
parent4e83ad8e62b7eb641a52bd30b421eedfc357604d (diff)
downloadgsoc2013-epiphany-a126153d1deb203697a7213b15889bd747e92148.tar
gsoc2013-epiphany-a126153d1deb203697a7213b15889bd747e92148.tar.gz
gsoc2013-epiphany-a126153d1deb203697a7213b15889bd747e92148.tar.bz2
gsoc2013-epiphany-a126153d1deb203697a7213b15889bd747e92148.tar.lz
gsoc2013-epiphany-a126153d1deb203697a7213b15889bd747e92148.tar.xz
gsoc2013-epiphany-a126153d1deb203697a7213b15889bd747e92148.tar.zst
gsoc2013-epiphany-a126153d1deb203697a7213b15889bd747e92148.zip
Do not use gnome vfs to check the scheme because it can handle only
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.
-rw-r--r--ChangeLog7
-rw-r--r--src/ephy-tab.c26
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 <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;
}