aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-06-18 21:34:33 +0800
committerMilan Crha <mcrha@redhat.com>2012-06-18 21:35:44 +0800
commit6c05b09be16ac8eceb17653c3c26c0c6f963ef10 (patch)
tree5bb22771cf05419f851373ee43b1ad39a0dcfeaa /addressbook
parente045e6f12324e1063a87488ac298fd23affea581 (diff)
downloadgsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar
gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar.gz
gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar.bz2
gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar.lz
gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar.xz
gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar.zst
gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.zip
Do not call g_object_notify() when property didn't change
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-editor.c9
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.c3
-rw-r--r--addressbook/gui/widgets/e-addressbook-selector.c3
-rw-r--r--addressbook/gui/widgets/eab-contact-display.c3
4 files changed, 18 insertions, 0 deletions
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
index fe61ccaa9e..4bb92a351d 100644
--- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c
+++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
@@ -1687,6 +1687,9 @@ e_contact_list_editor_set_client (EContactListEditor *editor,
g_return_if_fail (E_IS_CONTACT_LIST_EDITOR (editor));
g_return_if_fail (E_IS_BOOK_CLIENT (book_client));
+ if (book_client == editor->priv->book_client)
+ return;
+
if (editor->priv->book_client != NULL)
g_object_unref (editor->priv->book_client);
editor->priv->book_client = g_object_ref (book_client);
@@ -1888,6 +1891,9 @@ e_contact_list_editor_set_is_new_list (EContactListEditor *editor,
g_return_if_fail (E_IS_CONTACT_LIST_EDITOR (editor));
+ if ((editor->priv->is_new_list ? 1 : 0) == (is_new_list ? 1 : 0))
+ return;
+
editor->priv->is_new_list = is_new_list;
contact_list_editor_update (editor);
@@ -1908,6 +1914,9 @@ e_contact_list_editor_set_editable (EContactListEditor *editor,
{
g_return_if_fail (E_IS_CONTACT_LIST_EDITOR (editor));
+ if ((editor->priv->editable ? 1 : 0) == (editable ? 1 : 0))
+ return;
+
editor->priv->editable = editable;
contact_list_editor_update (editor);
diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c
index 3cc02dff54..a842ff40e0 100644
--- a/addressbook/gui/widgets/e-addressbook-model.c
+++ b/addressbook/gui/widgets/e-addressbook-model.c
@@ -889,6 +889,9 @@ e_addressbook_model_set_client (EAddressbookModel *model,
g_return_if_fail (E_IS_ADDRESSBOOK_MODEL (model));
g_return_if_fail (E_IS_BOOK_CLIENT (book_client));
+ if (model->priv->book_client == book_client)
+ return;
+
if (model->priv->book_client != NULL) {
if (model->priv->book_client == book_client)
return;
diff --git a/addressbook/gui/widgets/e-addressbook-selector.c b/addressbook/gui/widgets/e-addressbook-selector.c
index 80595ef59b..513da877bc 100644
--- a/addressbook/gui/widgets/e-addressbook-selector.c
+++ b/addressbook/gui/widgets/e-addressbook-selector.c
@@ -420,6 +420,9 @@ e_addressbook_selector_set_current_view (EAddressbookSelector *selector,
if (current_view != NULL)
g_return_if_fail (E_IS_ADDRESSBOOK_VIEW (current_view));
+ if (selector->priv->current_view == current_view)
+ return;
+
if (selector->priv->current_view != NULL) {
g_object_unref (selector->priv->current_view);
selector->priv->current_view = NULL;
diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c
index 28fd5b02be..f877821593 100644
--- a/addressbook/gui/widgets/eab-contact-display.c
+++ b/addressbook/gui/widgets/eab-contact-display.c
@@ -577,6 +577,9 @@ eab_contact_display_set_contact (EABContactDisplay *display,
{
g_return_if_fail (EAB_IS_CONTACT_DISPLAY (display));
+ if (display->priv->contact == contact)
+ return;
+
if (contact != NULL)
g_object_ref (contact);