Use eina_stringshare where plausible.
SVN revision: 50119
This commit is contained in:
parent
97b5b3ad0f
commit
4b9816830d
|
@ -18,7 +18,7 @@ static void _ephoto_change_directory(void *data, Evas_Object *obj, void *event_i
|
||||||
/*Inline Variables*/
|
/*Inline Variables*/
|
||||||
static Elm_Gengrid_Item_Class eg;
|
static Elm_Gengrid_Item_Class eg;
|
||||||
static Ethumb_Client *ec;
|
static Ethumb_Client *ec;
|
||||||
static char *current_directory;
|
static const char *current_directory;
|
||||||
static int cur_val;
|
static int cur_val;
|
||||||
static Ecore_Thread *thread = NULL;
|
static Ecore_Thread *thread = NULL;
|
||||||
static Evas_Object *toolbar, *dir_label, *thumb_slider, *thbox;
|
static Evas_Object *toolbar, *dir_label, *thumb_slider, *thbox;
|
||||||
|
@ -35,7 +35,7 @@ ephoto_create_thumb_browser(void)
|
||||||
ec = ethumb_client_connect(_ephoto_thumber_connected, NULL, NULL);
|
ec = ethumb_client_connect(_ephoto_thumber_connected, NULL, NULL);
|
||||||
|
|
||||||
getcwd(buf, PATH_MAX);
|
getcwd(buf, PATH_MAX);
|
||||||
current_directory = strdup(buf);
|
current_directory = eina_stringshare_add(buf);
|
||||||
|
|
||||||
toolbar = elm_toolbar_add(em->win);
|
toolbar = elm_toolbar_add(em->win);
|
||||||
elm_toolbar_icon_size_set(toolbar, 24);
|
elm_toolbar_icon_size_set(toolbar, 24);
|
||||||
|
@ -138,7 +138,7 @@ ephoto_delete_thumb_browser(void)
|
||||||
evas_object_del(eina_list_data_get(items));
|
evas_object_del(eina_list_data_get(items));
|
||||||
items = eina_list_next(items);
|
items = eina_list_next(items);
|
||||||
}
|
}
|
||||||
free(current_directory);
|
eina_stringshare_del(current_directory);
|
||||||
evas_object_del(toolbar);
|
evas_object_del(toolbar);
|
||||||
evas_object_del(em->thumb_browser);
|
evas_object_del(em->thumb_browser);
|
||||||
evas_object_del(dir_label);
|
evas_object_del(dir_label);
|
||||||
|
@ -218,7 +218,7 @@ ephoto_populate_thumbnails(void)
|
||||||
|
|
||||||
it = eina_file_ls(current_directory);
|
it = eina_file_ls(current_directory);
|
||||||
if (!it) return ;
|
if (!it) return ;
|
||||||
|
printf("%s\n", current_directory);
|
||||||
thread = ecore_long_run(_ephoto_access_disk,
|
thread = ecore_long_run(_ephoto_access_disk,
|
||||||
_ephoto_populate_notify,
|
_ephoto_populate_notify,
|
||||||
_ephoto_populate_end,
|
_ephoto_populate_end,
|
||||||
|
@ -382,8 +382,8 @@ _ephoto_directory_chosen(void *data, Evas_Object *obj, void *event_info)
|
||||||
if (directory && strcmp(directory, current_directory))
|
if (directory && strcmp(directory, current_directory))
|
||||||
{
|
{
|
||||||
elm_gengrid_clear(em->thumb_browser);
|
elm_gengrid_clear(em->thumb_browser);
|
||||||
free(current_directory);
|
eina_stringshare_del(current_directory);
|
||||||
current_directory = strdup(directory);
|
current_directory = eina_stringshare_add(directory);
|
||||||
eina_list_free(em->images);
|
eina_list_free(em->images);
|
||||||
em->images = NULL;
|
em->images = NULL;
|
||||||
ephoto_populate_thumbnails();
|
ephoto_populate_thumbnails();
|
||||||
|
|
Loading…
Reference in New Issue