aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2001-10-28 11:04:53 +0800
committerChris Toshok <toshok@src.gnome.org>2001-10-28 11:04:53 +0800
commita9491dff65271a8c6b643450938df0af74bad52c (patch)
treeb483ba56b5650f3d51fdc869f21eeba3d689f9a6 /addressbook/gui/widgets
parent14557ba81ad6630a1012430e8965c0f08edcc0f0 (diff)
downloadgsoc2013-evolution-a9491dff65271a8c6b643450938df0af74bad52c.tar
gsoc2013-evolution-a9491dff65271a8c6b643450938df0af74bad52c.tar.gz
gsoc2013-evolution-a9491dff65271a8c6b643450938df0af74bad52c.tar.bz2
gsoc2013-evolution-a9491dff65271a8c6b643450938df0af74bad52c.tar.lz
gsoc2013-evolution-a9491dff65271a8c6b643450938df0af74bad52c.tar.xz
gsoc2013-evolution-a9491dff65271a8c6b643450938df0af74bad52c.tar.zst
gsoc2013-evolution-a9491dff65271a8c6b643450938df0af74bad52c.zip
change to EBookCallback signature, and unref the book. (add_card_idle_cb):
2001-10-27 Chris Toshok <toshok@ximian.com> * gui/component/e-address-popup.c (email_table_save_card_cb): change to EBookCallback signature, and unref the book. (add_card_idle_cb): use addressbook_load_default_book, and call the cb if it fails. (e_address_popup_cleanup): fix type -- should be "pop->card = NULL", not "pop = NULL". (contact_editor_cb): change to EBookCallback signature. (edit_contact_info_cb): use addressbook_load_default_book. (start_query): change to EBookCallback signature. (e_address_popup_query): use addressbook_load_default_book. * gui/widgets/e-minicard-control.c (book_open_cb): change to EBookCallback signature, and unref the book. (save_in_addressbook): use addressbook_load_default_book instead of e_book_use_local_address_book. * gui/widgets/Makefile.am (INCLUDES): change includes since we're including addressbook.h which has it's own set of funky include path requirements. svn path=/trunk/; revision=14268
Diffstat (limited to 'addressbook/gui/widgets')
-rw-r--r--addressbook/gui/widgets/Makefile.am3
-rw-r--r--addressbook/gui/widgets/e-minicard-control.c13
2 files changed, 13 insertions, 3 deletions
diff --git a/addressbook/gui/widgets/Makefile.am b/addressbook/gui/widgets/Makefile.am
index 39da68797c..7e1a72e56e 100644
--- a/addressbook/gui/widgets/Makefile.am
+++ b/addressbook/gui/widgets/Makefile.am
@@ -4,9 +4,10 @@ INCLUDES = \
-DEVOLUTION_DATADIR=\""$(datadir)"\" \
-DEVOLUTION_IMAGESDIR=\""$(datadir)"/images/evolution\" \
-I$(top_srcdir) \
- -I$(top_srcdir)/addressbook/backend/ebook \
+ -I$(top_srcdir)/addressbook/backend \
-I$(top_srcdir)/addressbook/gui/contact-editor \
-I$(top_srcdir)/addressbook/gui/merging \
+ -I$(top_srcdir)/addressbook/gui/component \
-I$(top_srcdir)/widgets/misc \
-I$(top_builddir)/shell \
$(BONOBO_GNOME_CFLAGS) \
diff --git a/addressbook/gui/widgets/e-minicard-control.c b/addressbook/gui/widgets/e-minicard-control.c
index 32a8a7cdc9..73417af78c 100644
--- a/addressbook/gui/widgets/e-minicard-control.c
+++ b/addressbook/gui/widgets/e-minicard-control.c
@@ -19,6 +19,8 @@
#include <addressbook/backend/ebook/e-card.h>
#include <gal/util/e-util.h>
+#include <addressbook/gui/component/addressbook.h>
+
#include "e-minicard-control.h"
#include "e-minicard-widget.h"
#include "e-card-merging.h"
@@ -240,7 +242,7 @@ pstream_get_content_types (BonoboPersistStream *ps, void *closure,
}
static void
-book_open_cb (EBook *book, gpointer closure)
+book_open_cb (EBook *book, EBookStatus status, gpointer closure)
{
GList *list = closure;
if (book) {
@@ -248,6 +250,7 @@ book_open_cb (EBook *book, gpointer closure)
for (p = list; p; p = p->next) {
e_card_merging_book_add_card(book, p->data, NULL, NULL);
}
+ gtk_object_unref (GTK_OBJECT (book));
}
e_free_object_list (list);
}
@@ -257,13 +260,19 @@ save_in_addressbook(GtkWidget *button, gpointer data)
{
EMinicardControl *minicard_control = data;
GList *list, *p;
+ EBook *book;
+
+ book = e_book_new ();
list = g_list_copy (minicard_control->card_list);
for (p = list; p; p = p->next)
gtk_object_ref (GTK_OBJECT (p->data));
- e_book_use_local_address_book (book_open_cb, list);
+ if (!addressbook_load_default_book (book, book_open_cb, list)) {
+ gtk_object_unref (GTK_OBJECT (book));
+ book_open_cb (NULL, E_BOOK_STATUS_OTHER_ERROR, list);
+ }
}
static void