From 2c1c352d0640abb61b1711ba97d786d2584dbfaf Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Tue, 25 May 2004 17:49:21 +0000 Subject: reenable this function, in a slightly broken manner. we don't have 2004-05-25 Chris Toshok * gui/component/select-names/e-select-names-text-model.c (e_select_names_text_model_activate_obj): reenable this function, in a slightly broken manner. we don't have e_contact_get_book anymore (well, we never had it really... but we lost e_card_get_book). load the system addressbook and supply that to the editors. shouldn't be a problem, since it's a read-only editor anyway. svn path=/trunk/; revision=26082 --- addressbook/ChangeLog | 10 ++++++++ .../select-names/e-select-names-text-model.c | 28 +++++++++++++--------- 2 files changed, 27 insertions(+), 11 deletions(-) (limited to 'addressbook') diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 38e7f7301b..6d458c194c 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,13 @@ +2004-05-25 Chris Toshok + + * gui/component/select-names/e-select-names-text-model.c + (e_select_names_text_model_activate_obj): reenable this function, + in a slightly broken manner. we don't have e_contact_get_book + anymore (well, we never had it really... but we lost + e_card_get_book). load the system addressbook and supply that to + the editors. shouldn't be a problem, since it's a read-only + editor anyway. + 2004-05-25 Chris Toshok [ fixes #58654 ] diff --git a/addressbook/gui/component/select-names/e-select-names-text-model.c b/addressbook/gui/component/select-names/e-select-names-text-model.c index c207e02d79..5d0a1edf36 100644 --- a/addressbook/gui/component/select-names/e-select-names-text-model.c +++ b/addressbook/gui/component/select-names/e-select-names-text-model.c @@ -818,12 +818,9 @@ e_select_names_text_model_get_nth_obj (ETextModel *model, gint n, gint *len) static void e_select_names_text_model_activate_obj (ETextModel *model, gint n) { -#if notyet - /* XXX the new ebook doesn't have e_contact_get_book, and we - don't really want to add it, so this can't be implemented - this simply anymore */ ESelectNamesModel *source = E_SELECT_NAMES_TEXT_MODEL (model)->source; EContact *contact; + EBook *book; gint i; i = nth_obj_index (source, n); @@ -831,19 +828,28 @@ e_select_names_text_model_activate_obj (ETextModel *model, gint n) contact = e_select_names_model_get_contact (source, i); g_return_if_fail (contact != NULL); - + + /* XXX unfortunately we don't have an e_contact_get_book call + anymore, so we can't query for the addressbook that the + contact came from. however, since we're bringing up a + read-only contact editor, it really doesn't matter what we + show in the source option menu, does it? */ + book = e_book_new_system_addressbook (NULL); + g_return_if_fail (book != NULL); + /* present read-only contact editor when someone double clicks from here */ if (e_contact_get (contact, E_CONTACT_IS_LIST)) { EContactListEditor *ce; - ce = e_addressbook_show_contact_list_editor (e_contact_get_book(contact), contact, FALSE, FALSE); - e_contact_list_editor_raise (ce); + ce = eab_show_contact_list_editor (book, contact, FALSE, FALSE); + eab_editor_raise (EAB_EDITOR (ce)); } else { - EABContactEditor *ce; - ce = e_addressbook_show_contact_editor (e_contact_get_book(contact), contact, FALSE, FALSE); - e_contact_editor_raise (ce); + EContactEditor *ce; + ce = eab_show_contact_editor (book, contact, FALSE, FALSE); + eab_editor_raise (EAB_EDITOR (ce)); } -#endif + + g_object_unref (book); } -- cgit