Commit 8a3d75db authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Don't use bitops on booleans. (gtk_file_chooser_default_should_respond):

2004-09-22  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.
parent a642c62c
......@@ -2,6 +2,8 @@
* 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>
......
......@@ -2,6 +2,8 @@
* 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>
......
......@@ -2,6 +2,8 @@
* 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>
......
......@@ -2,6 +2,8 @@
* 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>
......
......@@ -4932,9 +4932,7 @@ gtk_file_chooser_default_should_respond (GtkFileChooserEmbed *chooser_embed)
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;
......@@ -4943,9 +4941,17 @@ gtk_file_chooser_default_should_respond (GtkFileChooserEmbed *chooser_embed)
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment