aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-07-18 03:02:03 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-07-18 03:02:03 +0800
commitec790f576119e171ba9b77dd6f7bfcf7a42ebeb1 (patch)
treee584d3de2d6957fefc68112446fd0364b34487d8 /modules
parentda665f8f99e778263d0a411def22830b2bcaa647 (diff)
downloadgsoc2013-evolution-ec790f576119e171ba9b77dd6f7bfcf7a42ebeb1.tar
gsoc2013-evolution-ec790f576119e171ba9b77dd6f7bfcf7a42ebeb1.tar.gz
gsoc2013-evolution-ec790f576119e171ba9b77dd6f7bfcf7a42ebeb1.tar.bz2
gsoc2013-evolution-ec790f576119e171ba9b77dd6f7bfcf7a42ebeb1.tar.lz
gsoc2013-evolution-ec790f576119e171ba9b77dd6f7bfcf7a42ebeb1.tar.xz
gsoc2013-evolution-ec790f576119e171ba9b77dd6f7bfcf7a42ebeb1.tar.zst
gsoc2013-evolution-ec790f576119e171ba9b77dd6f7bfcf7a42ebeb1.zip
Bug 579702 – Contact changes not shown until restart
Diffstat (limited to 'modules')
-rw-r--r--modules/addressbook/e-book-shell-view-private.c18
-rw-r--r--modules/addressbook/e-book-shell-view-private.h2
2 files changed, 14 insertions, 6 deletions
diff --git a/modules/addressbook/e-book-shell-view-private.c b/modules/addressbook/e-book-shell-view-private.c
index 95e4980c57..f930e6d478 100644
--- a/modules/addressbook/e-book-shell-view-private.c
+++ b/modules/addressbook/e-book-shell-view-private.c
@@ -90,6 +90,7 @@ book_shell_view_selection_change_foreach (gint row,
contact = e_addressbook_model_get_contact (model, row);
e_book_shell_content_set_preview_contact (book_shell_content, contact);
+ book_shell_view->priv->preview_index = row;
}
static void
@@ -121,24 +122,26 @@ selection_change (EBookShellView *book_shell_view,
selection_model, (EForeachFunc)
book_shell_view_selection_change_foreach,
book_shell_view);
- else
+ else {
e_book_shell_content_set_preview_contact (
book_shell_content, NULL);
+ book_shell_view->priv->preview_index = -1;
+ }
}
static void
contact_changed (EBookShellView *book_shell_view,
- EContact *contact)
+ gint index,
+ EAddressbookModel *model)
{
EBookShellContent *book_shell_content;
- EContact *preview_contact;
+ EContact *contact;
book_shell_content = book_shell_view->priv->book_shell_content;
- preview_contact =
- e_book_shell_content_get_preview_contact (book_shell_content);
+ contact = e_addressbook_model_contact_at (model, index);
- if (contact != preview_contact)
+ if (book_shell_view->priv->preview_index != index)
return;
/* Re-render the same contact. */
@@ -167,6 +170,7 @@ contacts_removed (EBookShellView *book_shell_view,
/* If not, clear the contact display. */
e_book_shell_content_set_preview_contact (book_shell_content, NULL);
+ book_shell_view->priv->preview_index = -1;
}
static void
@@ -422,6 +426,7 @@ e_book_shell_view_private_init (EBookShellView *book_shell_view,
priv->uid_to_view = uid_to_view;
priv->uid_to_editor = uid_to_editor;
+ priv->preview_index = -1;
if (!gal_view_collection_loaded (shell_view_class->view_collection))
book_shell_view_load_view_collection (shell_view_class);
@@ -615,6 +620,7 @@ e_book_shell_view_execute_search (EBookShellView *book_shell_view)
g_free (query);
e_book_shell_content_set_preview_contact (book_shell_content, NULL);
+ book_shell_view->priv->preview_index = -1;
}
void
diff --git a/modules/addressbook/e-book-shell-view-private.h b/modules/addressbook/e-book-shell-view-private.h
index b4701aea81..b49677680f 100644
--- a/modules/addressbook/e-book-shell-view-private.h
+++ b/modules/addressbook/e-book-shell-view-private.h
@@ -100,6 +100,8 @@ struct _EBookShellViewPrivate {
GHashTable *uid_to_view;
GHashTable *uid_to_editor;
+
+ gint preview_index;
};
void e_book_shell_view_private_init