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/ChangeLog | 7 +++++++ addressbook/gui/component/select-names/e-select-names.c | 9 +++++++++ 2 files changed, 16 insertions(+) (limited to 'addressbook') diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 52e264864d..4cc68a114f 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,10 @@ +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) + 2001-10-11 Jon Trowbridge * backend/ebook/e-destination.c 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