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.
This commit is contained in:
Matthias Clasen 2004-09-22 20:17:53 +00:00 committed by Matthias Clasen
parent a642c62c57
commit 8a3d75dbc1
5 changed files with 20 additions and 6 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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