summaryrefslogtreecommitdiff
path: root/src/common/mf-ug-cb.c
diff options
context:
space:
mode:
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;
}