From b5cd76875ed767e133f4077321d411654a5674a0 Mon Sep 17 00:00:00 2001 From: "gliang.wang" Date: Tue, 4 Sep 2012 08:35:53 +0800 Subject: [SR][s1-8344] vconf bs --- src/common/mf-ug-cb.c | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) (limited to 'src/common/mf-ug-cb.c') diff --git a/src/common/mf-ug-cb.c b/src/common/mf-ug-cb.c index f59daa1..418452d 100644 --- a/src/common/mf-ug-cb.c +++ b/src/common/mf-ug-cb.c @@ -1112,19 +1112,38 @@ Eina_Bool mf_ug_cb_thumb_timer_cb(void *data) elm_genlist_item_update(it); } else if (ecore_file_exists(item_data->ug_pItemName->str)) { - char *new_thumb = mf_ug_file_attr_get_file_icon(item_data->ug_pItemName->str, NULL); + char *new_thumb = NULL; + int thumbnail_type = 0; + thumbnail_type = mf_ug_file_attr_get_file_icon(item_data->ug_pItemName->str, NULL, &new_thumb); if (new_thumb) { - if (item_data->ug_pThumbPath) { - free(item_data->ug_pThumbPath); - item_data->ug_pThumbPath = NULL; + if (thumbnail_type == MF_UG_THUMBNAIL_TYPE_DEFAULT) { + if (item_data->ug_pThumbPath && g_strcmp0(new_thumb, item_data->ug_pThumbPath) == 0) { + allright_flag = FALSE; + } else { + if (item_data->ug_pThumbPath) { + free(item_data->ug_pThumbPath); + item_data->ug_pThumbPath = NULL; + } + item_data->ug_pThumbPath = strdup(new_thumb); + item_data->ug_bRealThumbFlag = TRUE; + elm_object_item_data_set(it, item_data); + elm_genlist_item_update(it); + free(new_thumb); + new_thumb = NULL; + } + + } else { + if (item_data->ug_pThumbPath) { + free(item_data->ug_pThumbPath); + item_data->ug_pThumbPath = NULL; + } + item_data->ug_pThumbPath = strdup(new_thumb); + item_data->ug_bRealThumbFlag = TRUE; + elm_object_item_data_set(it, item_data); + elm_genlist_item_update(it); + free(new_thumb); + new_thumb = NULL; } - item_data->ug_pThumbPath = strdup(new_thumb); - item_data->ug_bRealThumbFlag = true; - elm_object_item_data_set(it, item_data); - elm_genlist_item_update(it); - - free(new_thumb); - new_thumb = NULL; } else { allright_flag = false; } -- cgit v1.2.3