Enlightenment CVS committal

Author  : atmosphere
Project : e17
Module  : apps/entice

Dir     : e17/apps/entice/src/bin


Modified Files:
        entice.c 


Log Message:
ensure the last image is taken off screen if we delete our filelist down
to 0 elements.

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entice/src/bin/entice.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- entice.c    19 Oct 2003 20:58:03 -0000      1.12
+++ entice.c    19 Oct 2003 21:15:21 -0000      1.13
@@ -21,6 +21,7 @@
 
 static Entice *entice = NULL;
 
+static void entice_current_free(void);
 
 /**
  * hookup_edje_signals - Add signal callbacks for EnticeImage edje part
@@ -225,27 +226,7 @@
                                entice_image_zoom_get(entice->current));
          if (entice_image_zoom_fit_get(entice->current))
             should_fit = 1;
-         evas_object_del(entice->current);
-         entice->current = NULL;
-
-         /* clean up the old images */
-         swallowed =
-            edje_object_part_swallow_get(entice->preview, "EnticeImage");
-         if (swallowed)
-         {
-            edje_object_part_unswallow(entice->current, swallowed);
-            evas_object_del(swallowed);
-            swallowed = NULL;
-         }
-         swallowed =
-            edje_object_part_swallow_get(entice->current,
-                                         "EnticeImageScroller");
-         if (swallowed)
-         {
-            edje_object_part_unswallow(entice->current, swallowed);
-            evas_object_del(swallowed);
-            swallowed = NULL;
-         }
+        entice_current_free();
       }
       entice->current = new_current;
       if ((thumb_edje =
@@ -400,6 +381,36 @@
    }
 
 }
+static void
+entice_current_free(void)
+{
+   if (entice && entice->edje && entice->current)
+   {
+      Evas_Object *swallowed = NULL;
+
+      if (entice->current)
+         evas_object_del(entice->current);
+      entice->current = evas_object_image_add(ecore_evas_get(entice->ee));
+
+      /* clean up the old images */
+      swallowed = edje_object_part_swallow_get(entice->edje, "EnticeImage");
+      if (swallowed)
+      {
+         edje_object_part_unswallow(entice->edje, swallowed);
+         evas_object_del(swallowed);
+         swallowed = NULL;
+      }
+      swallowed =
+         edje_object_part_swallow_get(entice->edje, "EnticeImageScroller");
+      if (swallowed)
+      {
+         edje_object_part_unswallow(entice->edje, swallowed);
+         evas_object_del(swallowed);
+         swallowed = NULL;
+      }
+   }
+
+}
 
 /**
  * entice_file_remove - remove the file from our image list
@@ -431,6 +442,7 @@
          }
          e_container_element_remove(entice->container, o);
          evas_object_del(o);
+         entice_current_free();
          if (evas_list_count(entice->thumb.list) == 0)
             entice->thumb.current = NULL;
       }




-------------------------------------------------------
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

Reply via email to