Mercurial > geeqie
annotate src/filelist.h @ 145:8be2cc687304
fixed grouping sidecar files and made it configurable via config file
(no gui yet)
author | nadvornik |
---|---|
date | Tue, 20 Nov 2007 22:28:40 +0000 |
parents | 0d1bf3ac6cd8 |
children | b2266996fa83 |
rev | line source |
---|---|
9 | 1 /* |
2 * GQview | |
3 * (C) 2004 John Ellis | |
4 * | |
5 * Author: John Ellis | |
6 * | |
7 * This software is released under the GNU General Public License (GNU GPL). | |
8 * Please read the included file COPYING for more information. | |
9 * This software comes with no warranty of any kind, use at your own risk! | |
10 */ | |
11 | |
12 | |
13 #ifndef FILELIST_H | |
14 #define FILELIST_H | |
15 | |
16 | |
17 typedef struct _FilterEntry FilterEntry; | |
18 struct _FilterEntry { | |
19 gchar *key; | |
20 gchar *description; | |
21 gchar *extensions; | |
22 gint enabled; | |
23 }; | |
24 | |
25 /* you can change, but not add or remove entries from the returned list */ | |
26 GList *filter_get_list(void); | |
27 void filter_remove_entry(FilterEntry *fe); | |
28 | |
29 void filter_add(const gchar *key, const gchar *description, const gchar *extensions, gint enabled); | |
30 void filter_add_unique(const gchar *description, const gchar *extensions, gint enabled); | |
31 void filter_add_defaults(void); | |
32 void filter_reset(void); | |
33 void filter_rebuild(void); | |
34 | |
35 gint filter_name_exists(const gchar *name); | |
36 | |
37 void filter_write_list(FILE *f); | |
38 void filter_parse(const gchar *text); | |
39 | |
145
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
40 void sidecar_ext_parse(const gchar *text); |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
41 void sidecar_ext_write(FILE *f); |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
42 void sidecar_ext_add_defaults(); |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
43 |
9 | 44 gint ishidden(const gchar *name); |
45 | |
46 | |
47 GList *path_list_filter(GList *list, gint is_dir_list); | |
48 | |
49 GList *path_list_sort(GList *list); | |
50 GList *path_list_recursive(const gchar *path); | |
51 | |
52 gchar *text_from_size(gint64 size); | |
53 gchar *text_from_size_abrev(gint64 size); | |
54 const gchar *text_from_time(time_t t); | |
55 | |
56 /* this expects a utf-8 path */ | |
138 | 57 FileData *file_data_new_simple(const gchar *path_utf8); |
145
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
58 |
138 | 59 FileData *file_data_ref(FileData *fd); |
60 void file_data_unref(FileData *fd); | |
9 | 61 |
138 | 62 FileData *file_data_do_change(FileData *fd); |
143
0d1bf3ac6cd8
improved FileDataChangeInfo structure, check for another file operation in progress
nadvornik
parents:
139
diff
changeset
|
63 gboolean file_data_add_change_info(FileData *fd, FileDataChangeType type, const gchar *src, const gchar *dest); |
138 | 64 void file_data_change_info_free(FileDataChangeInfo *fdci, FileData *fd); |
65 | |
139 | 66 gchar *sidecar_file_data_list_to_string(FileData *fd); |
67 | |
138 | 68 gint filelist_sort_compare_filedata(FileData *fa, FileData *fb); |
9 | 69 GList *filelist_sort(GList *list, SortType method, gint ascend); |
70 GList *filelist_insert_sort(GList *list, FileData *fd, SortType method, gint ascend); | |
138 | 71 GList *filelist_sort_full(GList *list, SortType method, gint ascend, GCompareFunc cb); |
72 GList *filelist_insert_sort_full(GList *list, void *data, SortType method, gint ascend, GCompareFunc cb); | |
9 | 73 |
74 gint filelist_read(const gchar *path, GList **files, GList **dirs); | |
138 | 75 gint filelist_read_lstat(const gchar *path, GList **files, GList **dirs); |
9 | 76 void filelist_free(GList *list); |
138 | 77 GList *filelist_copy(GList *list); |
78 GList *filelist_from_path_list(GList *list); | |
79 GList *filelist_to_path_list(GList *list); | |
80 | |
81 GList *filelist_filter(GList *list, gint is_dir_list); | |
82 | |
83 GList *filelist_sort_path(GList *list); | |
84 GList *filelist_recursive(const gchar *path); | |
9 | 85 |
86 #endif | |
87 | |
88 |