Package: libgtk-3-0, libgtk2.0-0
Version: libgtk-3-0/3.0.8-1
Version: libgtk2.0-0/2.24.4-3
Tags: patch

Hi,

There is bug in file chooser if called in "create folder" mode.

If user confirms the dialog while the filename
entry is empty, infinitive-loop is entered.

Gnome Bug: https://bugzilla.gnome.org/show_bug.cgi?id=642929
It is fixed in http://git.gnome.org/browse/gtk+/commit/?id=2ebe1ef6f27009dfb10b46796680219bca597493.

Patch backported to libgtk-3-0_3.0.8 attached; but libgtk2.0-0_2.24.4-3 seems affected too.

--
Regards,
Petr Gajdůšek

Don't infinite-loop in GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER

If the user pressed Enter to confirm the file chooser while the filename entry
was empty, then gtk_file_chooser_default_should_respond() would go back and forth
between the cases for handling the filename entry and the file list.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=642929

Patch stolen from upstream fix:
http://git.gnome.org/browse/gtk+/commit/?id=2ebe1ef6f27009dfb10b46796680219bca597493
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -8593,7 +8593,8 @@
 
       if (is_empty)
         {
-          if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE)
+          if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE
+             || impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
             return FALSE;
 
           goto file_list;

Reply via email to