From ef416a0cf48b908ece6dbfaf932cdf6b28f07e34 Mon Sep 17 00:00:00 2001 From: Jon Trowbridge Date: Fri, 12 Oct 2001 07:53:25 +0000 Subject: Check to see if the uri we are setting is the same as the current uri. If 2001-10-12 Jon Trowbridge * gui/component/select-names/e-select-names.c (addressbook_model_set_uri): Check to see if the uri we are setting is the same as the current uri. If so, do nothing. (Bug #11324) svn path=/trunk/; revision=13620 --- addressbook/gui/component/select-names/e-select-names.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'addressbook/gui/component/select-names') diff --git a/addressbook/gui/component/select-names/e-select-names.c b/addressbook/gui/component/select-names/e-select-names.c index 0befe02ffc..e915b20edf 100644 --- a/addressbook/gui/component/select-names/e-select-names.c +++ b/addressbook/gui/component/select-names/e-select-names.c @@ -139,6 +139,15 @@ static void addressbook_model_set_uri(EAddressbookModel *model, char *uri) { EBook *book; + + /* If uri == the current uri, then we don't have to do anything */ + book = e_addressbook_model_get_ebook (model); + if (book) { + const gchar *current_uri = e_book_get_uri (book); + if (uri && current_uri && !strcmp (uri, current_uri)) + return; + } + book = e_book_new(); gtk_object_ref(GTK_OBJECT(model)); addressbook_load_uri(book, uri, (EBookCallback) set_book, model); -- cgit