diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-02-29 04:15:08 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-02-29 04:15:08 +0800 |
commit | 3c50869157c2b9048a8059bb57d1ceb6d743249b (patch) | |
tree | 00a0b576c174fb48516a8f81300d07c565d74add /src/bookmarks | |
parent | dea0b1f586422b9ce905e83ac314695b75f72c09 (diff) | |
download | gsoc2013-epiphany-3c50869157c2b9048a8059bb57d1ceb6d743249b.tar gsoc2013-epiphany-3c50869157c2b9048a8059bb57d1ceb6d743249b.tar.gz gsoc2013-epiphany-3c50869157c2b9048a8059bb57d1ceb6d743249b.tar.bz2 gsoc2013-epiphany-3c50869157c2b9048a8059bb57d1ceb6d743249b.tar.lz gsoc2013-epiphany-3c50869157c2b9048a8059bb57d1ceb6d743249b.tar.xz gsoc2013-epiphany-3c50869157c2b9048a8059bb57d1ceb6d743249b.tar.zst gsoc2013-epiphany-3c50869157c2b9048a8059bb57d1ceb6d743249b.zip |
If a folder has no name, don't tag its bookmarks with "Untitled" keyword,
2004-02-28 Christian Persch <chpe@cvs.gnome.org>
* 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.
Diffstat (limited to 'src/bookmarks')
-rw-r--r-- | src/bookmarks/ephy-bookmarks-import.c | 9 |
1 files changed, 6 insertions, 3 deletions
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); |