aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-history.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@src.gnome.org>2008-01-14 04:42:01 +0800
committerCosimo Cecchi <cosimoc@src.gnome.org>2008-01-14 04:42:01 +0800
commitaf1c2ceaef7d949e36a7680f463c5e25f79c43d6 (patch)
tree19c94f1df613831ed8ab92b4ac904be0c20c673f /embed/ephy-history.c
parent12d96e8a6fc9eddaffdbad58754e712af5fc5fef (diff)
downloadgsoc2013-epiphany-af1c2ceaef7d949e36a7680f463c5e25f79c43d6.tar
gsoc2013-epiphany-af1c2ceaef7d949e36a7680f463c5e25f79c43d6.tar.gz
gsoc2013-epiphany-af1c2ceaef7d949e36a7680f463c5e25f79c43d6.tar.bz2
gsoc2013-epiphany-af1c2ceaef7d949e36a7680f463c5e25f79c43d6.tar.lz
gsoc2013-epiphany-af1c2ceaef7d949e36a7680f463c5e25f79c43d6.tar.xz
gsoc2013-epiphany-af1c2ceaef7d949e36a7680f463c5e25f79c43d6.tar.zst
gsoc2013-epiphany-af1c2ceaef7d949e36a7680f463c5e25f79c43d6.zip
Drop gnome-vfs dependency. Now Epiphany depends on glib >= 2.15.1.
Also, optional Zeroconf support depends on Avahi >= 0.6.22. Bug #507152. svn path=/trunk/; revision=7858
Diffstat (limited to 'embed/ephy-history.c')
-rw-r--r--embed/ephy-history.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/embed/ephy-history.c b/embed/ephy-history.c
index f7fdcc669..127d97656 100644
--- a/embed/ephy-history.c
+++ b/embed/ephy-history.c
@@ -30,11 +30,11 @@
#include "eel-gconf-extensions.h"
#include "ephy-prefs.h"
#include "ephy-glib-compat.h"
+#include "ephy-string.h"
#include <time.h>
#include <string.h>
#include <glib/gi18n.h>
-#include <libgnomevfs/gnome-vfs-uri.h>
#define EPHY_HISTORY_XML_ROOT (const xmlChar *)"ephy_history"
#define EPHY_HISTORY_XML_VERSION (const xmlChar *)"1.0"
@@ -658,11 +658,10 @@ ephy_history_host_visited (EphyHistory *eh,
static EphyNode *
internal_get_host (EphyHistory *eh, const char *url, gboolean create)
{
- GnomeVFSURI *vfs_uri = NULL;
EphyNode *host = NULL;
- const char *host_name = NULL;
+ char *host_name = NULL;
GList *host_locations = NULL, *l;
- const char *scheme = NULL;
+ char *scheme = NULL;
GTime now;
g_return_val_if_fail (url != NULL, NULL);
@@ -674,24 +673,22 @@ internal_get_host (EphyHistory *eh, const char *url, gboolean create)
now = time (NULL);
- vfs_uri = gnome_vfs_uri_new (url);
-
- if (vfs_uri)
+ if (url)
{
- scheme = gnome_vfs_uri_get_scheme (vfs_uri);
- host_name = gnome_vfs_uri_get_host_name (vfs_uri);
+ scheme = g_uri_get_scheme (url);
+ host_name = ephy_string_get_host_name (url);
}
/* Build an host name */
if (scheme == NULL || host_name == NULL)
{
- host_name = _("Others");
+ host_name = g_strdup (_("Others"));
host_locations = g_list_append (host_locations,
g_strdup ("about:blank"));
}
else if (strcmp (scheme, "file") == 0)
{
- host_name = _("Local files");
+ host_name = g_strdup (_("Local files"));
host_locations = g_list_append (host_locations,
g_strdup ("file:///"));
}
@@ -766,10 +763,8 @@ internal_get_host (EphyHistory *eh, const char *url, gboolean create)
ephy_history_host_visited (eh, host, now);
}
- if (vfs_uri)
- {
- gnome_vfs_uri_unref (vfs_uri);
- }
+ g_free (scheme);
+ g_free (host_name);
g_list_foreach (host_locations, (GFunc)g_free, NULL);
g_list_free (host_locations);