Edje min_calc: Don't print the 4000x4000 err when there's a textblock.
authortasn <tasn>
Mon, 2 May 2011 10:20:20 +0000 (10:20 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 2 May 2011 10:20:20 +0000 (10:20 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@59112 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/edje_util.c

index 6408c8b..31de03a 100644 (file)
@@ -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)
               {