Mercurial > geeqie
comparison src/view_dir_list.c @ 1780:763c254bc57a
Store sort parameters in appropriate variables.
author | zas_ |
---|---|
date | Sat, 19 Dec 2009 12:49:19 +0000 |
parents | 66bf394d162a |
children | 956aab097ea7 |
comparison
equal
deleted
inserted
replaced
1779:f64e346a3d9c | 1780:763c254bc57a |
---|---|
136 gboolean valid; | 136 gboolean valid; |
137 gchar *filepath; | 137 gchar *filepath; |
138 GList *old_list; | 138 GList *old_list; |
139 gboolean ret; | 139 gboolean ret; |
140 FileData *fd; | 140 FileData *fd; |
141 SortType sort_type = SORT_NAME; | |
142 gboolean sort_ascend = TRUE; | |
141 | 143 |
142 old_list = VDLIST(vd)->list; | 144 old_list = VDLIST(vd)->list; |
143 | 145 |
144 ret = filelist_read(vd->dir_fd, NULL, &VDLIST(vd)->list); | 146 ret = filelist_read(vd->dir_fd, NULL, &VDLIST(vd)->list); |
145 VDLIST(vd)->list = filelist_sort(VDLIST(vd)->list, SORT_NAME, TRUE); | 147 VDLIST(vd)->list = filelist_sort(VDLIST(vd)->list, sort_type, sort_ascend); |
146 | 148 |
147 /* add . and .. */ | 149 /* add . and .. */ |
148 | 150 |
149 if (strcmp(vd->dir_fd->path, G_DIR_SEPARATOR_S) != 0) | 151 if (strcmp(vd->dir_fd->path, G_DIR_SEPARATOR_S) != 0) |
150 { | 152 { |
213 { | 215 { |
214 match = 0; | 216 match = 0; |
215 } | 217 } |
216 else | 218 else |
217 { | 219 { |
218 match = filelist_sort_compare_filedata_full(fd, old_fd, SORT_NAME, TRUE); | 220 match = filelist_sort_compare_filedata_full(fd, old_fd, sort_type, sort_ascend); |
219 | 221 |
220 if (match == 0) g_warning("multiple fd for the same path"); | 222 if (match == 0) g_warning("multiple fd for the same path"); |
221 } | 223 } |
222 | 224 |
223 } | 225 } |