diff --git a/src/bin/e_thumb_main.c b/src/bin/e_thumb_main.c index 9588059b0..baa07dc09 100644 --- a/src/bin/e_thumb_main.c +++ b/src/bin/e_thumb_main.c @@ -31,7 +31,6 @@ static int _e_ipc_cb_server_add(void *data, int type, void *event); static int _e_ipc_cb_server_del(void *data, int type, void *event); static int _e_ipc_cb_server_data(void *data, int type, void *event); static int _e_cb_timer(void *data); -static int _e_thumb_valid(E_Thumb *eth); static void _e_thumb_generate(E_Thumb *eth); static char *_e_thumb_file_id(char *file, char *key); @@ -223,32 +222,13 @@ _e_cb_timer(void *data) /* take thumb at head of list */ if (_thumblist) { -/* - for (l = _thumblist; l; l = l->next) - { - eth = l->data; - if (_e_thumb_valid(eth)) - del_list = evas_list_append(del_list, eth); - } - while (del_list) - { - eth = del_list->data; - del_list = evas_list_remove_list(del_list, del_list); - _thumblist = evas_list_remove(_thumblist, eth); - if (eth->file) free(eth->file); - if (eth->key) free(eth->key); - free(eth); - } - */ - if (_thumblist) - { - eth = _thumblist->data; - _thumblist = evas_list_remove_list(_thumblist, _thumblist); - _e_thumb_generate(eth); - if (eth->file) free(eth->file); - if (eth->key) free(eth->key); - free(eth); - } + eth = _thumblist->data; + _thumblist = evas_list_remove_list(_thumblist, _thumblist); + _e_thumb_generate(eth); + if (eth->file) free(eth->file); + if (eth->key) free(eth->key); + free(eth); + if (_thumblist) _timer = ecore_timer_add(0.000001, _e_cb_timer, NULL); else _timer = NULL; } @@ -257,39 +237,6 @@ _e_cb_timer(void *data) return 0; } -static int -_e_thumb_valid(E_Thumb *eth) -{ - char buf[4096], dbuf[4096], *id, *td; - time_t mtime_orig, mtime_thumb; - - id = _e_thumb_file_id(eth->file, eth->key); - if (!id) return 0; - - td = strdup(id); - if (!td) - { - free(id); - return 0; - } - td[2] = 0; - - snprintf(dbuf, sizeof(dbuf), "%s/%s", _thumbdir, td); - snprintf(buf, sizeof(buf), "%s/%s/%s-%ix%i.thm", - _thumbdir, td, id + 2, eth->w, eth->h); - free(id); - free(td); - - mtime_orig = ecore_file_mod_time(eth->file); - mtime_thumb = ecore_file_mod_time(buf); - if (mtime_thumb > mtime_orig) - { - ecore_ipc_server_send(_e_ipc_server, 5, 2, eth->objid, 0, 0, buf, strlen(buf) + 1); - return 1; - } - return 0; -} - static void _e_thumb_generate(E_Thumb *eth) {