GNOME Bugzilla – Bug 538784
Don't update Chooser Entry when clicking on folder in CREATE_FOLDER
Last modified: 2008-06-18 22:38:36 UTC
When using the file chooser in CREATE_FOLDER mode (to create a new folder): User wants to create folder FooBar, in the Videos subfolder of his home directory. 1. User writes FooBar in the chooser entry at the top of the window. 2. User double-clicks on subfolder Videos to go to Videos and create FooBar there instead. 3. Chooser entry is set to Videos instead. This is incorrect. It should be like in SAVE mode, not changed when double/single clicking on subfolder. 4. The chooser entry is erased. This happens in update_chooser_entry in gtkfilechooserdefault.c:6780. Patch follows in next comment, one sec...
Created attachment 112916 [details] [review] Patch to fix it Here is a patch. It's quite simple, the code explains itself. The bool change_entry is set to FALSE if we're in CREATE_FOLDER mode. The entry isn't changed. However this introduces the new problem that it's harder to name the new folder after an existing folder. I guess that's still better than what we have now. But this might need some extra input. And not just patch reviewing, but input from users on how they want the file chooser to behave.
Thanks! I've committed this to trunk and gtk-2-12. Next time, please use "diff -up" so that the diff will have function names in the hunks - makes the patch easier to read :) 2008-06-18 Olle Bergkvist <olle.bergkvist@yahoo.se> http://bugzilla.gnome.org/show_bug.cgi?id=538784 - Don't change the filename in the name entry in CREATE_FOLDER mode when changing folders, so that you can enter a new subfolder name, double-click on a folder to change to it, and close the dialog. * gtk/gtkfilechooserdefault.c (update_chooser_entry): Don't change the filename in the entry in CREATE_FOLDER mode, either.