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
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).
* Add accessibility flags and API to retrieve the relevant part.
* Emit signal when flagged part size get to zero.
* Warn at compile time about forgotten image.
Improvements:
* 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;
#if 0 /* FIXME: This check sounds like not a useful one */
if (epd->image.id == -1)
ERR(ef, "Collection %s(%i): image attributes missing for "
"part \"%s\", description \"%s\" %f\n",
/* FIXME: This check sounds like not a useful one */
if (epd->image.id == -1 && epd->common.visible)
WRN("Collection %s(%i): image attributes missing for "
"part \"%s\", description \"%s\" %f",
pc->part, pc->id, ep->name, epd->common.state.name, epd->common.state.value);
#endif
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))
{
image_id = _edje_image_find(ep->object, ed,
&ep->param2->set,
(Edje_Part_Description_Image*) ep->param2->description,
NULL);
image_id = _edje_image_find(ep->object, ed,
&ep->param2->set,
(Edje_Part_Description_Image*) ep->param2->description,
NULL);
}
else
{
@ -435,11 +435,13 @@ _edje_real_part_image_set(Edje *ed, Edje_Real_Part *ep, FLOAT_T pos)
}
if (image_id < 0)
{
ERR("¨Part \"%s\" has description, "
"\"%s\" %3.3f with a missing image id!!!",
ERR("¨Part \"%s\" description, "
"\"%s\" %3.3f with image %i index has a missing image id in a set of %i !!!",
ep->part->name,
ep->param1.description->state.name,
ep->param1.description->state.value);
ep->param1.description->state.value,
image_num,
image_count);
}
else
{