edje: warn at compile time about forgotten image.

NOTE: You need to enable at least Eina_Log warning level
to see them.


SVN revision: 73784
This commit is contained in:
Cedric BAIL 2012-07-13 02:50:58 +00:00
parent b771724512
commit 8f75f66c44
4 changed files with 18 additions and 12 deletions

View File

@ -523,3 +523,7 @@
* Text classes: Fixed edje_text_class_set to behave like * Text classes: Fixed edje_text_class_set to behave like
edje_object_text_class_set (and as expected) wrt NULL fonts. edje_object_text_class_set (and as expected) wrt NULL fonts.
2012-07-12 Cedric Bail
* Warn at compile time about forgotten image definition.

View File

@ -11,6 +11,7 @@ Additions:
process (Use it to replace RECT part that are never visible and never catch any event). process (Use it to replace RECT part that are never visible and never catch any event).
* Add accessibility flags and API to retrieve the relevant part. * Add accessibility flags and API to retrieve the relevant part.
* Emit signal when flagged part size get to zero. * Emit signal when flagged part size get to zero.
* Warn at compile time about forgotten image.
Improvements: Improvements:
* Allocate once and reuse Evas_Map. * Allocate once and reuse Evas_Map.

View File

@ -226,12 +226,11 @@ check_image_part_desc(Edje_Part_Collection *pc, Edje_Part *ep,
{ {
unsigned int i; unsigned int i;
#if 0 /* FIXME: This check sounds like not a useful one */ /* FIXME: This check sounds like not a useful one */
if (epd->image.id == -1) if (epd->image.id == -1 && epd->common.visible)
ERR(ef, "Collection %s(%i): image attributes missing for " WRN("Collection %s(%i): image attributes missing for "
"part \"%s\", description \"%s\" %f\n", "part \"%s\", description \"%s\" %f",
pc->part, pc->id, ep->name, epd->common.state.name, epd->common.state.value); pc->part, pc->id, ep->name, epd->common.state.name, epd->common.state.value);
#endif
for (i = 0; i < epd->image.tweens_count; ++i) for (i = 0; i < epd->image.tweens_count; ++i)
{ {

View File

@ -420,10 +420,10 @@ _edje_real_part_image_set(Edje *ed, Edje_Real_Part *ep, FLOAT_T pos)
{ {
if (image_num == (image_count - 1)) if (image_num == (image_count - 1))
{ {
image_id = _edje_image_find(ep->object, ed, image_id = _edje_image_find(ep->object, ed,
&ep->param2->set, &ep->param2->set,
(Edje_Part_Description_Image*) ep->param2->description, (Edje_Part_Description_Image*) ep->param2->description,
NULL); NULL);
} }
else else
{ {
@ -435,11 +435,13 @@ _edje_real_part_image_set(Edje *ed, Edje_Real_Part *ep, FLOAT_T pos)
} }
if (image_id < 0) if (image_id < 0)
{ {
ERR("¨Part \"%s\" has description, " ERR("¨Part \"%s\" description, "
"\"%s\" %3.3f with a missing image id!!!", "\"%s\" %3.3f with image %i index has a missing image id in a set of %i !!!",
ep->part->name, ep->part->name,
ep->param1.description->state.name, ep->param1.description->state.name,
ep->param1.description->state.value); ep->param1.description->state.value,
image_num,
image_count);
} }
else else
{ {