From 99700ad43dcbf0bf95b335a9fc8f95934080d63c Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Mon, 10 Apr 2000 15:46:25 +0000 Subject: Fixed a bug where I was sending the wrong information to some callbacks. 2000-04-10 Christopher James Lahey * addressbook/backend/ebook/e-book-view.c: Fixed a bug where I was sending the wrong information to some callbacks. * addressbook/backend/ebook/e-card.c, addressbook/backend/ebook/e-card.h: Added an e_card_duplicate function. Made ids get stored in vcards. Made sure to delete the url if it exists. * addressbook/backend/pas/Makefile.am: Made pas include addressbook/backend/ebook/ in the search path. * addressbook/backend/pas/pas-backend-file.c: Fixed some bugs and made the create card function store the generated id in the card being saved. * addressbook/backend/pas/pas-book-view.c: Fixed a double free bug. * addressbook/contact-editor/e-contact-editor.c: Fixed some bugs. Made the contact editor actually return a valid card when gtk_object_get(editor, "card", ...) is called. * addressbook/contact-editor/e-contact-editor.h: Fixed a copy and paste error. * addressbook/gui/component/addressbook.c: Made this get the card properly. * addressbook/gui/minicard/Makefile.am: Made this include contact-editor directory in the search path and link against libecontacteditor so that double clicking can open a dialog. * addressbook/gui/minicard/e-minicard.c: Fixed some small bugs. Made double clicking open a contact editor dialog if this minicard is contained in a minicard view. (It needs the minicard view to get the EBook to save to. * wombat/Makefile.am: Link wombat against libebook, since pas-backend-file now uses ECard. svn path=/trunk/; revision=2360 --- addressbook/gui/component/addressbook.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'addressbook/gui/component') diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c index 7d795eb8d8..064b29b7f8 100644 --- a/addressbook/gui/component/addressbook.c +++ b/addressbook/gui/component/addressbook.c @@ -76,7 +76,7 @@ new_contact_cb (BonoboUIHandler *uih, void *user_data, const char *path) { gint result; GtkWidget* contact_editor = - e_contact_editor_new(e_card_new(BLANK_VCARD)); + e_contact_editor_new(e_card_new("")); EBook *book = E_BOOK (user_data); GtkWidget* dlg = gnome_dialog_new ("Contact Editor", "Save", "Cancel", NULL); @@ -94,13 +94,17 @@ new_contact_cb (BonoboUIHandler *uih, void *user_data, const char *path) /* If the user clicks "okay"...*/ if (result == 0) { + ECard *card; g_assert (contact_editor); g_assert (GTK_IS_OBJECT (contact_editor)); + gtk_object_get(GTK_OBJECT(contact_editor), + "card", &card, + NULL); /* Add the card in the contact editor to our ebook */ e_book_add_card ( book, - E_CONTACT_EDITOR(contact_editor)->card, + card, card_added_cb, NULL); } -- cgit v1.2.3