Enlightenment CVS committal
Author : atmosphere
Project : e17
Module : apps/entice
Dir : e17/apps/entice/src/bin
Modified Files:
entice.c
Log Message:
Disallow adding the same image twice.
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entice/src/bin/entice.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- entice.c 19 Oct 2003 21:15:21 -0000 1.13
+++ entice.c 20 Oct 2003 04:00:06 -0000 1.14
@@ -226,7 +226,7 @@
entice_image_zoom_get(entice->current));
if (entice_image_zoom_fit_get(entice->current))
should_fit = 1;
- entice_current_free();
+ entice_current_free();
}
entice->current = new_current;
if ((thumb_edje =
@@ -270,21 +270,20 @@
/**
* entice_file_add - add the named file to our list of possible files
* @file - the FULL path to the image
- * FIXME: get rid of the realpath calls
*/
int
entice_file_add(const char *file)
{
int result = 0;
Evas_Object *o = NULL, *edje = NULL;
- char buf[PATH_MAX], path[PATH_MAX], *ptr = NULL;
+ char buf[PATH_MAX];
if (file)
{
snprintf(buf, PATH_MAX, "%s", file);
- if ((ptr = realpath(buf, path)))
+ if ((evas_hash_find(entice->thumb.hash, buf)) == NULL)
{
- if ((o = e_thumb_new(ecore_evas_get(entice->ee), path)))
+ if ((o = e_thumb_new(ecore_evas_get(entice->ee), buf)))
{
entice->thumb.list = evas_list_append(entice->thumb.list, o);
evas_object_resize(o, 48, 48);
@@ -297,8 +296,7 @@
evas_object_show(edje);
evas_object_show(o);
- entice->thumb.hash =
- evas_hash_add(entice->thumb.hash, path, edje);
+ entice->thumb.hash = evas_hash_add(entice->thumb.hash, buf, edje);
e_container_element_append(entice->container, edje);
if (evas_list_count(entice->thumb.list) == 1)
-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise
Linux in the Boardroom; in the Front Office; & in the Server Room
http://www.enterpriselinuxforum.com
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs