Enlightenment CVS committal
Author : atmosphere
Project : e17
Module : apps/entice
Dir : e17/apps/entice/src/bin
Modified Files:
entice.c
Log Message:
slight fixups and a little more output if the image fails to load
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entice/src/bin/entice.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -3 -r1.28 -r1.29
--- entice.c 8 Jan 2004 05:58:40 -0000 1.28
+++ entice.c 8 Jan 2004 18:12:49 -0000 1.29
@@ -230,63 +230,70 @@
edje_object_signal_emit(entice->edje, "EnticeImageDisplayPrep", "");
tmp = e_thumb_evas_object_get(o);
- new_current = entice_image_new(tmp);
- entice_image_file_set(new_current, e_thumb_file_get(o));
- entice_image_format_set(new_current, e_thumb_format_get(o));
- entice_image_save_quality_set(new_current,
- entice_config_image_quality_get());
-
- new_scroller =
- e_thumb_new(evas_object_evas_get(o), e_thumb_file_get(o));
- edje_object_part_geometry_get(entice->edje, "EnticeImage", NULL, NULL,
- &w, &h);
- evas_object_resize(new_current, w, h);
- evas_object_show(new_current);
-
- edje_object_part_geometry_get(entice->edje, "EnticeImageScroller", NULL,
- NULL, &w, &h);
- evas_object_resize(new_scroller, w, h);
- evas_object_show(new_scroller);
-
- if (entice->current)
+ if ((new_current = entice_image_new(tmp)))
{
- entice_image_zoom_set(new_current,
- entice_image_zoom_get(entice->current));
- if (entice_image_zoom_fit_get(entice->current))
- should_fit = 1;
- entice_current_free();
- }
- entice->current = new_current;
- if ((thumb_edje =
- evas_hash_find(entice->thumb.hash,
- entice_image_file_get(entice->current))))
- edje_object_signal_emit(thumb_edje, "EnticeThumbLoaded", "");
-
- if (entice->scroller)
- evas_object_del(entice->scroller);
- entice->scroller = new_scroller;
-
- /* Set the text descriptions for this image */
- e_thumb_geometry_get(o, &iw, &ih);
- snprintf(buf, PATH_MAX, "%d x %d", iw, ih);
- edje_object_part_text_set(entice->edje, "EnticeFileDimensions", buf);
- edje_object_part_text_set(entice->edje, "EnticeFileName",
- e_thumb_file_get(o));
- snprintf(buf, PATH_MAX, "Entice: %s", e_thumb_file_get(o));
- ecore_evas_title_set(entice->ee, buf);
-
- entice->thumb.current = evas_list_find_list(entice->thumb.list, _data);
-
- /* swallow the images */
- edje_object_part_swallow(entice->edje, "EnticeImage", new_current);
- edje_object_part_swallow(entice->edje, "EnticeImageScroller",
- new_scroller);
+ entice_image_file_set(new_current, e_thumb_file_get(o));
+ entice_image_format_set(new_current, e_thumb_format_get(o));
+ entice_image_save_quality_set(new_current,
+ entice_config_image_quality_get());
+
+ new_scroller =
+ e_thumb_new(evas_object_evas_get(o), e_thumb_file_get(o));
+ edje_object_part_geometry_get(entice->edje, "EnticeImage", NULL,
+ NULL, &w, &h);
+ evas_object_resize(new_current, w, h);
+ evas_object_show(new_current);
+
+ edje_object_part_geometry_get(entice->edje, "EnticeImageScroller",
+ NULL, NULL, &w, &h);
+ evas_object_resize(new_scroller, w, h);
+ evas_object_show(new_scroller);
+
+ if (entice->current)
+ {
+ entice_image_zoom_set(new_current,
+ entice_image_zoom_get(entice->current));
+ if (entice_image_zoom_fit_get(entice->current))
+ should_fit = 1;
+ entice_current_free();
+ }
+ entice->current = new_current;
+ if ((thumb_edje =
+ evas_hash_find(entice->thumb.hash,
+ entice_image_file_get(entice->current))))
+ edje_object_signal_emit(thumb_edje, "EnticeThumbLoaded", "");
+
+ if (entice->scroller)
+ evas_object_del(entice->scroller);
+ entice->scroller = new_scroller;
+
+ /* Set the text descriptions for this image */
+ e_thumb_geometry_get(o, &iw, &ih);
+ snprintf(buf, PATH_MAX, "%d x %d", iw, ih);
+ edje_object_part_text_set(entice->edje, "EnticeFileDimensions", buf);
+ edje_object_part_text_set(entice->edje, "EnticeFileName",
+ e_thumb_file_get(o));
+ snprintf(buf, PATH_MAX, "Entice: %s", e_thumb_file_get(o));
+ ecore_evas_title_set(entice->ee, buf);
+
+ entice->thumb.current =
+ evas_list_find_list(entice->thumb.list, _data);
+
+ /* swallow the images */
+ edje_object_part_swallow(entice->edje, "EnticeImage", new_current);
+ edje_object_part_swallow(entice->edje, "EnticeImageScroller",
+ new_scroller);
- if (should_fit)
- entice_image_zoom_fit(new_current);
+ if (should_fit)
+ entice_image_zoom_fit(new_current);
- /* let the app know it's ready to be displayed */
- edje_object_signal_emit(entice->edje, "EnticeImageDisplay", "");
+ /* let the app know it's ready to be displayed */
+ edje_object_signal_emit(entice->edje, "EnticeImageDisplay", "");
+ }
+ else
+ {
+ fprintf(stderr, "Error Loading Source Image !!!!\n");
+ }
}
return;
_e = NULL;
@@ -518,7 +525,6 @@
}
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 is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs