From b8863f14395f0e9e3201dd8bd2ffee938e7a50c9 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 19 Jul 2012 10:41:23 +0200 Subject: roster-window: unprepare the individual manager before destroying the roster https://bugzilla.gnome.org/show_bug.cgi?id=660128 --- src/empathy-roster-window.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/empathy-roster-window.c b/src/empathy-roster-window.c index 0ec35e14a..c6a04fa89 100644 --- a/src/empathy-roster-window.c +++ b/src/empathy-roster-window.c @@ -943,6 +943,16 @@ roster_window_key_press_event_cb (GtkWidget *window, return FALSE; } +static void +unprepare_cb (GObject *source, + GAsyncResult *result, + gpointer user_data) +{ + GtkWidget *self = user_data; + + gtk_widget_destroy (self); +} + static void roster_window_chat_quit_cb (GSimpleAction *action, GVariant *parameter, @@ -950,7 +960,14 @@ roster_window_chat_quit_cb (GSimpleAction *action, { EmpathyRosterWindow *self = user_data; - gtk_widget_destroy (GTK_WIDGET (self)); + /* Destroying the window will make us leave the main loop and so exit the + * process. Before doing so we want to unprepare the individual manager. + * Just hide the window now and actually destroy it once Folks is done. + */ + gtk_widget_hide (GTK_WIDGET (self)); + + empathy_individual_manager_unprepare_async (self->priv->individual_manager, + unprepare_cb, self); } static void -- cgit v1.2.3