aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets
diff options
context:
space:
mode:
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