36 ext = strrchr(name,
'.');
42 return g_strcasecmp(ext,
".jpg") == 0 ||
43 g_strcasecmp(ext,
".jpeg") == 0 ||
44 g_strcasecmp(ext,
".png") == 0;
56 if (!filter || strlen(filter) == 0) {
60 splitted = g_strsplit(filter,
",", 0);
62 lname = g_strdup(name);
65 for (i = 0; !result && (current = splitted[i]); i++) {
66 char *stripped = g_strstrip(g_strdup(current));
69 result = result || strstr(lname, stripped);
95 char *imgfile_ext, *file_name_ext;
96 size_t imgfile_len, file_name_len;
98 imgfile_ext = strrchr(imgfile,
'.');
104 file_name_ext = strrchr(file_name,
'.');
105 if (!file_name_ext) {
110 imgfile_len = (imgfile_ext - imgfile);
111 file_name_len = (file_name_ext - file_name);
113 if (imgfile_len == file_name_len) {
114 return (g_ascii_strncasecmp(imgfile, file_name, imgfile_len) == 0);
121 file_name,
int depth)
128 d = g_dir_open(path, 0,
NULL);
136 while((f = g_dir_read_name(d))) {
137 char *newpath = g_strconcat(path,
"/", f,
NULL);
139 if (!g_file_test(newpath, G_FILE_TEST_IS_DIR) &&
152 while ((f = g_dir_read_name(d))) {
153 char *newpath = g_strconcat(path,
"/", f,
NULL);
155 if (!g_file_test(newpath, G_FILE_TEST_IS_DIR) &&
174 while ((f = g_dir_read_name(d))) {
175 char *newpath = g_strconcat(path,
"/", f,
NULL);
177 if(g_file_test(newpath, G_FILE_TEST_IS_DIR)) {
198 if (strncmp (filename,
"file://", 7))
205 char * path = g_path_get_dirname (unesc);
206 char * base = g_path_get_basename (unesc);