This is an automated email from the git hooks/post-receive script.

alex pushed a 
commit to branch 
xfce-4.14
in repository xfce/thunar.

commit b0dac2a485fe1a5356560725b1dcea5004da7012
Author: Theo Linkspfeifer <lastonestand...@tutanota.com>
Date:   Sat Feb 15 17:34:46 2020 +0100

    Prevent crash when renaming file (Bug #10805)
---
 thunar/thunar-dialogs.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/thunar/thunar-dialogs.c b/thunar/thunar-dialogs.c
index c6ac70a..94eb281 100644
--- a/thunar/thunar-dialogs.c
+++ b/thunar/thunar-dialogs.c
@@ -173,6 +173,10 @@ thunar_dialogs_show_rename_file (gpointer    parent,
   /* resize the dialog to make long names fit as much as possible */
   gtk_window_set_default_size (GTK_WINDOW (dialog), CLAMP (layout_width, 300, 
parent_width), -1);
 
+  /* automatically close the dialog when the file is destroyed */
+  g_signal_connect_swapped (G_OBJECT (file), "destroy",
+                            G_CALLBACK (gtk_widget_destroy), dialog);
+
   /* run the dialog */
   response = gtk_dialog_run (GTK_DIALOG (dialog));
   if (G_LIKELY (response == GTK_RESPONSE_OK))
@@ -192,7 +196,8 @@ thunar_dialogs_show_rename_file (gpointer    parent,
     }
 
   /* cleanup */
-  gtk_widget_destroy (dialog);
+  if (G_LIKELY (response != GTK_RESPONSE_NONE))
+    gtk_widget_destroy (dialog);
 
   return job;
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to