Remove old unused code.

SVN revision: 27602
This commit is contained in:
Sebastian Dransfeld 2006-12-28 14:34:51 +00:00
parent cc31b7b8a9
commit 84816b859d
1 changed files with 7 additions and 60 deletions

View File

@ -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)
{