aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component
diff options
context:
space:
mode:
authorJon Trowbridge <trow@ximian.com>2001-10-12 15:53:25 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-10-12 15:53:25 +0800
commitef416a0cf48b908ece6dbfaf932cdf6b28f07e34 (patch)
tree959fd61d94d9a480e38a5f0d347c47545f579798 /addressbook/gui/component
parent59c7688bd633383f4e6577a5eee4f65f051135a4 (diff)
downloadgsoc2013-evolution-ef416a0cf48b908ece6dbfaf932cdf6b28f07e34.tar.gz
gsoc2013-evolution-ef416a0cf48b908ece6dbfaf932cdf6b28f07e34.tar.zst
gsoc2013-evolution-ef416a0cf48b908ece6dbfaf932cdf6b28f07e34.zip
Check to see if the uri we are setting is the same as the current uri. If
2001-10-12 Jon Trowbridge <trow@ximian.com> * 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
Diffstat (limited to 'addressbook/gui/component')
-rw-r--r--addressbook/gui/component/select-names/e-select-names.c9
1 files changed, 9 insertions, 0 deletions
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);