diff options
Diffstat (limited to 'addressbook/gui/component/addressbook.c')
-rw-r--r-- | addressbook/gui/component/addressbook.c | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c index 1cea4c21f2..b80a2b80d7 100644 --- a/addressbook/gui/component/addressbook.c +++ b/addressbook/gui/component/addressbook.c @@ -98,22 +98,14 @@ editor_closed_cb (EContactEditor *ce, gpointer data) } static void -new_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path) +supported_fields_cb (EBook *book, EBookStatus status, EList *fields, gpointer closure) { - ECard *card; - EBook *book; EContactEditor *ce; - AddressbookView *view = (AddressbookView *) user_data; + ECard *card; card = e_card_new(""); - gtk_object_get(GTK_OBJECT(view->view), - "book", &book, - NULL); - - g_assert (E_IS_BOOK (book)); - - ce = e_contact_editor_new (card, TRUE); + ce = e_contact_editor_new (card, TRUE, fields); gtk_signal_connect (GTK_OBJECT (ce), "add_card", GTK_SIGNAL_FUNC (add_card_cb), book); @@ -128,6 +120,21 @@ new_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path) } static void +new_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path) +{ + EBook *book; + AddressbookView *view = (AddressbookView *) user_data; + + gtk_object_get(GTK_OBJECT(view->view), + "book", &book, + NULL); + + g_assert (E_IS_BOOK (book)); + + e_book_get_supported_fields (book, supported_fields_cb, view); +} + +static void config_cb (BonoboUIComponent *uih, void *user_data, const char *path) { addressbook_config (NULL /* XXX */); |