diff options
author | Chris Toshok <toshok@ximian.com> | 2004-05-26 01:49:21 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2004-05-26 01:49:21 +0800 |
commit | 2c1c352d0640abb61b1711ba97d786d2584dbfaf (patch) | |
tree | 22c158c46f17511a327896108e046c9826f96cc4 | |
parent | d49714cc98da1c7cabb99fe38436e5af398229a1 (diff) | |
download | gsoc2013-evolution-2c1c352d0640abb61b1711ba97d786d2584dbfaf.tar.gz gsoc2013-evolution-2c1c352d0640abb61b1711ba97d786d2584dbfaf.tar.zst gsoc2013-evolution-2c1c352d0640abb61b1711ba97d786d2584dbfaf.zip |
reenable this function, in a slightly broken manner. we don't have
2004-05-25 Chris Toshok <toshok@ximian.com>
* 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
-rw-r--r-- | addressbook/ChangeLog | 10 | ||||
-rw-r--r-- | addressbook/gui/component/select-names/e-select-names-text-model.c | 28 |
2 files changed, 27 insertions, 11 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 38e7f7301b..6d458c194c 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,5 +1,15 @@ 2004-05-25 Chris Toshok <toshok@ximian.com> + * 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 <toshok@ximian.com> + [ fixes #58654 ] * gui/component/select-names/e-select-names.c (update_query): 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); } |