Mercurial > geeqie.yaz
comparison src/metadata.c @ 1231:ca8ccf0c3e81
added done callback to utilops
used the callback for metadata writting at exit and for renaming new
folder
author | nadvornik |
---|---|
date | Fri, 02 Jan 2009 14:58:21 +0000 |
parents | 4d5587c4bf56 |
children | 31f50c1b6a9a |
comparison
equal
deleted
inserted
replaced
1230:d13233ab7def | 1231:ca8ccf0c3e81 |
---|---|
97 } | 97 } |
98 return ret; | 98 return ret; |
99 } | 99 } |
100 | 100 |
101 | 101 |
102 gboolean metadata_write_queue_confirm() | 102 gboolean metadata_write_queue_confirm(FileUtilDoneFunc done_func, gpointer done_data) |
103 { | 103 { |
104 GList *work; | 104 GList *work; |
105 GList *to_approve = NULL; | 105 GList *to_approve = NULL; |
106 | 106 |
107 work = metadata_write_queue; | 107 work = metadata_write_queue; |
113 if (fd->change) continue; /* another operation in progress, skip this file for now */ | 113 if (fd->change) continue; /* another operation in progress, skip this file for now */ |
114 | 114 |
115 to_approve = g_list_prepend(to_approve, file_data_ref(fd)); | 115 to_approve = g_list_prepend(to_approve, file_data_ref(fd)); |
116 } | 116 } |
117 | 117 |
118 file_util_write_metadata(NULL, to_approve, NULL); | 118 file_util_write_metadata(NULL, to_approve, NULL, done_func, done_data); |
119 | 119 |
120 filelist_free(to_approve); | 120 filelist_free(to_approve); |
121 | 121 |
122 return (metadata_write_queue != NULL); | 122 return (metadata_write_queue != NULL); |
123 } | 123 } |
124 | 124 |
125 static gboolean metadata_write_queue_idle_cb(gpointer data) | 125 static gboolean metadata_write_queue_idle_cb(gpointer data) |
126 { | 126 { |
127 metadata_write_queue_confirm(); | 127 metadata_write_queue_confirm(NULL, NULL); |
128 metadata_write_idle_id = -1; | 128 metadata_write_idle_id = -1; |
129 return FALSE; | 129 return FALSE; |
130 } | 130 } |
131 | 131 |
132 gboolean metadata_write_perform(FileData *fd) | 132 gboolean metadata_write_perform(FileData *fd) |