Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_widget.c e_widget_fsel.c e_widget_preview.c 


Log Message:


e_widget needs to track sub objects so it knwos what to delete on deletion of
the widget. if u delete a sub object prematurely - u need to tell e_widget. u
also need to dell it about the new object!

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_widget.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- e_widget.c  15 Oct 2006 14:04:36 -0000      1.12
+++ e_widget.c  15 Oct 2006 15:12:14 -0000      1.13
@@ -134,6 +134,11 @@
 e_widget_sub_object_add(Evas_Object *obj, Evas_Object *sobj)
 {
    API_ENTRY return;
+   if (evas_list_find(sd->subobjs, sobj))
+     {
+       printf("----------EEEEEK! dupe sub obj is a sub obj!\n");
+       abort();
+     }
    sd->subobjs = evas_list_append(sd->subobjs, sobj);
    if (!sd->child_can_focus)
      {
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_widget_fsel.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -3 -r1.44 -r1.45
--- e_widget_fsel.c     15 Oct 2006 14:04:36 -0000      1.44
+++ e_widget_fsel.c     15 Oct 2006 15:12:14 -0000      1.45
@@ -319,7 +319,7 @@
         e_widget_table_object_append(wd->o_preview_preview_table,
                                      wd->o_preview_preview,
                                      0, 0, 1, 1, 0, 0, 1, 1);
-
+       
         o = e_widget_label_add(evas, _("Size:"));
         wd->o_preview_size = o;
         e_widget_sub_object_add(obj, o);
@@ -576,9 +576,9 @@
    owner = _e_wid_file_user_get(st.st_uid);
    perms = _e_wid_file_perms_get(st.st_mode, st.st_uid, st.st_gid);
    mtime = _e_wid_file_time_get(st.st_mtime); 
-   
+
    e_widget_preview_thumb_set(wd->o_preview_preview, wd->path,
-                             "background", 128, 128);
+                             "e/desktop/background", 128, 128);
    
    e_widget_table_object_repack(wd->o_preview_preview_table,
                                wd->o_preview_preview,
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_widget_preview.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- e_widget_preview.c  17 Sep 2006 21:29:24 -0000      1.7
+++ e_widget_preview.c  15 Oct 2006 15:12:14 -0000      1.8
@@ -59,8 +59,7 @@
    
    wd = e_widget_data_get(obj);
    
-   if (wd->o_thumb) 
-      evas_object_del(wd->o_thumb);
+   if (wd->o_thumb) evas_object_del(wd->o_thumb);
 
    wd->o_thumb = e_icon_add(e_livethumb_evas_get(wd->img));
    e_icon_file_key_set(wd->o_thumb, file, key);
@@ -73,28 +72,32 @@
 e_widget_preview_thumb_set(Evas_Object *obj, const char *file, const char 
*key, int w, int h)
 {
    E_Widget_Data *wd;
-
+   
    wd = e_widget_data_get(obj);
-
+   
    if (wd->img)
-      evas_object_del(wd->img);
-
+     {
+       e_widget_sub_object_del(obj, wd->img);
+       evas_object_del(wd->img);
+     }
+   
    wd->img = e_thumb_icon_add(evas_object_evas_get(obj));
+   e_widget_sub_object_add(obj, wd->img);
    if (e_util_glob_case_match(file, "*.edj"))
-      {
-         /* FIXME: There is probably a quicker way of doing this. */
-         if (edje_file_group_exists(file, "icon"))
-            e_thumb_icon_file_set(wd->img, file, "icon");
-         else if (edje_file_group_exists(file, "e/desktop/background"))
-            e_thumb_icon_file_set(wd->img, file, "e/desktop/background");
-         else if (edje_file_group_exists(file, "e/init/splash"))
-           e_thumb_icon_file_set(wd->img, file, "e/init/splash");
-      }
+     {
+       /* FIXME: There is probably a quicker way of doing this. */
+       if (edje_file_group_exists(file, "icon"))
+         e_thumb_icon_file_set(wd->img, file, "icon");
+       else if (edje_file_group_exists(file, "e/desktop/background"))
+         e_thumb_icon_file_set(wd->img, file, "e/desktop/background");
+       else if (edje_file_group_exists(file, "e/init/splash"))
+         e_thumb_icon_file_set(wd->img, file, "e/init/splash");
+     }
    else
      e_thumb_icon_file_set(wd->img, file, NULL);
+   evas_object_smart_callback_add(wd->img, "e_thumb_gen", 
_e_wid_preview_thumb_gen, wd);
    e_thumb_icon_size_set(wd->img, w, h);
    e_thumb_icon_begin(wd->img);
-   evas_object_smart_callback_add(wd->img, "e_thumb_gen", 
_e_wid_preview_thumb_gen, wd);
    
    edje_object_part_swallow(wd->o_frame, "e.swallow.content", wd->img);
    evas_object_show(wd->img);



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to