34 ext = strrchr(name,
'.');
40 return g_ascii_strcasecmp(ext,
".jpg") == 0 ||
41 g_ascii_strcasecmp(ext,
".jpeg") == 0 ||
42 g_ascii_strcasecmp(ext,
".png") == 0;
54 if (!filter || strlen(filter) == 0) {
58 splitted = g_strsplit(filter,
",", 0);
59 lname = g_ascii_strdown (name, -1);
61 for (i = 0; ! result && (current = splitted[i]); i ++)
63 char * stripped = g_strstrip (g_ascii_strdown (current, -1));
64 result = result || strstr(lname, stripped);
89 char *imgfile_ext, *file_name_ext;
90 size_t imgfile_len, file_name_len;
92 imgfile_ext = strrchr(imgfile,
'.');
98 file_name_ext = strrchr(file_name,
'.');
104 imgfile_len = (imgfile_ext - imgfile);
105 file_name_len = (file_name_ext - file_name);
107 if (imgfile_len == file_name_len) {
108 return (g_ascii_strncasecmp(imgfile, file_name, imgfile_len) == 0);
115 file_name,
int depth)
122 d = g_dir_open(path, 0,
NULL);
130 while((f = g_dir_read_name(d))) {
131 char *newpath = g_strconcat(path,
"/", f,
NULL);
133 if (!g_file_test(newpath, G_FILE_TEST_IS_DIR) &&
146 while ((f = g_dir_read_name(d))) {
147 char *newpath = g_strconcat(path,
"/", f,
NULL);
149 if (!g_file_test(newpath, G_FILE_TEST_IS_DIR) &&
168 while ((f = g_dir_read_name(d))) {
169 char *newpath = g_strconcat(path,
"/", f,
NULL);
171 if(g_file_test(newpath, G_FILE_TEST_IS_DIR)) {
192 if (strncmp (filename,
"file://", 7))
199 char * path = g_path_get_dirname (unesc);
200 char * base = g_path_get_basename (unesc);