From a5fc85f2f49c04d8b0344c8e967c2bf18856a46a Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Thu, 13 Jul 2000 19:22:42 +0000 Subject: Switched the order of compilation of printing and contact-editor. 2000-07-13 Christopher James Lahey * Makefile.am: Switched the order of compilation of printing and contact-editor. * contact-editor/Makefile.am: Added printing libraries and a confirm delete dialog glade file. * contact-editor/e-contact-editor.c, contact-editor/e-contact-editor.h: Enabled the delete and print functions as well as providing a confirm delete dialog to the outside world. * gui/component/addressbook.c: Made the delete button on new cards active. * gui/minicard/Makefile.am: Added printing libraries to a number of test programs. * gui/minicard/e-minicard.c: Added print and delete to the right click menu. Made the delete button on the card editor active. * printing/e-contact-print.c, printing/e-contact-print.h: Added a function to print a single card. svn path=/trunk/; revision=4151 --- addressbook/gui/component/addressbook.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'addressbook/gui/component') diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c index 7295682bf7..477f4b6f40 100644 --- a/addressbook/gui/component/addressbook.c +++ b/addressbook/gui/component/addressbook.c @@ -125,6 +125,16 @@ commit_card_cb (EContactEditor *ce, ECard *card, gpointer data) e_book_commit_card (book, card, card_modified_cb, NULL); } +/* Callback for the delete_card signal from the contact editor */ +static void +delete_card_cb (EContactEditor *ce, ECard *card, gpointer data) +{ + EBook *book; + + book = E_BOOK (data); + e_book_remove_card (book, card, card_modified_cb, NULL); +} + /* Callback used when the contact editor is closed */ static void editor_closed_cb (EContactEditor *ce, gpointer data) @@ -157,6 +167,8 @@ new_contact_cb (BonoboUIHandler *uih, void *user_data, const char *path) GTK_SIGNAL_FUNC (add_card_cb), book); gtk_signal_connect (GTK_OBJECT (ce), "commit_card", GTK_SIGNAL_FUNC (commit_card_cb), book); + gtk_signal_connect (GTK_OBJECT (ce), "delete_card", + GTK_SIGNAL_FUNC (delete_card_cb), book); gtk_signal_connect (GTK_OBJECT (ce), "editor_closed", GTK_SIGNAL_FUNC (editor_closed_cb), NULL); -- cgit v1.2.3