comparison src/filedata.c @ 763:81f9e8dbb4bf

improved infrastructure for tracing changes, optimized vflist_populate_view
author nadvornik
date Wed, 28 May 2008 22:12:10 +0000
parents 477f48ba28d8
children 4acde7a0bb01
comparison
equal deleted inserted replaced
762:e6927cef8541 763:81f9e8dbb4bf
134 FileData *file_data_merge_sidecar_files(FileData *target, FileData *source); 134 FileData *file_data_merge_sidecar_files(FileData *target, FileData *source);
135 static void file_data_check_sidecars(FileData *fd); 135 static void file_data_check_sidecars(FileData *fd);
136 FileData *file_data_disconnect_sidecar_file(FileData *target, FileData *sfd); 136 FileData *file_data_disconnect_sidecar_file(FileData *target, FileData *sfd);
137 137
138 138
139 void file_data_increment_version(FileData *fd)
140 {
141 fd->version++;
142 if (fd->parent) fd->parent->version++;
143 }
144
145
139 static void file_data_set_path(FileData *fd, const gchar *path) 146 static void file_data_set_path(FileData *fd, const gchar *path)
140 { 147 {
141 148
142 if (strcmp(path, G_DIR_SEPARATOR_S) == 0) 149 if (strcmp(path, G_DIR_SEPARATOR_S) == 0)
143 { 150 {
182 { 189 {
183 fd->size = st->st_size; 190 fd->size = st->st_size;
184 fd->date = st->st_mtime; 191 fd->date = st->st_mtime;
185 if (fd->pixbuf) g_object_unref(fd->pixbuf); 192 if (fd->pixbuf) g_object_unref(fd->pixbuf);
186 fd->pixbuf = NULL; 193 fd->pixbuf = NULL;
194 file_data_increment_version(fd);
187 } 195 }
188 196
189 work = fd->sidecar_files; 197 work = fd->sidecar_files;
190 while (work) 198 while (work)
191 { 199 {
1345 g_free(fd->original_path); 1353 g_free(fd->original_path);
1346 file_data_set_path(fd, fd->change->dest); 1354 file_data_set_path(fd, fd->change->dest);
1347 fd->original_path = g_strdup(fd->change->dest); 1355 fd->original_path = g_strdup(fd->change->dest);
1348 g_hash_table_insert(file_data_pool, fd->original_path, fd); 1356 g_hash_table_insert(file_data_pool, fd->original_path, fd);
1349 } 1357 }
1358 file_data_increment_version(fd);
1350 } 1359 }
1351 1360
1352 gint file_data_sc_apply_ci(FileData *fd) 1361 gint file_data_sc_apply_ci(FileData *fd)
1353 { 1362 {
1354 GList *work; 1363 GList *work;