From: Enlightenment S. <no-...@en...> - 2010-07-08 18:53:25
|
Log: Better use of the stringshare_replace function. Once again gracias k-s. Author: titan Date: 2010-07-08 11:53:18 -0700 (Thu, 08 Jul 2010) New Revision: 50130 Modified: trunk/ephoto/src/bin/ephoto_thumb_browser.c Modified: trunk/ephoto/src/bin/ephoto_thumb_browser.c =================================================================== --- trunk/ephoto/src/bin/ephoto_thumb_browser.c 2010-07-08 18:45:27 UTC (rev 50129) +++ trunk/ephoto/src/bin/ephoto_thumb_browser.c 2010-07-08 18:53:18 UTC (rev 50130) @@ -403,24 +403,21 @@ directory = elm_fileselector_selected_get(obj); - if (directory && directory != current_directory) + if ((directory) && (eina_stringshare_replace(¤t_directory, directory))) { - if (eina_stringshare_replace(¤t_directory, directory)) - { - l = elm_gengrid_items_get(em->thumb_browser); - EINA_LIST_FOREACH(l, iter, item) - { - etd = (Ephoto_Thumb_Data *)elm_gengrid_item_data_get(item); - eina_stringshare_del(etd->thumb_path); - eina_stringshare_del(etd->file); - free(etd); - } - elm_gengrid_clear(em->thumb_browser); - eina_list_free(em->images); - em->images = NULL; - ephoto_populate_thumbnails(); - elm_label_label_set(dir_label, current_directory); - } + l = elm_gengrid_items_get(em->thumb_browser); + EINA_LIST_FOREACH(l, iter, item) + { + etd = (Ephoto_Thumb_Data *)elm_gengrid_item_data_get(item); + eina_stringshare_del(etd->thumb_path); + eina_stringshare_del(etd->file); + free(etd); + } + elm_gengrid_clear(em->thumb_browser); + eina_list_free(em->images); + em->images = NULL; + ephoto_populate_thumbnails(); + elm_label_label_set(dir_label, current_directory); } evas_object_del(obj); evas_object_del(win); |