diff options
author | Milan Crha <mcrha@redhat.com> | 2011-04-19 15:39:57 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:41:55 +0800 |
commit | 57ba9240f72e2d24bf4e72e52db6fd768761a819 (patch) | |
tree | fe97fc3060b26bbc0b3c960ede4503f1722c59bf | |
parent | 27d6ca4b21e1fc39398825ec689297c824845102 (diff) | |
download | gsoc2013-evolution-57ba9240f72e2d24bf4e72e52db6fd768761a819.tar.gz gsoc2013-evolution-57ba9240f72e2d24bf4e72e52db6fd768761a819.tar.zst gsoc2013-evolution-57ba9240f72e2d24bf4e72e52db6fd768761a819.zip |
Bug #645610 - [regression] Editing contact doesn't refresh view
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-model.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c index 6f679a4233..8e62e40d28 100644 --- a/addressbook/gui/widgets/e-addressbook-model.c +++ b/addressbook/gui/widgets/e-addressbook-model.c @@ -255,28 +255,27 @@ modify_contact (EBookView *book_view, array = model->priv->contacts; while (contact_list != NULL) { - EContact *contact = contact_list->data; + EContact *new_contact = contact_list->data; const gchar *target_uid; gint ii; - target_uid = e_contact_get_const (contact, E_CONTACT_UID); + target_uid = e_contact_get_const (new_contact, E_CONTACT_UID); for (ii = 0; ii < array->len; ii++) { - EContact *contact; + EContact *old_contact; const gchar *uid; - contact = array->pdata[ii]; - g_return_if_fail (contact != NULL); + old_contact = array->pdata[ii]; + g_return_if_fail (old_contact != NULL); - uid = e_contact_get_const (contact, E_CONTACT_UID); + uid = e_contact_get_const (old_contact, E_CONTACT_UID); g_return_if_fail (uid != NULL); if (strcmp (uid, target_uid) != 0) continue; - g_object_unref (contact); - contact = e_contact_duplicate (contact); - array->pdata[ii] = contact; + g_object_unref (old_contact); + array->pdata[ii] = e_contact_duplicate (new_contact); g_signal_emit ( model, signals[CONTACT_CHANGED], 0, ii); |