aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-bookmarks-import.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-01-20 05:39:01 +0800
committerChristian Persch <chpe@src.gnome.org>2005-01-20 05:39:01 +0800
commita43ee535a9b483a7e28abae496854c65a5c25703 (patch)
treed601fa8db6f06170ba30c5c2b0110d73f9ef953c /src/bookmarks/ephy-bookmarks-import.c
parent1f991ceea9103d6e4c364e5584d092b1b866b469 (diff)
downloadgsoc2013-epiphany-a43ee535a9b483a7e28abae496854c65a5c25703.tar
gsoc2013-epiphany-a43ee535a9b483a7e28abae496854c65a5c25703.tar.gz
gsoc2013-epiphany-a43ee535a9b483a7e28abae496854c65a5c25703.tar.bz2
gsoc2013-epiphany-a43ee535a9b483a7e28abae496854c65a5c25703.tar.lz
gsoc2013-epiphany-a43ee535a9b483a7e28abae496854c65a5c25703.tar.xz
gsoc2013-epiphany-a43ee535a9b483a7e28abae496854c65a5c25703.tar.zst
gsoc2013-epiphany-a43ee535a9b483a7e28abae496854c65a5c25703.zip
Show profile name for mozilla bookmarks, so we can distinguish between
2005-01-19 Christian Persch <chpe@cvs.gnome.org> * lib/ephy-file-helpers.c: (ephy_find_file_recursive): * src/bookmarks/ephy-bookmarks-editor.c: (add_bookmarks_files), (add_bookmarks_source), (import_dialog_response_cb), (cmd_bookmarks_import): * src/bookmarks/ephy-bookmarks-import.c: (ephy_bookmarks_import): * src/bookmarks/ephy-bookmarks-import.h: Show profile name for mozilla bookmarks, so we can distinguish between different profiles. Don't show firefox bookmarks as mozilla bookmarks. Fixes bug #143982.
Diffstat (limited to 'src/bookmarks/ephy-bookmarks-import.c')
-rw-r--r--src/bookmarks/ephy-bookmarks-import.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/bookmarks/ephy-bookmarks-import.c b/src/bookmarks/ephy-bookmarks-import.c
index 52fb3386d..bc1a5ed59 100644
--- a/src/bookmarks/ephy-bookmarks-import.c
+++ b/src/bookmarks/ephy-bookmarks-import.c
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright (C) 2003, 2004 Marco Pesenti Gritti
- * Copyright (C) 2003, 2004 Christian Persch
+ * Copyright (C) 2003, 2004, 2005 Christian Persch
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -68,24 +68,20 @@ gboolean
ephy_bookmarks_import (EphyBookmarks *bookmarks,
const char *filename)
{
- GnomeVFSURI *uri;
const char *type;
gboolean success = FALSE;
if (eel_gconf_get_boolean (CONF_LOCKDOWN_DISABLE_BOOKMARK_EDITING)) return FALSE;
- uri = gnome_vfs_uri_new (filename);
- type = gnome_vfs_get_mime_type_common (uri);
+ type = gnome_vfs_get_file_mime_type (filename, NULL, FALSE);
- LOG ("Importing bookmarks of type %s", type)
+ LOG ("Importing bookmarks of type %s", type ? type : "(null)")
if (type == NULL)
{
- gnome_vfs_uri_unref (uri);
- return FALSE;
+ g_warning ("Couldn't determine the type of the bookmarks file %s!\n", filename);
}
-
- if (strcmp (type, "application/x-mozilla-bookmarks") == 0)
+ else if (strcmp (type, "application/x-mozilla-bookmarks") == 0)
{
success = ephy_bookmarks_import_mozilla (bookmarks, filename);
}
@@ -99,8 +95,9 @@ ephy_bookmarks_import (EphyBookmarks *bookmarks,
success = ephy_bookmarks_import_rdf (bookmarks, filename);
}
else if (strstr (filename, MOZILLA_BOOKMARKS_DIR) != NULL ||
- strstr (filename, FIREBIRD_BOOKMARKS_DIR) != NULL ||
- strstr (filename, FIREFOX_BOOKMARKS_DIR) != NULL)
+ strstr (filename, FIREFOX_BOOKMARKS_DIR_0) != NULL ||
+ strstr (filename, FIREFOX_BOOKMARKS_DIR_1) != NULL ||
+ strstr (filename, FIREFOX_BOOKMARKS_DIR_2) != NULL)
{
success = ephy_bookmarks_import_mozilla (bookmarks, filename);
}
@@ -111,8 +108,6 @@ ephy_bookmarks_import (EphyBookmarks *bookmarks,
}
/* else FIXME: put up some UI to warn user about unrecognised format? */
- gnome_vfs_uri_unref (uri);
-
return success;
}