annotate src/filelist.h @ 190:c2923efebfdc

whitelist of files that can have an xmp sidecar, sample external command for creating sidecar
author nadvornik
date Sun, 16 Mar 2008 14:11:22 +0000
parents 9a56e3d13e67
children f6e307c7bad6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
1 /*
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
2 * GQview
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
3 * (C) 2004 John Ellis
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
4 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
5 * Author: John Ellis
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
6 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
7 * This software is released under the GNU General Public License (GNU GPL).
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
8 * Please read the included file COPYING for more information.
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
9 * This software comes with no warranty of any kind, use at your own risk!
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
10 */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
11
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
12
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
13 #ifndef FILELIST_H
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
14 #define FILELIST_H
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
15
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
16
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
17 typedef struct _FilterEntry FilterEntry;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
18 struct _FilterEntry {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
19 gchar *key;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
20 gchar *description;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
21 gchar *extensions;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
22 gint enabled;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
23 };
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
24
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
25 /* you can change, but not add or remove entries from the returned list */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
26 GList *filter_get_list(void);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
27 void filter_remove_entry(FilterEntry *fe);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
28
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
29 void filter_add(const gchar *key, const gchar *description, const gchar *extensions, gint enabled);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
30 void filter_add_unique(const gchar *description, const gchar *extensions, gint enabled);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
31 void filter_add_defaults(void);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
32 void filter_reset(void);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
33 void filter_rebuild(void);
147
b2266996fa83 added possibility to specify prefered file type for external commands
nadvornik
parents: 145
diff changeset
34 GList *filter_to_list(const gchar *extensions);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
35
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
36 gint filter_name_exists(const gchar *name);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
37
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
38 void filter_write_list(FILE *f);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
39 void filter_parse(const gchar *text);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
40
170
9a56e3d13e67 basic sidecar files configuration via preferences dialog
nadvornik
parents: 167
diff changeset
41 void sidecar_ext_parse(const gchar *text, gint quoted);
145
8be2cc687304 fixed grouping sidecar files and made it configurable via config file
nadvornik
parents: 143
diff changeset
42 void sidecar_ext_write(FILE *f);
170
9a56e3d13e67 basic sidecar files configuration via preferences dialog
nadvornik
parents: 167
diff changeset
43 char *sidecar_ext_to_string();
145
8be2cc687304 fixed grouping sidecar files and made it configurable via config file
nadvornik
parents: 143
diff changeset
44 void sidecar_ext_add_defaults();
8be2cc687304 fixed grouping sidecar files and made it configurable via config file
nadvornik
parents: 143
diff changeset
45
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
46 gint ishidden(const gchar *name);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
47
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
48
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
49 GList *path_list_filter(GList *list, gint is_dir_list);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
50
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
51 GList *path_list_sort(GList *list);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
52 GList *path_list_recursive(const gchar *path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
53
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
54 gchar *text_from_size(gint64 size);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
55 gchar *text_from_size_abrev(gint64 size);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
56 const gchar *text_from_time(time_t t);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
57
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
58 /* this expects a utf-8 path */
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
59 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
60
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
61 FileData *file_data_ref(FileData *fd);
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
62 void file_data_unref(FileData *fd);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
63
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
64 FileData *file_data_do_change(FileData *fd);
143
0d1bf3ac6cd8 improved FileDataChangeInfo structure, check for another file operation in progress
nadvornik
parents: 139
diff changeset
65 gboolean file_data_add_change_info(FileData *fd, FileDataChangeType type, const gchar *src, const gchar *dest);
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
66 void file_data_change_info_free(FileDataChangeInfo *fdci, FileData *fd);
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
67
139
754c1e4349b6 display sidecar extensions in filelist
nadvornik
parents: 138
diff changeset
68 gchar *sidecar_file_data_list_to_string(FileData *fd);
754c1e4349b6 display sidecar extensions in filelist
nadvornik
parents: 138
diff changeset
69
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
70 gint filelist_sort_compare_filedata(FileData *fa, FileData *fb);
167
05bf5d364dba fixed filelist refresh
nadvornik
parents: 147
diff changeset
71 gint filelist_sort_compare_filedata_full(FileData *fa, FileData *fb, SortType method, gint ascend);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
72 GList *filelist_sort(GList *list, SortType method, gint ascend);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
73 GList *filelist_insert_sort(GList *list, FileData *fd, SortType method, gint ascend);
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
74 GList *filelist_sort_full(GList *list, SortType method, gint ascend, GCompareFunc cb);
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
75 GList *filelist_insert_sort_full(GList *list, void *data, SortType method, gint ascend, GCompareFunc cb);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
76
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
77 gint filelist_read(const gchar *path, GList **files, GList **dirs);
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
78 gint filelist_read_lstat(const gchar *path, GList **files, GList **dirs);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
79 void filelist_free(GList *list);
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
80 GList *filelist_copy(GList *list);
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
81 GList *filelist_from_path_list(GList *list);
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
82 GList *filelist_to_path_list(GList *list);
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
83
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
84 GList *filelist_filter(GList *list, gint is_dir_list);
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
85
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
86 GList *filelist_sort_path(GList *list);
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
87 GList *filelist_recursive(const gchar *path);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
88
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
89 #endif
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
90
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
91