aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui/component')
-rw-r--r--addressbook/gui/component/addressbook.c2
-rw-r--r--addressbook/gui/component/e-address-popup.c11
-rw-r--r--addressbook/gui/component/select-names/e-select-names-popup.c23
-rw-r--r--addressbook/gui/component/select-names/e-select-names-text-model.c3
4 files changed, 14 insertions, 25 deletions
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index 1ae42755ca..e8a14c10e2 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -64,7 +64,7 @@ new_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path)
g_assert (E_IS_BOOK (book));
- e_addressbook_show_contact_editor (book, NULL, e_addressbook_view_can_create (view->view));
+ e_addressbook_show_contact_editor (book, e_card_new(""), TRUE, e_addressbook_view_can_create(view->view));
}
static void
diff --git a/addressbook/gui/component/e-address-popup.c b/addressbook/gui/component/e-address-popup.c
index 134ce1241b..81add0e243 100644
--- a/addressbook/gui/component/e-address-popup.c
+++ b/addressbook/gui/component/e-address-popup.c
@@ -214,21 +214,14 @@ e_address_popup_new (void)
}
static void
-found_fields_cb (EBook *book, EBookStatus status, EList *writable_fields, gpointer closure)
+edit_contact_info_cb (EAddressPopup *pop)
{
- EAddressPopup *pop = E_ADDRESS_POPUP (closure);
- EContactEditor *ce = e_contact_editor_new (pop->card, FALSE, writable_fields, FALSE);
+ EContactEditor *ce = e_addressbook_show_contact_editor (common_book, pop->card, FALSE, TRUE);
e_contact_editor_raise (ce);
gtk_widget_destroy (GTK_WIDGET (pop));
}
static void
-edit_contact_info_cb (EAddressPopup *pop)
-{
- e_book_get_supported_fields (common_book, found_fields_cb, pop);
-}
-
-static void
e_address_popup_cardify (EAddressPopup *pop, ECard *card)
{
GtkWidget *b;
diff --git a/addressbook/gui/component/select-names/e-select-names-popup.c b/addressbook/gui/component/select-names/e-select-names-popup.c
index e31fa8506f..4cea4dfb86 100644
--- a/addressbook/gui/component/select-names/e-select-names-popup.c
+++ b/addressbook/gui/component/select-names/e-select-names-popup.c
@@ -41,6 +41,7 @@
#include <addressbook/backend/ebook/e-book-util.h>
#include <addressbook/contact-editor/e-contact-editor.h>
#include <addressbook/contact-editor/e-contact-quick-add.h>
+#include "e-addressbook-util.h"
#include "e-select-names-popup.h"
typedef struct _PopupInfo PopupInfo;
@@ -93,23 +94,17 @@ popup_info_cleanup (GtkWidget *w, gpointer info)
/* You are in a maze of twisty little callbacks, all alike... */
static void
-found_fields_cb (EBook *book, EBookStatus status, EList *writable_fields, gpointer user_data)
-{
- EDestination *dest = E_DESTINATION (user_data);
- EContactEditor *ce;
- ECard *card;
-
- card = (ECard *) e_destination_get_card (dest);
- ce = e_contact_editor_new (card, FALSE, writable_fields, FALSE);
- e_contact_editor_raise (ce);
- gtk_object_unref (GTK_OBJECT (dest));
-}
-
-static void
edit_contact_info_have_book_cb (EBook *book, gpointer user_data)
{
if (book) {
- e_book_get_supported_fields (book, found_fields_cb, user_data);
+ EDestination *dest = E_DESTINATION (user_data);
+ EContactEditor *ce;
+ ECard *card;
+
+ card = (ECard *) e_destination_get_card (dest);
+ ce = e_addressbook_show_contact_editor (book, card, FALSE, TRUE);
+ e_contact_editor_raise (ce);
+ gtk_object_unref (GTK_OBJECT (dest));
}
}
diff --git a/addressbook/gui/component/select-names/e-select-names-text-model.c b/addressbook/gui/component/select-names/e-select-names-text-model.c
index 6aa6a75a9a..c9d1d1177f 100644
--- a/addressbook/gui/component/select-names/e-select-names-text-model.c
+++ b/addressbook/gui/component/select-names/e-select-names-text-model.c
@@ -18,6 +18,7 @@
#include <addressbook/contact-editor/e-contact-editor.h>
#include "e-select-names-text-model.h"
+#include "e-addressbook-util.h"
static FILE *out = NULL; /* stream for debugging spew */
@@ -714,7 +715,7 @@ e_select_names_text_model_activate_obj (ETextModel *model, gint n)
g_return_if_fail (card);
/* present read-only contact editor when someone double clicks from here */
- contact_editor = e_contact_editor_new ((ECard *) card, FALSE, NULL, TRUE);
+ contact_editor = e_addressbook_show_contact_editor (NULL, card, FALSE, FALSE);
e_contact_editor_raise (contact_editor);
}