diff options
author | Cosimo Cecchi <cosimoc@src.gnome.org> | 2007-11-05 07:00:35 +0800 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@src.gnome.org> | 2007-11-05 07:00:35 +0800 |
commit | 42ccd4ec827aed6f2145c2a3bf5613d7c521fa77 (patch) | |
tree | b49360751fb731d221f7db680a83f6b6c8ae4280 /embed | |
parent | a5b20741d26dff5f0bb702455e0e4aee366b5686 (diff) | |
download | gsoc2013-epiphany-42ccd4ec827aed6f2145c2a3bf5613d7c521fa77.tar gsoc2013-epiphany-42ccd4ec827aed6f2145c2a3bf5613d7c521fa77.tar.gz gsoc2013-epiphany-42ccd4ec827aed6f2145c2a3bf5613d7c521fa77.tar.bz2 gsoc2013-epiphany-42ccd4ec827aed6f2145c2a3bf5613d7c521fa77.tar.lz gsoc2013-epiphany-42ccd4ec827aed6f2145c2a3bf5613d7c521fa77.tar.xz gsoc2013-epiphany-42ccd4ec827aed6f2145c2a3bf5613d7c521fa77.tar.zst gsoc2013-epiphany-42ccd4ec827aed6f2145c2a3bf5613d7c521fa77.zip |
Move "address_has_web_scheme" to ephy-embed-utils.
svn path=/trunk/; revision=7622
Diffstat (limited to 'embed')
-rw-r--r-- | embed/ephy-embed-utils.c | 17 | ||||
-rw-r--r-- | embed/ephy-embed-utils.h | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/embed/ephy-embed-utils.c b/embed/ephy-embed-utils.c index 4a9c44c85..5fe226309 100644 --- a/embed/ephy-embed-utils.c +++ b/embed/ephy-embed-utils.c @@ -119,3 +119,20 @@ ephy_embed_utils_get_title_composite (EphyEmbed *embed) return title != NULL ? title : ""; } +gboolean +ephy_embed_utils_address_has_web_scheme (const char *address) +{ + gboolean has_web_scheme; + + if (address == NULL) return FALSE; + + 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; +} diff --git a/embed/ephy-embed-utils.h b/embed/ephy-embed-utils.h index 861231e0f..cb36073e6 100644 --- a/embed/ephy-embed-utils.h +++ b/embed/ephy-embed-utils.h @@ -31,6 +31,7 @@ G_BEGIN_DECLS char * ephy_embed_utils_link_message_parse (char *message); const char * ephy_embed_utils_get_title_composite (EphyEmbed *embed); +gboolean ephy_embed_utils_address_has_web_scheme (const char *address); G_END_DECLS |