From 6c05b09be16ac8eceb17653c3c26c0c6f963ef10 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 18 Jun 2012 15:34:33 +0200 Subject: Do not call g_object_notify() when property didn't change --- addressbook/gui/contact-list-editor/e-contact-list-editor.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'addressbook/gui/contact-list-editor') 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); -- cgit v1.2.3