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 /src | |
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 'src')
-rw-r--r-- | src/ephy-window.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c index 2b97ef41e..c2d529588 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -2136,24 +2136,6 @@ tab_size_to_cb (EphyEmbed *embed, } static gboolean -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; -} - -static gboolean open_link_in_new (EphyWindow *window, const char *link_address, guint state, @@ -2161,7 +2143,7 @@ open_link_in_new (EphyWindow *window, { EphyEmbed *dest; - if (!address_has_web_scheme (link_address)) return FALSE; + if (!ephy_embed_utils_address_has_web_scheme (link_address)) return FALSE; dest = ephy_link_open (EPHY_LINK (window), link_address, embed, state & GDK_SHIFT_MASK ? EPHY_LINK_NEW_WINDOW @@ -2193,7 +2175,7 @@ save_property_url (EphyEmbed *embed, value = ephy_embed_event_get_property (event, property); location = g_value_get_string (value); - if (!address_has_web_scheme (location)) return FALSE; + if (!ephy_embed_utils_address_has_web_scheme (location)) return FALSE; persist = EPHY_EMBED_PERSIST (ephy_embed_factory_new_object (EPHY_TYPE_EMBED_PERSIST)); |