From 3c50869157c2b9048a8059bb57d1ceb6d743249b Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sat, 28 Feb 2004 20:15:08 +0000 Subject: If a folder has no name, don't tag its bookmarks with "Untitled" keyword, 2004-02-28 Christian Persch * src/bookmarks/ephy-bookmarks-import.c: (xbel_parse_folder), (ephy_bookmarks_import_xbel): If a folder has no name, don't tag its bookmarks with "Untitled" keyword, just skip it. --- ChangeLog | 8 ++++++++ src/bookmarks/ephy-bookmarks-import.c | 9 ++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d2f06b156..3d115bea5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-02-28 Christian Persch + + * src/bookmarks/ephy-bookmarks-import.c: (xbel_parse_folder), + (ephy_bookmarks_import_xbel): + + If a folder has no name, don't tag its bookmarks with "Untitled" + keyword, just skip it. + 2004-02-28 Marco Pesenti Gritti * embed/mozilla/ContentHandler.cpp: diff --git a/src/bookmarks/ephy-bookmarks-import.c b/src/bookmarks/ephy-bookmarks-import.c index 5395d625c..78326a0aa 100644 --- a/src/bookmarks/ephy-bookmarks-import.c +++ b/src/bookmarks/ephy-bookmarks-import.c @@ -369,9 +369,9 @@ xbel_parse_folder (EphyBookmarks *eb, xmlTextReaderPtr reader) } /* tag all bookmarks in the list with keyword %title */ - if (title == NULL) + if (title == NULL || title[0] == '\0') { - title = xmlStrdup (_("Untitled")); + return list; } keyword = ephy_bookmarks_find_keyword (eb, title, FALSE); @@ -669,7 +669,10 @@ ephy_bookmarks_import_xbel (EphyBookmarks *bookmarks, } reader = xmlNewTextReaderFilename (filename); - g_return_val_if_fail (reader != NULL, FALSE); + if (reader == NULL) + { + return FALSE; + } list = xbel_parse_folder (bookmarks, reader); -- cgit v1.2.3