Better use of the stringshare_replace function. Once again gracias k-s.

SVN revision: 50130
v-1.6.0
titan 13 years ago committed by titan
parent 0459ed3022
commit 6e63b962bd
  1. 31
      src/bin/ephoto_thumb_browser.c

@ -403,24 +403,21 @@ _ephoto_directory_chosen(void *data, Evas_Object *obj, void *event_info)
directory = elm_fileselector_selected_get(obj);
if (directory && directory != current_directory)
if ((directory) && (eina_stringshare_replace(&current_directory, directory)))
{
if (eina_stringshare_replace(&current_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);

Loading…
Cancel
Save