diff options
Diffstat (limited to 'addressbook/gui/component/addressbook.c')
-rw-r--r-- | addressbook/gui/component/addressbook.c | 38 |
1 files changed, 21 insertions, 17 deletions
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 @@ -68,6 +68,21 @@ new_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path) } 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) { addressbook_config (NULL /* XXX */); @@ -102,13 +117,6 @@ print_cb (BonoboUIComponent *uih, void *user_data, const char *path) } 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) { AddressbookView *view = (AddressbookView *) user_data; @@ -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 }; |