summaryrefslogtreecommitdiff
path: root/src/bin/edje
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-07-15 12:22:22 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-07-15 12:22:22 +0100
commita8538bacce1457a91e28b39a6417eaadb4744b50 (patch)
tree078fd1ed0519b96262e74067fa33a09d19e6d43a /src/bin/edje
parent42e3411ed7dacc652bd1c64d94941d7ac6aa67c4 (diff)
edje - fix edje_cc mis-re-iding images in image sets
wanr of unused images so it's properly fixed too... always warn to stdout so devs know to cleanup their theme. by not removing image sets this fixes the mis-id'ing too. @fix
Diffstat (limited to 'src/bin/edje')
-rw-r--r--src/bin/edje/edje_cc_out.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c
index 3c60bea810..dc00b37b0a 100644
--- a/src/bin/edje/edje_cc_out.c
+++ b/src/bin/edje/edje_cc_out.c
@@ -3506,7 +3506,7 @@ _data_image_h_size_compare_cb(const void *data1, const void *data2)
3506} 3506}
3507 3507
3508static void 3508static void
3509_data_image_sets_size_set() 3509_data_image_sets_size_set(void)
3510{ 3510{
3511 Evas *evas; 3511 Evas *evas;
3512 Edje_Image_Directory_Set *set; 3512 Edje_Image_Directory_Set *set;
@@ -4026,11 +4026,12 @@ free_group:
4026 if (de->entry && eina_hash_find(images_in_use, de->entry)) 4026 if (de->entry && eina_hash_find(images_in_use, de->entry))
4027 continue; 4027 continue;
4028 4028
4029 printf("Warning: Image '%s' not used\n", de->entry);
4029 INF("Image '%s' in resource 'edje/image/%i' will not be included as it is unused.", 4030 INF("Image '%s' in resource 'edje/image/%i' will not be included as it is unused.",
4030 de->entry, de->id); 4031 de->entry, de->id);
4031 4032
4032 /* so as not to write the unused images, moved last image in the 4033 // so as not to write the unused images, moved last image in the
4033 list to unused image position and check it */ 4034 // list to unused image position and check it
4034 free((void *)de->entry); 4035 free((void *)de->entry);
4035 de->entry = NULL; 4036 de->entry = NULL;
4036 de_last = edje_file->image_dir->entries + edje_file->image_dir->entries_count - 1; 4037 de_last = edje_file->image_dir->entries + edje_file->image_dir->entries_count - 1;
@@ -4039,8 +4040,8 @@ free_group:
4039 images_unused_list = eina_list_append(images_unused_list, iui); 4040 images_unused_list = eina_list_append(images_unused_list, iui);
4040 iui->new_id = i; 4041 iui->new_id = i;
4041 de_last->id = i; 4042 de_last->id = i;
4042 memcpy(de, de_last, sizeof (Edje_Image_Directory_Entry)); 4043 memcpy(de, de_last, sizeof(Edje_Image_Directory_Entry));
4043 --i; /* need to check a moved image on this index */ 4044 --i; // need to check a moved image on this index
4044 edje_file->image_dir->entries_count--; 4045 edje_file->image_dir->entries_count--;
4045 img = realloc(edje_file->image_dir->entries, 4046 img = realloc(edje_file->image_dir->entries,
4046 sizeof (Edje_Image_Directory_Entry) * edje_file->image_dir->entries_count); 4047 sizeof (Edje_Image_Directory_Entry) * edje_file->image_dir->entries_count);
@@ -4054,6 +4055,17 @@ free_group:
4054 if (set->name && eina_hash_find(images_in_use, set->name)) 4055 if (set->name && eina_hash_find(images_in_use, set->name))
4055 continue; 4056 continue;
4056 4057
4058 printf("Warning: Image set '%s' not used\n", set->name);
4059 EINA_LIST_FOREACH(set->entries, l, set_e)
4060 {
4061 printf(" Contains '%s' size %ix%i -> %ix%i\n",
4062 set_e->name,
4063 set_e->size.min.w, set_e->size.min.h,
4064 set_e->size.max.w, set_e->size.max.h);
4065 }
4066/* No need to redo id's - we will warn of unused images - fix in src
4067 * Also .. this is broken and messes up id's ... so easyer - complain
4068 * to develoepr to clean up the theme...
4057 INF("Set '%s' will not be included as it is unused.", set->name); 4069 INF("Set '%s' will not be included as it is unused.", set->name);
4058 4070
4059 free((void *)set->name); 4071 free((void *)set->name);
@@ -4075,6 +4087,7 @@ free_group:
4075 set_realloc = realloc(edje_file->image_dir->sets, 4087 set_realloc = realloc(edje_file->image_dir->sets,
4076 sizeof(Edje_Image_Directory_Set) * edje_file->image_dir->sets_count); 4088 sizeof(Edje_Image_Directory_Set) * edje_file->image_dir->sets_count);
4077 edje_file->image_dir->sets = set_realloc; 4089 edje_file->image_dir->sets = set_realloc;
4090 */
4078 } 4091 }
4079 4092
4080 /* update image id in parts */ 4093 /* update image id in parts */