aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorXan Lopez <xan@gnome.org>2010-05-03 18:18:02 +0800
committerXan Lopez <xan@gnome.org>2010-05-03 19:40:33 +0800
commitbaca12963da2829f2208fef44587d2f8780643dc (patch)
tree93d530b71bb31e3c24ac25541ffae8e5458cd708 /embed
parent64468d01ba26f414eefff08541caf4c6f6168ffb (diff)
downloadgsoc2013-epiphany-baca12963da2829f2208fef44587d2f8780643dc.tar
gsoc2013-epiphany-baca12963da2829f2208fef44587d2f8780643dc.tar.gz
gsoc2013-epiphany-baca12963da2829f2208fef44587d2f8780643dc.tar.bz2
gsoc2013-epiphany-baca12963da2829f2208fef44587d2f8780643dc.tar.lz
gsoc2013-epiphany-baca12963da2829f2208fef44587d2f8780643dc.tar.xz
gsoc2013-epiphany-baca12963da2829f2208fef44587d2f8780643dc.tar.zst
gsoc2013-epiphany-baca12963da2829f2208fef44587d2f8780643dc.zip
Move helper function into ephy-embed-utils.c
Make url_is_empty a helper function in embed/, since we'll be moving code from EphyShell into EphyEmbed that uses it and we don't want to duplicate it.
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-embed-utils.c15
-rw-r--r--embed/ephy-embed-utils.h1
2 files changed, 16 insertions, 0 deletions
diff --git a/embed/ephy-embed-utils.c b/embed/ephy-embed-utils.c
index e163680be..d0e369052 100644
--- a/embed/ephy-embed-utils.c
+++ b/embed/ephy-embed-utils.c
@@ -116,3 +116,18 @@ ephy_embed_utils_normalize_address (const char *address)
return effective_address;
}
+
+gboolean
+ephy_embed_utils_url_is_empty (const char *location)
+{
+ gboolean is_empty = FALSE;
+
+ if (location == NULL || location[0] == '\0' ||
+ strcmp (location, "about:blank") == 0)
+ {
+ is_empty = TRUE;
+ }
+
+ return is_empty;
+}
+
diff --git a/embed/ephy-embed-utils.h b/embed/ephy-embed-utils.h
index 3b6d1b609..28ba0a96c 100644
--- a/embed/ephy-embed-utils.h
+++ b/embed/ephy-embed-utils.h
@@ -43,6 +43,7 @@ G_BEGIN_DECLS
char* ephy_embed_utils_link_message_parse (char *message);
gboolean ephy_embed_utils_address_has_web_scheme (const char *address);
char* ephy_embed_utils_normalize_address (const char *address);
+gboolean ephy_embed_utils_url_is_empty (const char *location);
G_END_DECLS