From 153e9d89d65d3d7d0f947c194b16fffd239771c3 Mon Sep 17 00:00:00 2001 From: Nicolas Aguirre Date: Wed, 29 Sep 2010 17:57:43 +0000 Subject: [PATCH] commit c0d355a3438ba4e9c731d190fa292c0eb9acde23 Author: Otavio Pontes Date: Mon Sep 27 11:32:34 2010 -0300 Fixing some bugs in image exibition. Using photocan to show png files in flow browser and using elm_image instead of elm_bg to display thumbs in thumb_browser. elm_bg was creating a strange border in images with white(or transparent) background. SVN revision: 52902 --- src/bin/ephoto_flow_browser.c | 11 ++--------- src/bin/ephoto_thumb_browser.c | 4 ++-- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/bin/ephoto_flow_browser.c b/src/bin/ephoto_flow_browser.c index 7f7fbb7..c8334a7 100644 --- a/src/bin/ephoto_flow_browser.c +++ b/src/bin/ephoto_flow_browser.c @@ -75,10 +75,9 @@ _ephoto_go_update(Ephoto_Flow_Browser *ef) evas_object_hide(ef->image2); file_type = efreet_mime_type_get(ef->cur_image); - printf("%s\n", file_type); if (file_type && !strcmp(file_type, "image/jpeg")) { - success = elm_photocam_file_set(ef->image, ef->cur_image); + success = (elm_photocam_file_set(ef->image, ef->cur_image) == EVAS_LOAD_ERROR_NONE); elm_layout_content_set(ef->flow_browser, "ephoto.flow.swallow", ef->image); evas_object_show(ef->image); } else { @@ -88,8 +87,6 @@ _ephoto_go_update(Ephoto_Flow_Browser *ef) } if (success) { - char *buffer; - int length; #ifdef HAVE_LIBEXIF int orientation = 0; @@ -137,11 +134,7 @@ _ephoto_go_update(Ephoto_Flow_Browser *ef) } } #endif - - length = strlen(ef->cur_image) + strlen("Ephoto - ") + 1; - buffer = alloca(length); - snprintf(buffer, length, "Ephoto - %s", ef->cur_image); - elm_win_title_set(em->win, buffer); + _ephoto_set_title(ef->cur_image); } elm_toolbar_item_unselect_all(ef->toolbar); diff --git a/src/bin/ephoto_thumb_browser.c b/src/bin/ephoto_thumb_browser.c index 9956bae..6133206 100644 --- a/src/bin/ephoto_thumb_browser.c +++ b/src/bin/ephoto_thumb_browser.c @@ -420,8 +420,8 @@ _ephoto_get_icon(const void *data, Evas_Object *obj, const char *part) evas_object_size_hint_weight_set(thumb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_show(thumb); - o = elm_bg_add(thumb); - elm_bg_file_set(o, etd->thumb_path, NULL); + o = elm_image_add(thumb); + elm_image_file_set(o, etd->thumb_path, NULL); evas_object_resize(o, 176, 117); elm_layout_content_set(thumb, "ephoto.swallow.content", o);