aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-shell.c
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 /src/ephy-shell.c
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 'src/ephy-shell.c')
-rw-r--r--src/ephy-shell.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index fc4caf9d1..5e830dcdb 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -368,20 +368,6 @@ ephy_shell_get_default (void)
}
static gboolean
-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;
-}
-
-static gboolean
load_homepage (EphyEmbed *embed)
{
char *home;
@@ -396,7 +382,7 @@ load_homepage (EphyEmbed *embed)
home = g_strdup ("about:blank");
}
- is_empty = url_is_empty (home);
+ is_empty = ephy_embed_utils_url_is_empty (home);
ephy_web_view_load_url (ephy_embed_get_web_view (embed), home);
g_free (home);
@@ -525,7 +511,7 @@ ephy_shell_new_tab_full (EphyShell *shell,
ephy_web_view_load_request (ephy_embed_get_web_view (embed),
request);
- is_empty = url_is_empty (webkit_network_request_get_uri (request));
+ is_empty = ephy_embed_utils_url_is_empty (webkit_network_request_get_uri (request));
}
/* Make sure the initial focus is somewhere sensible and not, for