From 8cb68557aebb62334f68beeea60cf3bbf5930f9e Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Mon, 25 Jun 2001 01:09:43 +0000 Subject: correct path to libecontacteditor.a. (minicard_widget_test_LDADD): same. 2001-06-24 Chris Toshok * gui/widgets/Makefile.am (minicard_test_LDADD): correct path to libecontacteditor.a. (minicard_widget_test_LDADD): same. (INCLUDES): same, for the includes. * gui/widgets/e-minicard.h: correct e-contact-editor.h path. * gui/widgets/e-addressbook-util.h: correct path to e-contact-editor.h, and add e-contact-list-editor.h. Add prototype for e_addressbook_show_contact_list_editor. * gui/widgets/e-addressbook-util.c: remove #include "e-contact-editor.h" (our header includes it.) (added_cb): rename card_added_cb to this, and make it so it can be reused in both the list and card cases. remove the g_print too. (modified_cb): same for modified case. (deleted_cb): same for deleted case. (editor_closed_cb): change first arg to GtkObject* so we can reuse this for both list and card. (e_addressbook_show_contact_editor): use added_cb, modified_cb, deleted_cb, and pass FALSE as user_data. (e_addressbook_show_contact_list_editor): new function, same as above but creating a contact-list-editor, and pass TRUE as user_data. * gui/component/e-address-popup.c: correct path to contact-editor. * gui/component/e-address-widget.c: same. * gui/component/select-names/e-select-names-popup.c: same. * gui/component/select-names/e-select-names-text-model.c: same. * gui/component/addressbook.c (new_contact_list_cb): new function. (update_command_state): update ContactNewList command. (verbs): remove ViewAll from the toolbar from the verb list. Add ContactNewList. (pixmaps): same for pixmaps. * gui/component/Makefile.am (evolution_addressbook_LDADD): new path for contact-editor. (INCLUDES): same. * gui/contact-list-editor/e-contact-list-model.h: * gui/contact-list-editor/e-contact-list-model.c: * gui/contact-list-editor/e-contact-list-editor.h: * gui/contact-list-editor/e-contact-list-editor.c: * gui/contact-list-editor/Makefile.am: Initial contact-list editor commit. * gui/Makefile.am (SUBDIRS): add contact-editor. * Makefile.am: (SUBDIRS): remove contact-editor. svn path=/trunk/; revision=10463 --- addressbook/gui/component/addressbook.c | 38 ++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 17 deletions(-) (limited to 'addressbook/gui/component/addressbook.c') diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c index 2936855d57..bd51a3515e 100644 --- a/addressbook/gui/component/addressbook.c +++ b/addressbook/gui/component/addressbook.c @@ -67,6 +67,21 @@ new_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path) e_addressbook_show_contact_editor (book, e_card_new(""), TRUE, e_addressbook_view_can_create(view->view)); } +static void +new_contact_list_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_addressbook_show_contact_list_editor (book, e_card_new(""), TRUE, e_addressbook_view_can_create(view->view)); +} + static void config_cb (BonoboUIComponent *uih, void *user_data, const char *path) { @@ -101,13 +116,6 @@ print_cb (BonoboUIComponent *uih, void *user_data, const char *path) e_addressbook_view_print(view->view); } -static void -show_all_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path) -{ - AddressbookView *view = (AddressbookView *) user_data; - e_addressbook_view_show_all(view->view); -} - static void stop_loading_cb (BonoboUIComponent *uih, void *user_data, const char *path) { @@ -153,6 +161,10 @@ update_command_state (EAddressbookView *eav, AddressbookView *view) "/commands/ContactNew", "sensitive", e_addressbook_view_can_create (view->view) ? "1" : "0", NULL); + bonobo_ui_component_set_prop (uic, + "/commands/ContactNewList", + "sensitive", + e_addressbook_view_can_create (view->view) ? "1" : "0", NULL); /* Print Contact */ bonobo_ui_component_set_prop (uic, @@ -184,14 +196,6 @@ update_command_state (EAddressbookView *eav, AddressbookView *view) e_addressbook_view_can_select_all (view->view) ? "1" : "0", NULL); - /* View All Contacts */ -#if 0 - /* this is always enabled */ - bonobo_ui_component_set_prop (uic, - "/Toolbar/ContactViewAll", - "sensitive", "1", NULL); -#endif - /* Stop */ bonobo_ui_component_set_prop (uic, "/commands/ContactStop", @@ -212,8 +216,8 @@ BonoboUIVerb verbs [] = { BONOBO_UI_UNSAFE_VERB ("AddressbookConfig", config_cb), BONOBO_UI_UNSAFE_VERB ("ContactNew", new_contact_cb), + BONOBO_UI_UNSAFE_VERB ("ContactNewList", new_contact_list_cb), BONOBO_UI_UNSAFE_VERB ("ContactDelete", delete_contact_cb), - BONOBO_UI_UNSAFE_VERB ("ContactViewAll", show_all_contacts_cb), BONOBO_UI_UNSAFE_VERB ("ContactStop", stop_loading_cb), BONOBO_UI_UNSAFE_VERB ("ContactsCut", cut_contacts_cb), @@ -230,8 +234,8 @@ static EPixmap pixmaps [] = { E_PIXMAP ("/menu/File/Print/ContactsPrintPreview", "print-preview.xpm"), E_PIXMAP ("/menu/Tools/Component/AddressbookConfig", "configure_16_addressbook.xpm"), - E_PIXMAP ("/Toolbar/ContactViewAll", "all_contacts.xpm"), E_PIXMAP ("/Toolbar/ContactNew", "new_contact.xpm"), + E_PIXMAP ("/Toolbar/ContactNewList", "all_contacts.xpm"), E_PIXMAP_END }; -- cgit v1.2.3