aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2004-06-22 06:05:57 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2004-06-22 06:05:57 +0800
commit220d812d83540192c0c484b425163a2545753e24 (patch)
tree725c126f0b57612b21429fdf44a684b326ab71cb /src/bookmarks
parentbcc276fa99bbded1b5b42503dfb2feca30c48e24 (diff)
downloadgsoc2013-epiphany-220d812d83540192c0c484b425163a2545753e24.tar
gsoc2013-epiphany-220d812d83540192c0c484b425163a2545753e24.tar.gz
gsoc2013-epiphany-220d812d83540192c0c484b425163a2545753e24.tar.bz2
gsoc2013-epiphany-220d812d83540192c0c484b425163a2545753e24.tar.lz
gsoc2013-epiphany-220d812d83540192c0c484b425163a2545753e24.tar.xz
gsoc2013-epiphany-220d812d83540192c0c484b425163a2545753e24.tar.zst
gsoc2013-epiphany-220d812d83540192c0c484b425163a2545753e24.zip
Drop some unused code.
2004-06-22 Marco Pesenti Gritti <marco@gnome.org> * src/bookmarks/ephy-bookmarks-import.c: (bookmark_add), (xbel_parse_bookmark), (ephy_bookmarks_import_mozilla), (parse_rdf_item): Drop some unused code.
Diffstat (limited to 'src/bookmarks')
-rw-r--r--src/bookmarks/ephy-bookmarks-import.c39
1 files changed, 11 insertions, 28 deletions
diff --git a/src/bookmarks/ephy-bookmarks-import.c b/src/bookmarks/ephy-bookmarks-import.c
index 615463f59..336a2a5e2 100644
--- a/src/bookmarks/ephy-bookmarks-import.c
+++ b/src/bookmarks/ephy-bookmarks-import.c
@@ -53,33 +53,16 @@ typedef enum
static EphyNode *
bookmark_add (EphyBookmarks *bookmarks,
const char *title,
- const char *address,
- const char *topic_name)
+ const char *address)
{
- EphyNode *topic;
- EphyNode *bmk;
-
- if (ephy_bookmarks_find_bookmark (bookmarks, address)) return NULL;
-
- bmk = ephy_bookmarks_add (bookmarks, title, address);
-
- if (bmk == NULL) return NULL;
-
- if (topic_name)
+ if (!ephy_bookmarks_find_bookmark (bookmarks, address))
{
- topic = ephy_bookmarks_find_keyword (bookmarks, topic_name, FALSE);
- if (topic == NULL)
- {
- topic = ephy_bookmarks_add_keyword (bookmarks, topic_name);
- }
-
- if (topic != NULL)
- {
- ephy_bookmarks_set_keyword (bookmarks, topic, bmk);
- }
+ return ephy_bookmarks_add (bookmarks, title, address);
+ }
+ else
+ {
+ return NULL;
}
-
- return bmk;
}
gboolean
@@ -257,7 +240,7 @@ xbel_parse_bookmark (EphyBookmarks *eb, xmlTextReaderPtr reader, EphyNode **ret_
title = xmlStrdup (_("Untitled"));
}
- node = bookmark_add (eb, title, address, NULL);
+ node = bookmark_add (eb, title, address);
if (node == NULL)
{
/* probably a duplicate */
@@ -694,7 +677,7 @@ ephy_bookmarks_import_mozilla (EphyBookmarks *bookmarks,
FILE *bf; /* bookmark file */
GString *name;
char *parsedname;
- GString *url = g_string_new (NULL);
+ GString *url;
GList *folders = NULL, *l;
if (eel_gconf_get_boolean (CONF_LOCKDOWN_DISABLE_BOOKMARK_EDITING)) return FALSE;
@@ -728,7 +711,7 @@ ephy_bookmarks_import_mozilla (EphyBookmarks *bookmarks,
case NS_SITE:
parsedname = ns_parse_bookmark_item (name);
- node = bookmark_add (bookmarks, parsedname, url->str, NULL);
+ node = bookmark_add (bookmarks, parsedname, url->str);
if (node == NULL)
{
@@ -880,7 +863,7 @@ parse_rdf_item (EphyBookmarks *bookmarks,
child = child->next;
}
- bmk = bookmark_add (bookmarks, title, link, NULL);
+ bmk = bookmark_add (bookmarks, title, link);
if (bmk)
{
l = subjects;