aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/mail-display.c11
2 files changed, 14 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 479d5c2580..1ec238c8b3 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,9 @@
+2001-10-12 Jon Trowbridge <trow@ximian.com>
+
+ * mail-display.c (html_button_press_event): Store our listener id.
+ (popup_info_free): Disconnect our listener when we free the popup.
+ (Bug #11040)
+
2001-10-11 Jon Trowbridge <trow@ximian.com>
* mail-callbacks.c (addrbook_sender): Listen for "destroy" events
diff --git a/mail/mail-display.c b/mail/mail-display.c
index 20587f49fe..1187c2237d 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -1610,6 +1610,7 @@ struct _PopupInfo {
GtkWidget *win;
guint destroy_timeout;
guint widget_destroy_handle;
+ Bonobo_EventSource_ListenerId listener_id;
gboolean hidden;
};
@@ -1623,6 +1624,10 @@ popup_info_free (PopupInfo *pop)
if (pop->destroy_timeout)
gtk_timeout_remove (pop->destroy_timeout);
+ bonobo_event_source_client_remove_listener (bonobo_widget_get_objref (BONOBO_WIDGET (pop->w)),
+ pop->listener_id,
+ NULL);
+
g_free (pop);
}
}
@@ -1819,9 +1824,9 @@ html_button_press_event (GtkWidget *widget, GdkEventButton *event, MailDisplay *
pop = make_popup_window (popup_thing);
- bonobo_event_source_client_add_listener (
- bonobo_widget_get_objref (BONOBO_WIDGET (popup_thing)),
- listener_cb, NULL, NULL, pop);
+ pop->listener_id =
+ bonobo_event_source_client_add_listener (bonobo_widget_get_objref (BONOBO_WIDGET (popup_thing)),
+ listener_cb, NULL, NULL, pop);
} else if (url || src) {
gint hide_mask = 0;