[empathy: 29/35] Only destroy block confirmation dialogs after we've read out the abusive state



commit 4b7d2787c3d4487647628109e14a6618e3db8da8
Author: Danielle Madeley <danielle madeley collabora co uk>
Date:   Mon Feb 14 12:36:22 2011 +1100

    Only destroy block confirmation dialogs after we've read out the abusive state

 libempathy-gtk/empathy-contact-dialogs.c    |    3 +--
 libempathy-gtk/empathy-individual-dialogs.c |    3 ++-
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libempathy-gtk/empathy-contact-dialogs.c b/libempathy-gtk/empathy-contact-dialogs.c
index 737a449..06481cf 100644
--- a/libempathy-gtk/empathy-contact-dialogs.c
+++ b/libempathy-gtk/empathy-contact-dialogs.c
@@ -556,8 +556,6 @@ empathy_block_contact_dialog_show (GtkWindow      *parent,
 	}
 
 	res = gtk_dialog_run (GTK_DIALOG (dialog));
-	gtk_widget_destroy (dialog);
-
 	if (abusive != NULL) {
 		if (abusive_check != NULL) {
 			*abusive = gtk_toggle_button_get_active (
@@ -567,6 +565,7 @@ empathy_block_contact_dialog_show (GtkWindow      *parent,
 		}
 	}
 
+	gtk_widget_destroy (dialog);
 	g_object_unref (manager);
 
 	return res == GTK_RESPONSE_REJECT;
diff --git a/libempathy-gtk/empathy-individual-dialogs.c b/libempathy-gtk/empathy-individual-dialogs.c
index 1d3fcb8..e141182 100644
--- a/libempathy-gtk/empathy-individual-dialogs.c
+++ b/libempathy-gtk/empathy-individual-dialogs.c
@@ -240,7 +240,6 @@ empathy_block_individual_dialog_show (GtkWindow *parent,
   g_string_free (str, TRUE);
 
   res = gtk_dialog_run (GTK_DIALOG (dialog));
-  gtk_widget_destroy (dialog);
 
   if (abusive != NULL)
     {
@@ -251,5 +250,7 @@ empathy_block_individual_dialog_show (GtkWindow *parent,
         *abusive = FALSE;
     }
 
+  gtk_widget_destroy (dialog);
+
   return res == GTK_RESPONSE_REJECT;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]