From baca12963da2829f2208fef44587d2f8780643dc Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Mon, 3 May 2010 12:18:02 +0200 Subject: 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. --- embed/ephy-embed-utils.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'embed/ephy-embed-utils.c') 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; +} + -- cgit v1.2.3