Mercurial > geeqie
diff src/filelist.c @ 318:b16b9b8979e5
Add a new struct ConfOptions to handle options.
Changes were made among the code to use only one global var
named "options" of type ConfOptions *.
Initialization takes place in new init_options().
author | zas_ |
---|---|
date | Fri, 11 Apr 2008 22:14:36 +0000 |
parents | 667e49f52168 |
children | 3c4bad726e98 |
line wrap: on
line diff
--- a/src/filelist.c Fri Apr 11 20:35:37 2008 +0000 +++ b/src/filelist.c Fri Apr 11 22:14:36 2008 +0000 @@ -318,7 +318,7 @@ GList *work; gint ln; - if (!extension_list || file_filter_disable) return TRUE; + if (!extension_list || options->file_filter_disable) return TRUE; ln = strlen(name); work = extension_list; @@ -423,7 +423,7 @@ { GList *work; - if (!is_dir_list && file_filter_disable && show_dot_files) return list; + if (!is_dir_list && options->file_filter_disable && options->show_dot_files) return list; work = list; while (work) @@ -433,7 +433,7 @@ base = filename_from_path(name); - if ((!show_dot_files && ishidden(base)) || + if ((!options->show_dot_files && ishidden(base)) || (!is_dir_list && !filter_name_exists(base)) || (is_dir_list && base[0] == '.' && (strcmp(base, GQ_CACHE_LOCAL_THUMB) == 0 || strcmp(base, GQ_CACHE_LOCAL_METADATA) == 0)) ) @@ -1220,7 +1220,7 @@ while ((dir = readdir(dp)) != NULL) { gchar *name = dir->d_name; - if (show_dot_files || !ishidden(name)) + if (options->show_dot_files || !ishidden(name)) { gchar *filepath = g_strconcat(pathl, "/", name, NULL); if ((follow_symlinks ? @@ -1349,7 +1349,7 @@ { GList *work; - if (!is_dir_list && file_filter_disable && show_dot_files) return list; + if (!is_dir_list && options->file_filter_disable && options->show_dot_files) return list; work = list; while (work) @@ -1357,7 +1357,7 @@ FileData *fd = (FileData *)(work->data); const gchar *name = fd->name; - if ((!show_dot_files && ishidden(name)) || + if ((!options->show_dot_files && ishidden(name)) || (!is_dir_list && !filter_name_exists(name)) || (is_dir_list && name[0] == '.' && (strcmp(name, GQ_CACHE_LOCAL_THUMB) == 0 || strcmp(name, GQ_CACHE_LOCAL_METADATA) == 0)) )