Mercurial > geeqie.yaz
annotate src/filefilter.c @ 1246:854435704554
enable threads by default
author | nadvornik |
---|---|
date | Wed, 21 Jan 2009 18:30:54 +0000 |
parents | 254b09942e68 |
children | 8b89e3ff286b |
rev | line source |
---|---|
1 | 1 /* |
196 | 2 * Geeqie |
79
528e3432e0c0
Thu Oct 19 07:23:37 2006 John Ellis <johne@verizon.net>
gqview
parents:
53
diff
changeset
|
3 * (C) 2006 John Ellis |
475 | 4 * Copyright (C) 2008 The Geeqie Team |
1 | 5 * |
6 * Author: John Ellis | |
7 * | |
9 | 8 * This software is released under the GNU General Public License (GNU GPL). |
9 * Please read the included file COPYING for more information. | |
10 * This software comes with no warranty of any kind, use at your own risk! | |
1 | 11 */ |
12 | |
13 | |
281 | 14 #include "main.h" |
586 | 15 #include "filefilter.h" |
1 | 16 |
9 | 17 #include "cache.h" |
1023
650c02c0c8ff
Move quoted_value() and escquote_value() to misc.[ch].
zas_
parents:
781
diff
changeset
|
18 #include "misc.h" |
307
667e49f52168
Move secure save code to its own files: secure_save.{c,h}.
zas_
parents:
283
diff
changeset
|
19 #include "secure_save.h" |
79
528e3432e0c0
Thu Oct 19 07:23:37 2006 John Ellis <johne@verizon.net>
gqview
parents:
53
diff
changeset
|
20 #include "thumb_standard.h" |
9 | 21 #include "ui_fileops.h" |
1 | 22 |
23 /* | |
24 *----------------------------------------------------------------------------- | |
25 * file filtering | |
26 *----------------------------------------------------------------------------- | |
27 */ | |
28 | |
9 | 29 static GList *filter_list = NULL; |
30 static GList *extension_list = NULL; | |
145
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
31 static GList *sidecar_ext_list = NULL; |
9 | 32 |
212
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
33 static GList *file_class_extension_list[FILE_FORMAT_CLASSES]; |
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
34 |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
35 static GList *file_writable_list = NULL; /* writable files */ |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
36 static GList *file_sidecar_list = NULL; /* files with allowed sidecar */ |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
37 |
212
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
38 |
9 | 39 gint ishidden(const gchar *name) |
1 | 40 { |
41 if (name[0] != '.') return FALSE; | |
42 if (name[1] == '\0' || (name[1] == '.' && name[2] == '\0')) return FALSE; | |
43 return TRUE; | |
44 } | |
45 | |
9 | 46 static FilterEntry *filter_entry_new(const gchar *key, const gchar *description, |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
47 const gchar *extensions, FileFormatClass file_class, |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
48 gboolean writable, gboolean allow_sidecar, gboolean enabled) |
9 | 49 { |
50 FilterEntry *fe; | |
51 | |
52 fe = g_new0(FilterEntry, 1); | |
53 fe->key = g_strdup(key); | |
54 fe->description = g_strdup(description); | |
55 fe->extensions = g_strdup(extensions); | |
56 fe->enabled = enabled; | |
212
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
57 fe->file_class = file_class; |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
58 fe->writable = writable; |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
59 fe->allow_sidecar = allow_sidecar; |
442 | 60 |
9 | 61 return fe; |
62 } | |
63 | |
64 static void filter_entry_free(FilterEntry *fe) | |
65 { | |
66 if (!fe) return; | |
67 | |
68 g_free(fe->key); | |
69 g_free(fe->description); | |
70 g_free(fe->extensions); | |
71 g_free(fe); | |
72 } | |
73 | |
74 GList *filter_get_list(void) | |
75 { | |
76 return filter_list; | |
77 } | |
78 | |
79 void filter_remove_entry(FilterEntry *fe) | |
80 { | |
81 if (!g_list_find(filter_list, fe)) return; | |
82 | |
83 filter_list = g_list_remove(filter_list, fe); | |
84 filter_entry_free(fe); | |
85 } | |
86 | |
743
77ff94c0490a
Try to load a system-wide rc file if any, before per-user rc file.
zas_
parents:
736
diff
changeset
|
87 static FilterEntry *filter_get_by_key(const gchar *key) |
9 | 88 { |
89 GList *work; | |
90 | |
743
77ff94c0490a
Try to load a system-wide rc file if any, before per-user rc file.
zas_
parents:
736
diff
changeset
|
91 if (!key) return NULL; |
9 | 92 |
93 work = filter_list; | |
94 while (work) | |
95 { | |
96 FilterEntry *fe = work->data; | |
97 work = work->next; | |
98 | |
743
77ff94c0490a
Try to load a system-wide rc file if any, before per-user rc file.
zas_
parents:
736
diff
changeset
|
99 if (strcmp(fe->key, key) == 0) return fe; |
9 | 100 } |
101 | |
743
77ff94c0490a
Try to load a system-wide rc file if any, before per-user rc file.
zas_
parents:
736
diff
changeset
|
102 return NULL; |
77ff94c0490a
Try to load a system-wide rc file if any, before per-user rc file.
zas_
parents:
736
diff
changeset
|
103 } |
77ff94c0490a
Try to load a system-wide rc file if any, before per-user rc file.
zas_
parents:
736
diff
changeset
|
104 |
77ff94c0490a
Try to load a system-wide rc file if any, before per-user rc file.
zas_
parents:
736
diff
changeset
|
105 static gint filter_key_exists(const gchar *key) |
77ff94c0490a
Try to load a system-wide rc file if any, before per-user rc file.
zas_
parents:
736
diff
changeset
|
106 { |
77ff94c0490a
Try to load a system-wide rc file if any, before per-user rc file.
zas_
parents:
736
diff
changeset
|
107 return (filter_get_by_key(key) == NULL ? FALSE : TRUE); |
9 | 108 } |
109 | |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
110 void filter_add(const gchar *key, const gchar *description, const gchar *extensions, FileFormatClass file_class, gboolean writable, gboolean allow_sidecar, gint enabled) |
9 | 111 { |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
112 filter_list = g_list_append(filter_list, filter_entry_new(key, description, extensions, file_class, writable, allow_sidecar, enabled)); |
9 | 113 } |
114 | |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
115 void filter_add_unique(const gchar *description, const gchar *extensions, FileFormatClass file_class, gboolean writable, gboolean allow_sidecar, gint enabled) |
9 | 116 { |
117 gchar *key; | |
736 | 118 guint n; |
9 | 119 |
120 key = g_strdup("user0"); | |
121 n = 1; | |
122 while (filter_key_exists(key)) | |
123 { | |
124 g_free(key); | |
125 if (n > 999) return; | |
126 key = g_strdup_printf("user%d", n); | |
127 n++; | |
128 } | |
129 | |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
130 filter_add(key, description, extensions, file_class, writable, allow_sidecar, enabled); |
9 | 131 g_free(key); |
132 } | |
133 | |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
134 static void filter_add_if_missing(const gchar *key, const gchar *description, const gchar *extensions, FileFormatClass file_class, gboolean writable, gboolean allow_sidecar, gint enabled) |
9 | 135 { |
136 GList *work; | |
137 | |
138 if (!key) return; | |
139 | |
140 work = filter_list; | |
141 while (work) | |
142 { | |
143 FilterEntry *fe = work->data; | |
144 work = work->next; | |
212
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
145 if (fe->key && strcmp(fe->key, key) == 0) |
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
146 { |
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
147 if (fe->file_class == FORMAT_CLASS_UNKNOWN) |
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
148 fe->file_class = file_class; /* for compatibility */ |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
149 |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
150 if (fe->writable && fe->allow_sidecar) |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
151 { |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
152 fe->writable = writable; |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
153 fe->allow_sidecar = allow_sidecar; |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
154 } |
212
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
155 return; |
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
156 } |
9 | 157 } |
158 | |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
159 filter_add(key, description, extensions, file_class, writable, allow_sidecar, enabled); |
9 | 160 } |
161 | |
162 void filter_reset(void) | |
1 | 163 { |
164 GList *work; | |
9 | 165 |
166 work = filter_list; | |
167 while (work) | |
168 { | |
169 FilterEntry *fe = work->data; | |
170 work = work->next; | |
171 filter_entry_free(fe); | |
172 } | |
173 | |
174 g_list_free(filter_list); | |
175 filter_list = NULL; | |
176 } | |
177 | |
178 void filter_add_defaults(void) | |
179 { | |
180 GSList *list, *work; | |
181 | |
182 list = gdk_pixbuf_get_formats(); | |
183 work = list; | |
184 while (work) | |
185 { | |
186 GdkPixbufFormat *format; | |
187 gchar *name; | |
188 gchar *desc; | |
189 gchar **extensions; | |
190 GString *filter = NULL; | |
736 | 191 guint i; |
442 | 192 |
9 | 193 format = work->data; |
194 work = work->next; | |
195 | |
196 name = gdk_pixbuf_format_get_name(format); | |
197 desc = gdk_pixbuf_format_get_description(format); | |
198 extensions = gdk_pixbuf_format_get_extensions(format); | |
199 | |
200 i = 0; | |
201 while (extensions[i]) | |
202 { | |
203 if (!filter) | |
204 { | |
205 filter = g_string_new("."); | |
206 filter = g_string_append(filter, extensions[i]); | |
207 } | |
208 else | |
209 { | |
210 filter = g_string_append(filter, ";."); | |
211 filter = g_string_append(filter, extensions[i]); | |
212 } | |
213 i++; | |
214 } | |
215 | |
506
fc9c8a3e1a8b
Handle the newline in DEBUG_N() macro instead of adding one
zas_
parents:
495
diff
changeset
|
216 DEBUG_1("loader reported [%s] [%s] [%s]", name, desc, filter->str); |
9 | 217 |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
218 filter_add_if_missing(name, desc, filter->str, FORMAT_CLASS_IMAGE, TRUE, FALSE, TRUE); |
9 | 219 |
220 g_free(name); | |
221 g_free(desc); | |
222 g_strfreev(extensions); | |
223 g_string_free(filter, TRUE); | |
224 } | |
225 g_slist_free(list); | |
1 | 226 |
9 | 227 /* add defaults even if gdk-pixbuf does not have them, but disabled */ |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
228 filter_add_if_missing("jpeg", "JPEG group", ".jpg;.jpeg;.jpe", FORMAT_CLASS_IMAGE, TRUE, FALSE, FALSE); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
229 filter_add_if_missing("png", "Portable Network Graphic", ".png", FORMAT_CLASS_IMAGE, TRUE, FALSE, FALSE); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
230 filter_add_if_missing("tiff", "Tiff", ".tif;.tiff", FORMAT_CLASS_IMAGE, TRUE, FALSE, FALSE); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
231 filter_add_if_missing("pnm", "Packed Pixel formats", ".pbm;.pgm;.pnm;.ppm", FORMAT_CLASS_IMAGE, TRUE, FALSE, FALSE); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
232 filter_add_if_missing("gif", "Graphics Interchange Format", ".gif", FORMAT_CLASS_IMAGE, TRUE, FALSE, FALSE); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
233 filter_add_if_missing("xbm", "X bitmap", ".xbm", FORMAT_CLASS_IMAGE, TRUE, FALSE, FALSE); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
234 filter_add_if_missing("xpm", "X pixmap", ".xpm", FORMAT_CLASS_IMAGE, TRUE, FALSE, FALSE); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
235 filter_add_if_missing("bmp", "Bitmap", ".bmp", FORMAT_CLASS_IMAGE, TRUE, FALSE, FALSE); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
236 filter_add_if_missing("ico", "Icon file", ".ico;.cur", FORMAT_CLASS_IMAGE, TRUE, FALSE, FALSE); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
237 filter_add_if_missing("ras", "Raster", ".ras", FORMAT_CLASS_IMAGE, TRUE, FALSE, FALSE); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
238 filter_add_if_missing("svg", "Scalable Vector Graphics", ".svg", FORMAT_CLASS_IMAGE, TRUE, FALSE, FALSE); |
442 | 239 |
202
f95654aeec4b
added all possible raw extensions that I could find
nadvornik
parents:
196
diff
changeset
|
240 /* non-image files that might be desirable to show */ |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
241 filter_add_if_missing("xmp", "XMP sidecar", ".xmp", FORMAT_CLASS_META, TRUE, FALSE, TRUE); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
242 filter_add_if_missing("gqv", GQ_APPNAME " image collection", GQ_COLLECTION_EXT, FORMAT_CLASS_META, FALSE, FALSE, TRUE); |
43
ee03f36e9e4b
Sun May 15 21:40:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
15
diff
changeset
|
243 |
ee03f36e9e4b
Sun May 15 21:40:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
15
diff
changeset
|
244 /* These are the raw camera formats with embedded jpeg/exif. |
202
f95654aeec4b
added all possible raw extensions that I could find
nadvornik
parents:
196
diff
changeset
|
245 * (see format_raw.c and/or exiv2.cc) |
43
ee03f36e9e4b
Sun May 15 21:40:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
15
diff
changeset
|
246 */ |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
247 filter_add_if_missing("arw", "Sony raw format", ".arw;.srf;.sr2", FORMAT_CLASS_RAWIMAGE, FALSE, TRUE, TRUE); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
248 filter_add_if_missing("crw", "Canon raw format", ".crw;.cr2", FORMAT_CLASS_RAWIMAGE, FALSE, TRUE, TRUE); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
249 filter_add_if_missing("kdc", "Kodak raw format", ".kdc;.dcr;.k25", FORMAT_CLASS_RAWIMAGE, FALSE, TRUE, TRUE); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
250 filter_add_if_missing("raf", "Fujifilm raw format", ".raf", FORMAT_CLASS_RAWIMAGE, FALSE, TRUE, TRUE); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
251 filter_add_if_missing("mef", "Mamiya raw format", ".mef;.mos", FORMAT_CLASS_RAWIMAGE, FALSE, TRUE, TRUE); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
252 filter_add_if_missing("mrw", "Minolta raw format", ".mrw", FORMAT_CLASS_RAWIMAGE, FALSE, TRUE, TRUE); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
253 filter_add_if_missing("nef", "Nikon raw format", ".nef", FORMAT_CLASS_RAWIMAGE, FALSE, TRUE, TRUE); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
254 filter_add_if_missing("orf", "Olympus raw format", ".orf", FORMAT_CLASS_RAWIMAGE, FALSE, TRUE, TRUE); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
255 filter_add_if_missing("pef", "Pentax or Samsung raw format", ".pef;.ptx", FORMAT_CLASS_RAWIMAGE, FALSE, TRUE, TRUE); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
256 filter_add_if_missing("dng", "Adobe Digital Negative raw format", ".dng", FORMAT_CLASS_RAWIMAGE, FALSE, TRUE, TRUE); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
257 filter_add_if_missing("x3f", "Sigma raw format", ".x3f", FORMAT_CLASS_RAWIMAGE, FALSE, TRUE, TRUE); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
258 filter_add_if_missing("raw", "Panasonic raw format", ".raw", FORMAT_CLASS_RAWIMAGE, FALSE, TRUE, TRUE); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
259 filter_add_if_missing("r3d", "Red raw format", ".r3d", FORMAT_CLASS_RAWIMAGE, FALSE, TRUE, TRUE); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
260 filter_add_if_missing("3fr", "Hasselblad raw format", ".3fr", FORMAT_CLASS_RAWIMAGE, FALSE, TRUE, TRUE); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
261 filter_add_if_missing("erf", "Epson raw format", ".erf", FORMAT_CLASS_RAWIMAGE, FALSE, TRUE, TRUE); |
9 | 262 } |
263 | |
147
b2266996fa83
added possibility to specify prefered file type for external commands
nadvornik
parents:
146
diff
changeset
|
264 GList *filter_to_list(const gchar *extensions) |
9 | 265 { |
266 GList *list = NULL; | |
267 const gchar *p; | |
268 | |
269 if (!extensions) return NULL; | |
270 | |
271 p = extensions; | |
272 while (*p != '\0') | |
273 { | |
274 const gchar *b; | |
1235 | 275 gchar *ext; |
1229
878718372aca
sidecar files grouping was made case-insensitive
nadvornik
parents:
1207
diff
changeset
|
276 gint file_class = -1; |
736 | 277 guint l = 0; |
9 | 278 |
279 b = p; | |
280 while (*p != '\0' && *p != ';') | |
281 { | |
282 p++; | |
283 l++; | |
284 } | |
1229
878718372aca
sidecar files grouping was made case-insensitive
nadvornik
parents:
1207
diff
changeset
|
285 |
878718372aca
sidecar files grouping was made case-insensitive
nadvornik
parents:
1207
diff
changeset
|
286 ext = g_strndup(b, l); |
878718372aca
sidecar files grouping was made case-insensitive
nadvornik
parents:
1207
diff
changeset
|
287 |
878718372aca
sidecar files grouping was made case-insensitive
nadvornik
parents:
1207
diff
changeset
|
288 if (strcasecmp(ext, "%image") == 0) file_class = FORMAT_CLASS_IMAGE; |
878718372aca
sidecar files grouping was made case-insensitive
nadvornik
parents:
1207
diff
changeset
|
289 else if (strcasecmp(ext, "%raw") == 0) file_class = FORMAT_CLASS_RAWIMAGE; |
878718372aca
sidecar files grouping was made case-insensitive
nadvornik
parents:
1207
diff
changeset
|
290 else if (strcasecmp(ext, "%meta") == 0) file_class = FORMAT_CLASS_META; |
878718372aca
sidecar files grouping was made case-insensitive
nadvornik
parents:
1207
diff
changeset
|
291 |
878718372aca
sidecar files grouping was made case-insensitive
nadvornik
parents:
1207
diff
changeset
|
292 if (file_class == -1) |
878718372aca
sidecar files grouping was made case-insensitive
nadvornik
parents:
1207
diff
changeset
|
293 { |
878718372aca
sidecar files grouping was made case-insensitive
nadvornik
parents:
1207
diff
changeset
|
294 list = g_list_append(list, ext); |
878718372aca
sidecar files grouping was made case-insensitive
nadvornik
parents:
1207
diff
changeset
|
295 } |
878718372aca
sidecar files grouping was made case-insensitive
nadvornik
parents:
1207
diff
changeset
|
296 else |
878718372aca
sidecar files grouping was made case-insensitive
nadvornik
parents:
1207
diff
changeset
|
297 { |
878718372aca
sidecar files grouping was made case-insensitive
nadvornik
parents:
1207
diff
changeset
|
298 list = g_list_concat(list, string_list_copy(file_class_extension_list[file_class])); |
878718372aca
sidecar files grouping was made case-insensitive
nadvornik
parents:
1207
diff
changeset
|
299 g_free(ext); |
878718372aca
sidecar files grouping was made case-insensitive
nadvornik
parents:
1207
diff
changeset
|
300 } |
878718372aca
sidecar files grouping was made case-insensitive
nadvornik
parents:
1207
diff
changeset
|
301 |
9 | 302 if (*p == ';') p++; |
303 } | |
304 | |
305 return list; | |
306 } | |
307 | |
308 void filter_rebuild(void) | |
309 { | |
310 GList *work; | |
736 | 311 guint i; |
9 | 312 |
212
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
313 string_list_free(extension_list); |
9 | 314 extension_list = NULL; |
315 | |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
316 string_list_free(file_writable_list); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
317 file_writable_list = NULL; |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
318 |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
319 string_list_free(file_sidecar_list); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
320 file_sidecar_list = NULL; |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
321 |
212
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
322 for (i = 0; i < FILE_FORMAT_CLASSES; i++) |
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
323 { |
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
324 string_list_free(file_class_extension_list[i]); |
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
325 file_class_extension_list[i] = NULL; |
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
326 } |
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
327 |
9 | 328 work = filter_list; |
329 while (work) | |
330 { | |
331 FilterEntry *fe; | |
332 | |
333 fe = work->data; | |
334 work = work->next; | |
335 | |
336 if (fe->enabled) | |
337 { | |
338 GList *ext; | |
339 | |
340 ext = filter_to_list(fe->extensions); | |
341 if (ext) extension_list = g_list_concat(extension_list, ext); | |
442 | 342 |
1177
5a20c47e7a14
Fix up unsigned expression always true/false warnings.
zas_
parents:
1055
diff
changeset
|
343 if (fe->file_class < FILE_FORMAT_CLASSES) |
212
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
344 { |
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
345 ext = filter_to_list(fe->extensions); |
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
346 if (ext) file_class_extension_list[fe->file_class] = g_list_concat(file_class_extension_list[fe->file_class], ext); |
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
347 } |
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
348 else |
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
349 { |
673
fbebf5cf4a55
Do not use printf() directly but use new wrapper function log_printf() instead.
zas_
parents:
671
diff
changeset
|
350 log_printf("WARNING: invalid file class %d\n", fe->file_class); |
212
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
351 } |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
352 |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
353 if (fe->writable) |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
354 { |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
355 ext = filter_to_list(fe->extensions); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
356 if (ext) file_writable_list = g_list_concat(file_writable_list, ext); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
357 } |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
358 |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
359 if (fe->allow_sidecar) |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
360 { |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
361 ext = filter_to_list(fe->extensions); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
362 if (ext) file_sidecar_list = g_list_concat(file_sidecar_list, ext); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
363 } |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
364 |
9 | 365 } |
366 } | |
1229
878718372aca
sidecar files grouping was made case-insensitive
nadvornik
parents:
1207
diff
changeset
|
367 |
878718372aca
sidecar files grouping was made case-insensitive
nadvornik
parents:
1207
diff
changeset
|
368 sidecar_ext_parse(options->sidecar.ext, FALSE); /* this must be updated after changed file extensions */ |
9 | 369 } |
370 | |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
371 static gboolean filter_name_find(GList *filter, const gchar *name) |
9 | 372 { |
373 GList *work; | |
736 | 374 guint ln; |
215 | 375 |
376 ln = strlen(name); | |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
377 work = filter; |
1 | 378 while (work) |
379 { | |
380 gchar *filter = work->data; | |
736 | 381 guint lf = strlen(filter); |
215 | 382 |
1 | 383 if (ln >= lf) |
384 { | |
605
651ae2be1031
Use g_ascii_strncasecmp() instead of strncasecmp() where applicable.
zas_
parents:
587
diff
changeset
|
385 /* FIXME: utf8 */ |
1 | 386 if (strncasecmp(name + ln - lf, filter, lf) == 0) return TRUE; |
387 } | |
388 work = work->next; | |
389 } | |
390 | |
391 return FALSE; | |
392 } | |
393 | |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
394 |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
395 gboolean filter_name_exists(const gchar *name) |
212
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
396 { |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
397 if (!extension_list || options->file_filter.disable) return TRUE; |
212
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
398 |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
399 return filter_name_find(extension_list, name); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
400 } |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
401 |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
402 gboolean filter_file_class(const gchar *name, FileFormatClass file_class) |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
403 { |
1177
5a20c47e7a14
Fix up unsigned expression always true/false warnings.
zas_
parents:
1055
diff
changeset
|
404 if (file_class >= FILE_FORMAT_CLASSES) |
212
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
405 { |
673
fbebf5cf4a55
Do not use printf() directly but use new wrapper function log_printf() instead.
zas_
parents:
671
diff
changeset
|
406 log_printf("WARNING: invalid file class %d\n", file_class); |
212
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
407 return FALSE; |
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
408 } |
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
409 |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
410 return filter_name_find(file_class_extension_list[file_class], name); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
411 } |
215 | 412 |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
413 gboolean filter_name_is_writable(const gchar *name) |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
414 { |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
415 return filter_name_find(file_writable_list, name); |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
416 } |
212
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
417 |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
418 gboolean filter_name_allow_sidecar(const gchar *name) |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
419 { |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
420 return filter_name_find(file_sidecar_list, name); |
212
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
421 } |
c7021159079d
differentiate among normal image, raw image and metadata
nadvornik
parents:
202
diff
changeset
|
422 |
276 | 423 void filter_write_list(SecureSaveInfo *ssi) |
1 | 424 { |
9 | 425 GList *work; |
426 | |
427 work = filter_list; | |
428 while (work) | |
429 { | |
430 FilterEntry *fe = work->data; | |
431 work = work->next; | |
442 | 432 |
217 | 433 gchar *extensions = escquote_value(fe->extensions); |
434 gchar *description = escquote_value(fe->description); | |
9 | 435 |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
436 secure_fprintf(ssi, "file_filter.ext: \"%s%s\" %s %s %d %d %d\n", |
276 | 437 (fe->enabled) ? "" : "#", |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
438 fe->key, extensions, description, fe->file_class, fe->writable, fe->allow_sidecar); |
217 | 439 g_free(extensions); |
440 g_free(description); | |
9 | 441 } |
1 | 442 } |
443 | |
9 | 444 void filter_parse(const gchar *text) |
1 | 445 { |
9 | 446 const gchar *p; |
447 gchar *key; | |
448 gchar *ext; | |
449 gchar *desc; | |
450 gint enabled = TRUE; | |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
451 guint file_class = FORMAT_CLASS_UNKNOWN; |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
452 gboolean writable = TRUE; |
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
453 gboolean allow_sidecar = TRUE; |
9 | 454 |
455 if (!text || text[0] != '"') return; | |
456 | |
217 | 457 key = quoted_value(text, &p); |
9 | 458 if (!key) return; |
459 | |
217 | 460 ext = quoted_value(p, &p); |
461 desc = quoted_value(p, &p); | |
442 | 462 |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
463 sscanf(p, "%u %d %d", &file_class, &writable, &allow_sidecar); |
442 | 464 |
736 | 465 if (file_class >= FILE_FORMAT_CLASSES) file_class = FORMAT_CLASS_UNKNOWN; |
9 | 466 |
467 if (key && key[0] == '#') | |
468 { | |
469 gchar *tmp; | |
470 tmp = g_strdup(key + 1); | |
471 g_free(key); | |
472 key = tmp; | |
473 | |
474 enabled = FALSE; | |
1 | 475 } |
476 | |
743
77ff94c0490a
Try to load a system-wide rc file if any, before per-user rc file.
zas_
parents:
736
diff
changeset
|
477 if (key && strlen(key) > 0 && ext) |
77ff94c0490a
Try to load a system-wide rc file if any, before per-user rc file.
zas_
parents:
736
diff
changeset
|
478 { |
77ff94c0490a
Try to load a system-wide rc file if any, before per-user rc file.
zas_
parents:
736
diff
changeset
|
479 FilterEntry *fe = filter_get_by_key(key); |
77ff94c0490a
Try to load a system-wide rc file if any, before per-user rc file.
zas_
parents:
736
diff
changeset
|
480 |
77ff94c0490a
Try to load a system-wide rc file if any, before per-user rc file.
zas_
parents:
736
diff
changeset
|
481 if (fe != NULL) filter_remove_entry(fe); |
1239
254b09942e68
metadata write mode (direct or sidecar) made configurable for each file
nadvornik
parents:
1235
diff
changeset
|
482 filter_add(key, desc, ext, file_class, writable, allow_sidecar, enabled); |
743
77ff94c0490a
Try to load a system-wide rc file if any, before per-user rc file.
zas_
parents:
736
diff
changeset
|
483 } |
9 | 484 |
485 g_free(key); | |
486 g_free(ext); | |
487 g_free(desc); | |
488 } | |
1 | 489 |
145
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
490 /* |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
491 *----------------------------------------------------------------------------- |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
492 * sidecar extension list |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
493 *----------------------------------------------------------------------------- |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
494 */ |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
495 |
586 | 496 GList *sidecar_ext_get_list(void) |
145
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
497 { |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
498 return sidecar_ext_list; |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
499 } |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
500 |
1190
a4ea0c74a6e2
File filters cleanup: add .pef .dng and .arw extensions to default sidecar extensions list, add .k25 in Kodak raw extensions, simplify and optimize sidecar_ext_parse().
zas_
parents:
1177
diff
changeset
|
501 static void sidecar_ext_free_list(void) |
145
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
502 { |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
503 GList *work; |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
504 |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
505 work = sidecar_ext_list; |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
506 while (work) |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
507 { |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
508 gchar *ext = work->data; |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
509 work = work->next; |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
510 g_free(ext); |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
511 } |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
512 g_list_free(sidecar_ext_list); |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
513 sidecar_ext_list = NULL; |
1190
a4ea0c74a6e2
File filters cleanup: add .pef .dng and .arw extensions to default sidecar extensions list, add .k25 in Kodak raw extensions, simplify and optimize sidecar_ext_parse().
zas_
parents:
1177
diff
changeset
|
514 } |
a4ea0c74a6e2
File filters cleanup: add .pef .dng and .arw extensions to default sidecar extensions list, add .k25 in Kodak raw extensions, simplify and optimize sidecar_ext_parse().
zas_
parents:
1177
diff
changeset
|
515 |
a4ea0c74a6e2
File filters cleanup: add .pef .dng and .arw extensions to default sidecar extensions list, add .k25 in Kodak raw extensions, simplify and optimize sidecar_ext_parse().
zas_
parents:
1177
diff
changeset
|
516 void sidecar_ext_parse(const gchar *text, gboolean quoted) |
a4ea0c74a6e2
File filters cleanup: add .pef .dng and .arw extensions to default sidecar extensions list, add .k25 in Kodak raw extensions, simplify and optimize sidecar_ext_parse().
zas_
parents:
1177
diff
changeset
|
517 { |
a4ea0c74a6e2
File filters cleanup: add .pef .dng and .arw extensions to default sidecar extensions list, add .k25 in Kodak raw extensions, simplify and optimize sidecar_ext_parse().
zas_
parents:
1177
diff
changeset
|
518 gchar *value; |
a4ea0c74a6e2
File filters cleanup: add .pef .dng and .arw extensions to default sidecar extensions list, add .k25 in Kodak raw extensions, simplify and optimize sidecar_ext_parse().
zas_
parents:
1177
diff
changeset
|
519 |
a4ea0c74a6e2
File filters cleanup: add .pef .dng and .arw extensions to default sidecar extensions list, add .k25 in Kodak raw extensions, simplify and optimize sidecar_ext_parse().
zas_
parents:
1177
diff
changeset
|
520 sidecar_ext_free_list(); |
442 | 521 |
170
9a56e3d13e67
basic sidecar files configuration via preferences dialog
nadvornik
parents:
167
diff
changeset
|
522 if (quoted) |
217 | 523 value = quoted_value(text, NULL); |
170
9a56e3d13e67
basic sidecar files configuration via preferences dialog
nadvornik
parents:
167
diff
changeset
|
524 else |
1207 | 525 value = (gchar *) text; |
145
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
526 |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
527 if (value == NULL) return; |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
528 |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
529 sidecar_ext_list = filter_to_list(value); |
442 | 530 |
1190
a4ea0c74a6e2
File filters cleanup: add .pef .dng and .arw extensions to default sidecar extensions list, add .k25 in Kodak raw extensions, simplify and optimize sidecar_ext_parse().
zas_
parents:
1177
diff
changeset
|
531 if (quoted) g_free(value); |
145
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
532 } |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
533 |
1190
a4ea0c74a6e2
File filters cleanup: add .pef .dng and .arw extensions to default sidecar extensions list, add .k25 in Kodak raw extensions, simplify and optimize sidecar_ext_parse().
zas_
parents:
1177
diff
changeset
|
534 |
1055
1646720364cf
Adding a vim modeline to all files - patch by Klaus Ethgen
nadvornik
parents:
1023
diff
changeset
|
535 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */ |