[gnome-disk-utility/kailueke/fix-erasetype-retrieval] Restore old window destruction to fix data retrieval




commit 9fea5442ee87d584fcc7ae49d2972f954bb46a5e
Author: Kai Lüke <kailueke riseup net>
Date:   Sat Jan 22 21:21:01 2022 +0100

    Restore old window destruction to fix data retrieval
    
    The refactor in ff4c7021d3b1dd053fd9f602f7b494e7fd3a218b
    used an early destruction of the dialog window which caused the
    retrieval of the combo box value to fail.
    
    Restore the old flow of hiding the window only and let the
    destruction be done by the format_disk_data_free call.
    
    Fixes https://gitlab.gnome.org/GNOME/gnome-disk-utility/-/issues/238

 src/disks/gduformatdiskdialog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/disks/gduformatdiskdialog.c b/src/disks/gduformatdiskdialog.c
index a752cf19..44a0280a 100644
--- a/src/disks/gduformatdiskdialog.c
+++ b/src/disks/gduformatdiskdialog.c
@@ -372,7 +372,6 @@ dialog_response_cb (GtkDialog *dialog,
 {
     FormatDiskData *data = user_data;
 
-    gtk_widget_destroy (data->dialog);
     if (response == GTK_RESPONSE_OK) {
       const gchar *erase_type;
       const gchar *primary_message;
@@ -404,6 +403,7 @@ dialog_response_cb (GtkDialog *dialog,
         }
 
       objects = g_list_append (NULL, data->object);
+      gtk_widget_hide (data->dialog);
       if (!gdu_utils_show_confirmation (GTK_WINDOW (data->window),
                                         primary_message,
                                         str->str,


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