forked from AuroraMiddleware/gtk
bgo#355851 - Hide backup files in the file chooser
Backup files are hidden along with dotfiles, just like Nautilus. Signed-off-by: Federico Mena Quintero <federico@novell.com>
This commit is contained in:
parent
de280cc5c8
commit
a27e748586
@ -1746,7 +1746,7 @@ shortcuts_insert_file (GtkFileChooserDefault *impl,
|
||||
gtk_tree_path_free (p);
|
||||
|
||||
cancellable = _gtk_file_system_get_info (request->impl->file_system, request->file,
|
||||
"standard::is-hidden,standard::display-name,standard::icon",
|
||||
"standard::is-hidden,standard::is-backup,standard::display-name,standard::icon",
|
||||
get_file_info_finished, request);
|
||||
|
||||
gtk_list_store_set (impl->shortcuts_model, &iter,
|
||||
@ -6511,7 +6511,8 @@ show_and_select_files_finished_loading (GtkFolder *folder,
|
||||
if (info)
|
||||
{
|
||||
if (!have_hidden)
|
||||
have_hidden = g_file_info_get_is_hidden (info);
|
||||
have_hidden = g_file_info_get_is_hidden (info)
|
||||
|| g_file_info_get_is_backup (info);
|
||||
|
||||
if (!have_filtered)
|
||||
have_filtered = (! _gtk_file_info_consider_as_directory (info)) &&
|
||||
@ -6614,7 +6615,7 @@ show_and_select_files (GtkFileChooserDefault *impl,
|
||||
|
||||
impl->show_and_select_files_cancellable =
|
||||
_gtk_file_system_get_folder (impl->file_system, parent_file,
|
||||
"standard::is-hidden,standard::type,standard::name,standard::content-type",
|
||||
"standard::is-hidden,standard::is-backup,standard::type,standard::name,standard::content-type",
|
||||
show_and_select_files_get_folder_cb, info);
|
||||
|
||||
profile_end ("end", NULL);
|
||||
|
@ -1336,7 +1336,8 @@ file_model_node_is_visible (GtkFileSystemModel *model,
|
||||
model->show_folders != is_folder)
|
||||
return FALSE;
|
||||
|
||||
if (!model->show_hidden && g_file_info_get_is_hidden (info))
|
||||
if (!model->show_hidden &&
|
||||
(g_file_info_get_is_hidden (info) || g_file_info_get_is_backup (info)))
|
||||
return FALSE;
|
||||
|
||||
if (model->filter_func &&
|
||||
|
@ -1661,7 +1661,7 @@ gtk_path_bar_get_info_callback (GCancellable *cancellable,
|
||||
}
|
||||
|
||||
display_name = g_file_info_get_display_name (info);
|
||||
is_hidden = g_file_info_get_is_hidden (info);
|
||||
is_hidden = g_file_info_get_is_hidden (info) || g_file_info_get_is_backup (info);
|
||||
|
||||
gtk_widget_push_composite_child ();
|
||||
button_data = make_directory_button (file_info->path_bar, display_name,
|
||||
@ -1689,7 +1689,7 @@ gtk_path_bar_get_info_callback (GCancellable *cancellable,
|
||||
file_info->path_bar->get_info_cancellable =
|
||||
_gtk_file_system_get_info (file_info->path_bar->file_system,
|
||||
file_info->file,
|
||||
"standard::display-name,standard::is-hidden",
|
||||
"standard::display-name,standard::is-hidden,standard::is-backup",
|
||||
gtk_path_bar_get_info_callback,
|
||||
file_info);
|
||||
}
|
||||
@ -1727,7 +1727,7 @@ _gtk_path_bar_set_file (GtkPathBar *path_bar,
|
||||
path_bar->get_info_cancellable =
|
||||
_gtk_file_system_get_info (path_bar->file_system,
|
||||
info->file,
|
||||
"standard::display-name,standard::is-hidden",
|
||||
"standard::display-name,standard::is-hidden,standard::is-backup",
|
||||
gtk_path_bar_get_info_callback,
|
||||
info);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user