diff options
author | Devashish Sharma <dsharma@src.gnome.org> | 2006-03-06 18:10:01 +0800 |
---|---|---|
committer | Devashish Sharma <dsharma@src.gnome.org> | 2006-03-06 18:10:01 +0800 |
commit | e5a38f3232986b53ab64b01655aa5732aaa371a2 (patch) | |
tree | 5c9eba641851600077808f6f01c87b460287c06a /addressbook | |
parent | efea37666f7a61f329cbd12e0e9d09cff32d45da (diff) | |
download | gsoc2013-evolution-e5a38f3232986b53ab64b01655aa5732aaa371a2.tar.gz gsoc2013-evolution-e5a38f3232986b53ab64b01655aa5732aaa371a2.tar.zst gsoc2013-evolution-e5a38f3232986b53ab64b01655aa5732aaa371a2.zip |
Fix for Bug 332136.
svn path=/trunk/; revision=31656
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/ChangeLog | 9 | ||||
-rw-r--r-- | addressbook/importers/evolution-csv-importer.c | 2 | ||||
-rw-r--r-- | addressbook/importers/evolution-ldif-importer.c | 9 | ||||
-rw-r--r-- | addressbook/importers/evolution-vcard-importer.c | 9 |
4 files changed, 12 insertions, 17 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 77af136a92..406c09fac7 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,12 @@ +2006-03-06 Devashish Sharma <sdevashish@novell.com> + + * importers/evolution-ldif-importer.c (ldif_import): + * importers/evolution-csv-importers.c (csv_import) : + * importers/evolution-vcard-importer.c (vcard_import) : + Fix for Bug 332136: Evolution fails to import contacts from a file into + an addressbook if the addressbook is never opened. + Patch by Xiurong Simon Zheng. + 2006-03-05 Devashish Sharma <sdevashish@novell.com> * gui/widgets/e-addressbook-view.etspec : Fix for bug 268458. diff --git a/addressbook/importers/evolution-csv-importer.c b/addressbook/importers/evolution-csv-importer.c index 59ede0fe99..bc0e6a5dbe 100644 --- a/addressbook/importers/evolution-csv-importer.c +++ b/addressbook/importers/evolution-csv-importer.c @@ -758,7 +758,7 @@ csv_import (EImport *ei, EImportTarget *target, EImportImporter *im) gci->size = ftell(file); fseek(file, 0, SEEK_SET); - e_book_open(gci->book, TRUE, NULL); + e_book_open(gci->book, FALSE, NULL); gci->idle_id = g_idle_add (csv_import_contacts, gci); } diff --git a/addressbook/importers/evolution-ldif-importer.c b/addressbook/importers/evolution-ldif-importer.c index 02607e8cb5..9259b8f879 100644 --- a/addressbook/importers/evolution-ldif-importer.c +++ b/addressbook/importers/evolution-ldif-importer.c @@ -702,13 +702,6 @@ ldif_import(EImport *ei, EImportTarget *target, EImportImporter *im) return; } - if (!e_book_is_writable (book)) { - g_message(G_STRLOC ":Book is readonly"); - e_import_complete(ei, target); - g_object_unref(book); - return; - } - filename = g_filename_from_uri(s->uri_src, NULL, NULL); if (filename != NULL) { file = g_fopen(filename, "r"); @@ -732,7 +725,7 @@ ldif_import(EImport *ei, EImportTarget *target, EImportImporter *im) fseek(file, 0, SEEK_SET); gci->dn_contact_hash = g_hash_table_new(g_str_hash, g_str_equal); - e_book_open(gci->book, TRUE, NULL); + e_book_open(gci->book, FALSE, NULL); gci->idle_id = g_idle_add(ldif_import_contacts, gci); } diff --git a/addressbook/importers/evolution-vcard-importer.c b/addressbook/importers/evolution-vcard-importer.c index ec63ed07a0..4e68e8b09c 100644 --- a/addressbook/importers/evolution-vcard-importer.c +++ b/addressbook/importers/evolution-vcard-importer.c @@ -481,13 +481,6 @@ vcard_import(EImport *ei, EImportTarget *target, EImportImporter *im) return; } - if (!e_book_is_writable (book)) { - g_message (G_STRLOC ":Book is readonly."); - e_import_complete(ei, target); - g_object_unref(book); - return; - } - if (!g_file_get_contents (filename, &contents, NULL, NULL)) { g_message (G_STRLOC ":Couldn't read file."); g_free (filename); @@ -503,7 +496,7 @@ vcard_import(EImport *ei, EImportTarget *target, EImportImporter *im) gci->target = target; gci->book = book; - e_book_open (gci->book, TRUE, NULL); + e_book_open (gci->book, FALSE, NULL); if (encoding == VCARD_ENCODING_UTF16) { gchar *tmp; |