From 397acdd837cab0a4af000b4233f0183d01f65369 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Mon, 2 May 2011 10:20:20 +0000 Subject: [PATCH] Edje min_calc: Don't print the 4000x4000 err when there's a textblock. SVN revision: 59112 --- legacy/edje/src/lib/edje_util.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/legacy/edje/src/lib/edje_util.c b/legacy/edje/src/lib/edje_util.c index 6408c8b3c2..31de03afe1 100644 --- a/legacy/edje/src/lib/edje_util.c +++ b/legacy/edje/src/lib/edje_util.c @@ -2152,6 +2152,7 @@ edje_object_size_min_restricted_calc(Evas_Object *obj, Evas_Coord *minw, Evas_Co int ok; int reset_maxwh; Edje_Real_Part *pep = NULL; + Eina_Bool has_non_fixed_tb = EINA_FALSE; ed = _edje_fetch(obj); if ((!ed) || (!ed->collection)) @@ -2213,6 +2214,7 @@ edje_object_size_min_restricted_calc(Evas_Object *obj, Evas_Coord *minw, Evas_Co { w = tb_mw; } + has_non_fixed_tb = EINA_TRUE; } if (w > maxw) { @@ -2234,6 +2236,7 @@ edje_object_size_min_restricted_calc(Evas_Object *obj, Evas_Coord *minw, Evas_Co ok = 1; pep = ep; } + has_non_fixed_tb = EINA_TRUE; } } } @@ -2247,12 +2250,18 @@ edje_object_size_min_restricted_calc(Evas_Object *obj, Evas_Coord *minw, Evas_Co } if ((ed->w > 4000) || (ed->h > 4000)) { - if (pep) - ERR("file %s, group %s has a non-fixed part '%s'. Adding 'fixed: 1 1;' to source EDC may help. Continuing discarding faulty part.", - ed->path, ed->group, pep->part->name); - else - ERR("file %s, group %s overflowed 4000x4000 with minimum size of %dx%d. Continuing discarding faulty parts.", - ed->path, ed->group, ed->w, ed->h); + /* Only print it if we have a non-fixed textblock. + * We should possibly avoid all of this if in this case, but in + * the meanwhile, just doing this. */ + if (!has_non_fixed_tb) + { + if (pep) + ERR("file %s, group %s has a non-fixed part '%s'. Adding 'fixed: 1 1;' to source EDC may help. Continuing discarding faulty part.", + ed->path, ed->group, pep->part->name); + else + ERR("file %s, group %s overflowed 4000x4000 with minimum size of %dx%d. Continuing discarding faulty parts.", + ed->path, ed->group, ed->w, ed->h); + } if (reset_maxwh) {