aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/ChangeLog18
-rw-r--r--addressbook/gui/widgets/eab-gui-util.c22
2 files changed, 31 insertions, 9 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index e92238559e..d45f2559fa 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,12 +1,22 @@
-2005-08-01 Srinivasa Ragavan <sragavan@novell.com>
+2005-03-03 Sushma Rai <rsushma@novell.com>
+
+ * gui/widgets/eab-gui-util.c (eab_transfer_contacts): Initialize the
+ flag status to FALSE.
+ (got_book_cb): Set status to TRUE on loading the address book.
+ (contact_added_cb): Set status to FALSE on error or cancel operation.
+ Set status to true on success. Call process_unref always.
+ (delete_contacts): Delete the contacts only on success.
+ Fixes #311133, #273716.
+
+2005-08-03 Srinivasa Ragavan <sragavan@novell.com>
* gui/widgets/eab-gui-util.c (eab_load_error_dialog): Made the error dialog
- for load-error nonmodal, since it block the UI along with popup menu.
+ for load-error nonmodal, since it blocks the UI along with popup menu.
* gui/component/addressbook-view.c (load_uri_for_selection)
(primary_source_selection_changed_callback) (addressbook_view_init):
- Checks whether the book is already selected. If so it doesnt reselect
- it on a r-click. Fixes the bug #309247
+ Checks whether the book is already selected. If so it doesn't reselect
+ it on a right-click. Fixes the bug #309247
2005-08-03 Frank Arnold <farnold@cvs.gnome.org>
diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c
index 646887a8cd..85a4e8d0f8 100644
--- a/addressbook/gui/widgets/eab-gui-util.c
+++ b/addressbook/gui/widgets/eab-gui-util.c
@@ -628,6 +628,7 @@ typedef void (*ContactCopyDone) (ContactCopyProcess *process);
struct ContactCopyProcess_ {
int count;
+ gboolean book_status;
GList *contacts;
EBook *source;
EBook *destination;
@@ -654,9 +655,11 @@ do_delete (gpointer data, gpointer user_data)
static void
delete_contacts (ContactCopyProcess *process)
{
- g_list_foreach (process->contacts,
- do_delete,
- process->source);
+ if (process->book_status == TRUE) {
+ g_list_foreach (process->contacts,
+ do_delete,
+ process->source);
+ }
}
static void
@@ -680,10 +683,17 @@ contact_added_cb (EBook* book, EBookStatus status, const char *id, gpointer user
ContactCopyProcess *process = user_data;
if (status != E_BOOK_ERROR_OK && status != E_BOOK_ERROR_CANCELLED) {
+ process->book_status = FALSE;
eab_error_dialog (_("Error adding contact"), status);
- } else {
- process_unref (process);
+ }
+ else if (status == E_BOOK_ERROR_CANCELLED) {
+ process->book_status = FALSE;
}
+ else {
+ /* success */
+ process->book_status = TRUE;
+ }
+ process_unref (process);
}
static void
@@ -709,6 +719,7 @@ got_book_cb (EBook *book, EBookStatus status, gpointer closure)
process = closure;
if (status == E_BOOK_ERROR_OK) {
process->destination = book;
+ process->book_status = TRUE;
g_object_ref (book);
g_list_foreach (process->contacts,
do_copy,
@@ -757,6 +768,7 @@ eab_transfer_contacts (EBook *source, GList *contacts /* adopted */, gboolean de
process = g_new (ContactCopyProcess, 1);
process->count = 1;
+ process->book_status = FALSE;
process->source = source;
g_object_ref (source);
process->contacts = contacts;