Enlightenment CVS committal
Author : atmosphere
Project : e17
Module : apps/entice
Dir : e17/apps/entice/src/bin
Modified Files:
entice.c
Log Message:
Deleting works properly now.
There were remnants left in the iconbar that weren't getting properly
erased.
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entice/src/bin/entice.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- entice.c 18 Oct 2003 20:38:55 -0000 1.8
+++ entice.c 19 Oct 2003 04:19:23 -0000 1.9
@@ -296,8 +296,6 @@
if ((o = e_thumb_new(ecore_evas_get(entice->ee), path)))
{
entice->thumb.list = evas_list_append(entice->thumb.list, o);
- entice->thumb.hash = evas_hash_add(entice->thumb.hash, path, o);
- evas_object_show(o);
evas_object_resize(o, 48, 48);
edje = edje_object_add(ecore_evas_get(entice->ee));
@@ -306,6 +304,10 @@
hookup_entice_thumb_signals(edje, o);
edje_object_part_swallow(edje, "EnticeThumb", o);
evas_object_show(edje);
+ evas_object_show(o);
+
+ entice->thumb.hash =
+ evas_hash_add(entice->thumb.hash, path, edje);
e_container_element_append(entice->container, edje);
if (evas_list_count(entice->thumb.list) == 1)
@@ -397,22 +399,29 @@
entice_file_remove(const char *file)
{
int result = 0;
- Evas_Object *o = NULL;
- char buf[PATH_MAX], path[PATH_MAX], *ptr = NULL;
+ char buf[PATH_MAX];
+ Evas_Object *o = NULL, *obj = NULL;
if (file)
{
snprintf(buf, PATH_MAX, "%s", file);
if ((o = evas_hash_find(entice->thumb.hash, buf)))
{
- entice->thumb.list = evas_list_remove(entice->thumb.list, o);
entice->thumb.hash = evas_hash_del(entice->thumb.hash, buf, o);
+ if (entice->thumb.current && entice->thumb.current->prev)
+ entice->thumb.current = entice->thumb.current->prev;
+ else if (entice->thumb.list)
+ entice->thumb.current = entice->thumb.list;
+
+ if ((obj = edje_object_part_swallow_get(o, "EnticeThumb")))
+ {
+ entice->thumb.list = evas_list_remove(entice->thumb.list, obj);
+ evas_object_del(obj);
+ }
e_container_element_remove(entice->container, o);
evas_object_del(o);
- /* FIXME container_vomit(o); */
-#if 0
- e_thumb_free(o);
-#endif
+ if (evas_list_count(entice->thumb.list) == 0)
+ entice->thumb.current = NULL;
}
else
result = 1;
@@ -436,16 +445,9 @@
if (file)
{
snprintf(buf, PATH_MAX, "%s", file);
- if ((o = evas_hash_find(entice->thumb.hash, buf)))
- {
- entice->thumb.list = evas_list_remove(entice->thumb.list, o);
- entice->thumb.hash = evas_hash_del(entice->thumb.hash, buf, o);
- e_container_element_remove(entice->container, o);
- evas_object_del(o);
+ result = entice_file_remove(buf);
+ if (!result)
unlink(buf);
- }
- else
- result = 1;
}
else
result = 2;
-------------------------------------------------------
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