aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-callbacks.c
diff options
context:
space:
mode:
authorJon Trowbridge <trow@ximian.com>2001-10-12 11:19:22 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-10-12 11:19:22 +0800
commit8afca4e07100eec5991e6b281c5293fd86a2b2c2 (patch)
treef9c0eab01a78558c34d395df500913c7bdbc72ad /mail/mail-callbacks.c
parent88e80089d15be094b0846712b798f9eeedaaa616 (diff)
downloadgsoc2013-evolution-8afca4e07100eec5991e6b281c5293fd86a2b2c2.tar.gz
gsoc2013-evolution-8afca4e07100eec5991e6b281c5293fd86a2b2c2.tar.zst
gsoc2013-evolution-8afca4e07100eec5991e6b281c5293fd86a2b2c2.zip
Listen for "destroy" events from the control, so that we don't leave stray
2001-10-11 Jon Trowbridge <trow@ximian.com> * mail-callbacks.c (addrbook_sender): Listen for "destroy" events from the control, so that we don't leave stray windows laying around. (Bug #9101) svn path=/trunk/; revision=13609
Diffstat (limited to 'mail/mail-callbacks.c')
-rw-r--r--mail/mail-callbacks.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index d4430078b9..df292f480c 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -1288,6 +1288,22 @@ find_socket (GtkContainer *container)
return NULL;
}
+static void
+popup_listener_cb (BonoboListener *listener,
+ char *event_name,
+ CORBA_any *any,
+ CORBA_Environment *ev,
+ gpointer user_data)
+{
+ char *type = bonobo_event_subtype (event_name);
+
+ if (!strcmp (type, "Destroy")) {
+ gtk_widget_destroy (GTK_WIDGET (user_data));
+ }
+
+ g_free (type);
+}
+
void
addrbook_sender (GtkWidget *widget, gpointer user_data)
{
@@ -1322,6 +1338,9 @@ addrbook_sender (GtkWidget *widget, gpointer user_data)
"email", addr_str,
NULL);
+ bonobo_event_source_client_add_listener (bonobo_widget_get_objref (BONOBO_WIDGET (control)),
+ popup_listener_cb, NULL, NULL, win);
+
socket = find_socket (GTK_CONTAINER (control));
gtk_signal_connect_object (GTK_OBJECT (socket),
"destroy",