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:
parent
a642c62c57
commit
8a3d75dbc1
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
* gtk/gtkfilechooserdefault.c (selection_check_foreach_cb): Don't use
|
* gtk/gtkfilechooserdefault.c (selection_check_foreach_cb): Don't use
|
||||||
bitops on booleans.
|
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>
|
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
|
* gtk/gtkfilechooserdefault.c (selection_check_foreach_cb): Don't use
|
||||||
bitops on booleans.
|
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>
|
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
|
* gtk/gtkfilechooserdefault.c (selection_check_foreach_cb): Don't use
|
||||||
bitops on booleans.
|
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>
|
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
|
* gtk/gtkfilechooserdefault.c (selection_check_foreach_cb): Don't use
|
||||||
bitops on booleans.
|
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>
|
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));
|
current_focus = gtk_window_get_focus (GTK_WINDOW (toplevel));
|
||||||
|
|
||||||
if (current_focus == NULL)
|
if (current_focus == impl->browse_files_tree_view)
|
||||||
return FALSE;
|
|
||||||
else if (current_focus == impl->browse_files_tree_view)
|
|
||||||
{
|
{
|
||||||
int num_selected;
|
int num_selected;
|
||||||
gboolean all_files, all_folders;
|
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);
|
selection_check (impl, &num_selected, &all_files, &all_folders);
|
||||||
|
|
||||||
if (impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER && num_selected != 1)
|
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 */
|
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 (num_selected == 0)
|
||||||
{
|
{
|
||||||
if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE
|
if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE
|
||||||
|
Loading…
Reference in New Issue
Block a user