From bffa26d995b9fc43e761a44e08c273ec30a1c605 Mon Sep 17 00:00:00 2001 From: Jacob Boerema Date: Tue, 17 Feb 2026 18:53:01 -0500 Subject: [PATCH] libgimp: fix #15877 crash in export dialog with long comment line Our export dialog resizes the width of the dialog based on the size of the longest comment line. Apparently certain programs save data that can be very long. On Windows I did not experience a crash, but the dialog is many screens wide and unusable in that state. To fix this we change the horizontal scroll policy to GTK_POLICY_EXTERNAL because GTK_POLICY_NEVER apparently stops GTK from resizing the window at a reasonable size. We also set wrap mode of the comment field to GTK_WRAP_WORD_CHAR to make sure the lines that consist of only numbers without spaces get wrapped at a reasonable length. --- libgimp/gimpexportproceduredialog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libgimp/gimpexportproceduredialog.c b/libgimp/gimpexportproceduredialog.c index 256979a294..42bd024339 100644 --- a/libgimp/gimpexportproceduredialog.c +++ b/libgimp/gimpexportproceduredialog.c @@ -285,7 +285,7 @@ gimp_export_procedure_dialog_fill_end (GimpProcedureDialog *dialog, gtk_text_view_set_bottom_margin (GTK_TEXT_VIEW (widget), 3); gtk_text_view_set_left_margin (GTK_TEXT_VIEW (widget), 3); gtk_text_view_set_right_margin (GTK_TEXT_VIEW (widget), 3); - gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (widget), GTK_WRAP_WORD); + gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (widget), GTK_WRAP_WORD_CHAR); g_object_unref (buffer); tooltip = g_param_spec_get_blurb (pspec); @@ -296,7 +296,7 @@ gimp_export_procedure_dialog_fill_end (GimpProcedureDialog *dialog, gtk_widget_set_size_request (scrolled_window, -1, 100); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window), GTK_SHADOW_OUT); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), - GTK_POLICY_NEVER, + GTK_POLICY_EXTERNAL, GTK_POLICY_AUTOMATIC); gtk_container_add (GTK_CONTAINER (frame2), scrolled_window); gtk_widget_show (scrolled_window);