* gtk/gtkfilechooserdefault.c (selection_check_foreach_cb): Don't use
bitops on booleans.
+ (gtk_file_chooser_default_should_respond): Make it easier to
+ select folders in SELECT_FOLDER mode.
Wed Sep 22 00:54:34 2004 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserdefault.c (selection_check_foreach_cb): Don't use
bitops on booleans.
+ (gtk_file_chooser_default_should_respond): Make it easier to
+ select folders in SELECT_FOLDER mode.
Wed Sep 22 00:54:34 2004 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserdefault.c (selection_check_foreach_cb): Don't use
bitops on booleans.
+ (gtk_file_chooser_default_should_respond): Make it easier to
+ select folders in SELECT_FOLDER mode.
Wed Sep 22 00:54:34 2004 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserdefault.c (selection_check_foreach_cb): Don't use
bitops on booleans.
+ (gtk_file_chooser_default_should_respond): Make it easier to
+ select folders in SELECT_FOLDER mode.
Wed Sep 22 00:54:34 2004 Matthias Clasen <mclasen@redhat.com>
current_focus = gtk_window_get_focus (GTK_WINDOW (toplevel));
- if (current_focus == NULL)
- return FALSE;
- else if (current_focus == impl->browse_files_tree_view)
+ if (current_focus == impl->browse_files_tree_view)
{
int num_selected;
gboolean all_files, all_folders;
selection_check (impl, &num_selected, &all_files, &all_folders);
- if (impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER && num_selected != 1)
- return TRUE; /* zero means current folder; more than one means use the whole selection */
-
+ if (impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
+ {
+ if (num_selected != 1)
+ return TRUE; /* zero means current folder; more than one means use the whole selection */
+ else if (current_focus != impl->browse_files_tree_view)
+ {
+ /* a single folder is selected and a button was clicked */
+ switch_to_selected_folder (impl);
+ return TRUE;
+ }
+ }
if (num_selected == 0)
{
if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE