First get filename, then open file.

SVN revision: 17413
This commit is contained in:
sebastid 2005-10-10 22:33:12 +00:00 committed by sebastid
parent 0a8ea88d99
commit 5e83f48b43
2 changed files with 28 additions and 12 deletions

View File

@ -50,6 +50,16 @@ e_bindings_init(void)
eb = l->data;
e_bindings_signal_add(eb->context, eb->signal, eb->source, eb->modifiers,
eb->any_mod, eb->action, eb->params);
/* FIXME: Can this be solved in a generic way? */
if ((!strcmp(eb->action, "window_resize")) &&
(!strncmp(eb->signal, "mouse,down,", 11)) &&
(!strncmp(eb->source, "resize_", 7)))
{
e_bindings_signal_add(eb->context, "mouse,in", eb->source, eb->modifiers,
eb->any_mod, "pointer_push", eb->params);
e_bindings_signal_add(eb->context, "mouse,out", eb->source, eb->modifiers,
eb->any_mod, "pointer_pop", eb->params);
}
}
for (l = e_config->wheel_bindings; l; l = l->next)
@ -61,11 +71,6 @@ e_bindings_init(void)
eb->any_mod, eb->action, eb->params);
}
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER, "mouse,in", "resize_br",
E_BINDING_MODIFIER_NONE, 1, "pointer_push", "resize_br");
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER, "mouse,out", "resize_br",
E_BINDING_MODIFIER_NONE, 1, "pointer_pop", "resize_br");
return 1;
}

View File

@ -2540,8 +2540,15 @@ _e_fm_file_thumb_create(char *file)
Ecore_Evas *buf;
Evas *evasbuf;
thumbpath = _e_fm_file_thumb_path_get(file);
ef = eet_open(thumbpath, EET_FILE_MODE_WRITE);
if (!ef) return -1;
if (!ef)
{
free(thumpath);
return -1;
}
free(thumbpath);
// we need to remove the hardcode somehow.
//buf = ecore_evas_buffer_new(file->sd->icon_info.w,file->sd->icon_info.h);
@ -2554,12 +2561,10 @@ _e_fm_file_thumb_create(char *file)
evas_object_show(im);
data = ecore_evas_buffer_pixels_get(buf);
thumbpath = _e_fm_file_thumb_path_get(file);
if ((size = eet_data_image_write(ef, "/thumbnail/data", (void *)data, 48, 48, 1, 0, 70, 1)) < 0)
{
printf("BUG: Couldn't write thumb db\n");
}
free(thumbpath);
eet_close(ef);
@ -2577,8 +2582,6 @@ _e_fm_file_thumb_get(E_Fileman_File *file)
unsigned int w, h;
int a, c, q, l;
ef = eet_open(thumb, EET_FILE_MODE_READ);
if (!ef) return NULL;
fullname = _e_fm_file_fullname(file);
if (!_e_fm_file_thumb_exists(fullname))
@ -2586,6 +2589,16 @@ _e_fm_file_thumb_get(E_Fileman_File *file)
thumb = _e_fm_file_thumb_path_get(fullname);
ef = eet_open(thumb, EET_FILE_MODE_READ);
if (!ef)
{
free(fullname);
free(thumb);
return NULL;
}
free(fullname);
free(thumb);
data = eet_data_image_read(ef, "/thumbnail/data", &w, &h, &a, &c, &q, &l);
if (data)
{
@ -2600,8 +2613,6 @@ _e_fm_file_thumb_get(E_Fileman_File *file)
free(data);
}
eet_close(ef);
free(fullname);
free(thumb);
return im;
}