summaryrefslogtreecommitdiff
path: root/src/common/mf-ug-cb.c
diff options
context:
space:
mode:
authorgliang.wang <gliang.wang@samsung.com>2012-09-04 08:35:53 +0800
committergliang.wang <gliang.wang@samsung.com>2012-09-04 08:35:53 +0800
commitb5cd76875ed767e133f4077321d411654a5674a0 (patch)
tree3392eba68ecfbc05525cfdcde662dae53ea4c476 /src/common/mf-ug-cb.c
parent95ec5bfcb8c52ecc651e4947ea74dfbd2cf715c0 (diff)
downloadug-myfile-efl-b5cd76875ed767e133f4077321d411654a5674a0.tar.gz
ug-myfile-efl-b5cd76875ed767e133f4077321d411654a5674a0.tar.bz2
ug-myfile-efl-b5cd76875ed767e133f4077321d411654a5674a0.zip
[SR][s1-8344] vconf bs
Diffstat (limited to 'src/common/mf-ug-cb.c')
-rw-r--r--src/common/mf-ug-cb.c41
1 files changed, 30 insertions, 11 deletions
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;
}