[empathy/gnome-2-34: 7/10] Only destroy block confirmation dialogs after we've read out the abusive state



commit a848bc5256e4c80371a11f5eae20679df11d0fc1
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 b9bf7e0..2f23a91 100644
--- a/libempathy-gtk/empathy-contact-dialogs.c
+++ b/libempathy-gtk/empathy-contact-dialogs.c
@@ -532,8 +532,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 (
@@ -543,6 +541,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 e32ff05..22af8d5 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]