aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Trowbridge <trow@ximian.com>2001-10-27 09:59:49 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-10-27 09:59:49 +0800
commit3eca5f6e1c8822792a37ec2142767a7ebbdd145f (patch)
treeae3f2a4930fbb375709e10a99f290c9352bc6ceb
parent128d15489f7ac05d4568115569a6a7a8bd7b8d31 (diff)
downloadgsoc2013-evolution-3eca5f6e1c8822792a37ec2142767a7ebbdd145f.tar
gsoc2013-evolution-3eca5f6e1c8822792a37ec2142767a7ebbdd145f.tar.gz
gsoc2013-evolution-3eca5f6e1c8822792a37ec2142767a7ebbdd145f.tar.bz2
gsoc2013-evolution-3eca5f6e1c8822792a37ec2142767a7ebbdd145f.tar.lz
gsoc2013-evolution-3eca5f6e1c8822792a37ec2142767a7ebbdd145f.tar.xz
gsoc2013-evolution-3eca5f6e1c8822792a37ec2142767a7ebbdd145f.tar.zst
gsoc2013-evolution-3eca5f6e1c8822792a37ec2142767a7ebbdd145f.zip
Cancel any pending queries.
2001-10-26 Jon Trowbridge <trow@ximian.com> * gui/component/e-address-popup.c (e_address_popup_destroy): Cancel any pending queries. svn path=/trunk/; revision=14194
-rw-r--r--addressbook/ChangeLog3
-rw-r--r--addressbook/gui/component/e-address-popup.c12
2 files changed, 15 insertions, 0 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 23c808a9e7..c3c55b67fd 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,5 +1,8 @@
2001-10-26 Jon Trowbridge <trow@ximian.com>
+ * gui/component/e-address-popup.c (e_address_popup_destroy):
+ Cancel any pending queries.
+
* gui/contact-editor/e-contact-editor.c (close_dialog): Don't
assert, but check if ce->app != NULL, since this function can
(apparently) get called multiple times.
diff --git a/addressbook/gui/component/e-address-popup.c b/addressbook/gui/component/e-address-popup.c
index 506b373066..698bad97aa 100644
--- a/addressbook/gui/component/e-address-popup.c
+++ b/addressbook/gui/component/e-address-popup.c
@@ -687,6 +687,12 @@ e_address_popup_destroy (GtkObject *obj)
if (pop->scheduled_refresh)
gtk_idle_remove (pop->scheduled_refresh);
+ if (pop->query_tag)
+ e_book_simple_query_cancel (pop->book, pop->query_tag);
+
+ if (pop->book)
+ gtk_object_unref (GTK_OBJECT (pop->book));
+
g_free (pop->name);
g_free (pop->email);
@@ -1095,6 +1101,12 @@ start_query (EBook *book, gpointer closure)
if (pop->query_tag)
e_book_simple_query_cancel (book, pop->query_tag);
+ if (pop->book != book) {
+ gtk_object_ref (GTK_OBJECT (book));
+ gtk_object_unref (GTK_OBJECT (pop->book));
+ pop->book = book;
+ }
+
pop->query_tag = e_book_name_and_email_query (book, pop->name, pop->email, query_cb, pop);
}