[gthumb/ext] [gth_file_source_catalogs] ignore hidden files
- From: Paolo Bacchilega <paobac src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gthumb/ext] [gth_file_source_catalogs] ignore hidden files
- Date: Fri, 18 Dec 2009 20:38:26 +0000 (UTC)
commit da5248cb288193227fe787b4ebe07401fd5c0d01
Author: Paolo Bacchilega <paobac src gnome org>
Date: Thu Dec 17 22:26:53 2009 +0100
[gth_file_source_catalogs] ignore hidden files
extensions/catalogs/gth-file-source-catalogs.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/extensions/catalogs/gth-file-source-catalogs.c b/extensions/catalogs/gth-file-source-catalogs.c
index 92dc323..d833262 100644
--- a/extensions/catalogs/gth-file-source-catalogs.c
+++ b/extensions/catalogs/gth-file-source-catalogs.c
@@ -514,7 +514,10 @@ for_each_child__start_dir_func (GFile *directory,
GError **error,
gpointer user_data)
{
- return DIR_OP_CONTINUE;
+ if (g_file_info_get_is_hidden (info))
+ return DIR_OP_SKIP;
+ else
+ return DIR_OP_CONTINUE;
}
@@ -530,6 +533,9 @@ for_each_child__catalog_list_ready_cb (GthCatalog *catalog,
for (scan = files; scan; scan = scan->next) {
GthFileData *file_data = scan->data;
+ if (g_file_info_get_is_hidden (file_data->info))
+ continue;
+
data->for_each_file_func (file_data->file,
file_data->info,
data->user_data);
@@ -578,7 +584,7 @@ for_each_child__visit_file (ForEachChildData *data,
g_directory_foreach_child (gio_file,
FALSE,
TRUE,
- "standard::name,standard::type",
+ GFILE_STANDARD_ATTRIBUTES_WITH_FAST_CONTENT_TYPE,
gth_file_source_get_cancellable (data->file_source),
for_each_child__start_dir_func,
for_each_child__for_each_file_func,
@@ -640,7 +646,7 @@ gth_file_source_catalogs_for_each_child (GthFileSource *file_source,
gio_parent = gth_file_source_to_gio_file (file_source, parent);
g_file_query_info_async (gio_parent,
- "standard::name,standard::type",
+ GFILE_STANDARD_ATTRIBUTES_WITH_FAST_CONTENT_TYPE,
G_FILE_QUERY_INFO_NONE,
G_PRIORITY_DEFAULT,
gth_file_source_get_cancellable (data->file_source),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]