summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2014-04-22 20:18:46 -0400
committerMike Blumenkrantz <zmike@samsung.com>2014-04-22 20:21:46 -0400
commitadcc32329128b13fda47405a896319c7c96ea85f (patch)
tree77b4244c4cd1131cc83f4796101aab664da3b98e
parentc2ced46d2d07980153f0d4809d865f7e228d3b7d (diff)
edje: the ellipsis fuckup preservation commit.
what a huge, colossal cock-up of a clusterfuck. it's a good thing nobody ever uses ellipses or edje. otherwise we'd probably get complaints about this kind of thing.
-rw-r--r--src/bin/edje/edje_cc_handlers.c3
-rw-r--r--src/lib/edje/edje_private.h2
-rw-r--r--src/lib/edje/edje_text.c24
3 files changed, 26 insertions, 3 deletions
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index 829c465..fe06e46 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -949,6 +949,7 @@ _edje_part_description_alloc(unsigned char type, const char *collection, const c
949 ed->text.align.y = FROM_DOUBLE(0.5); 949 ed->text.align.y = FROM_DOUBLE(0.5);
950 ed->text.id_source = -1; 950 ed->text.id_source = -1;
951 ed->text.id_text_source = -1; 951 ed->text.id_text_source = -1;
952 ed->text.elipsis = -1;
952 953
953 result = &ed->common; 954 result = &ed->common;
954 break; 955 break;
@@ -7566,7 +7567,7 @@ st_collections_group_parts_part_description_text_text_source(void)
7566 @effect 7567 @effect
7567 Used to balance the text in a relative point from 0.0 to 1.0, this 7568 Used to balance the text in a relative point from 0.0 to 1.0, this
7568 point is the last section of the string to be cut out in case of a 7569 point is the last section of the string to be cut out in case of a
7569 resize that is smaller than the text itself. The default value is 0.0. 7570 resize that is smaller than the text itself. The default value is -1.0.
7570 @endproperty 7571 @endproperty
7571*/ 7572*/
7572static void 7573static void
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 28fb179..96adb6e 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -165,7 +165,7 @@ EAPI extern int _edje_default_log_dom ;
165/* increment this when you add new feature to edje file format without 165/* increment this when you add new feature to edje file format without
166 * breaking backward compatibility. 166 * breaking backward compatibility.
167 */ 167 */
168#define EDJE_FILE_MINOR 5 168#define EDJE_FILE_MINOR 6
169 169
170/* FIXME: 170/* FIXME:
171 * 171 *
diff --git a/src/lib/edje/edje_text.c b/src/lib/edje/edje_text.c
index 45e32ac..0825c16 100644
--- a/src/lib/edje/edje_text.c
+++ b/src/lib/edje/edje_text.c
@@ -411,7 +411,29 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
411 text, font, size, 411 text, font, size,
412 sw, sh, &free_text); 412 sw, sh, &free_text);
413 } 413 }
414 else 414 /* when evas ellipsis support was added in efl 1.8 and used to replace
415 * previous support, SOMEONE, who I shall call "cedric", borked ellipsis
416 * defaults. as a result, edje_cc continued using 0.0 (left-most) as its default value
417 * for ellipsis while evas used -1.0 (no ellipsizing).
418 * this was moderately okay for a time because nobody was using it or GROUP parts
419 * with text in them very frequently, and so nobody noticed that the mismatch was breaking
420 * sizing in some cases when the edje ellipsis value failed to be applied,
421 * which ocurred any time text.min_x was set; in this case, ellipsis would NEVER be
422 * correctly applied, and instead the text object would only ever get the first
423 * ellipsis_set(0), permanently breaking the part.
424 * the only way to fix this while preserving previous behavior was to bump
425 * the edje file minor version and then check it here to ignore "unset" ellipsis
426 * values from old file versions.
427 * the downside is that this will break old files which have text.min_x set to 0...maybe.
428 * it also breaks documentation since the default value for edje has "become" -1.0 in order
429 * to preserve the expected behavior of leaving it alone permanently except for the initial
430 * set to 0.0.
431 *
432 * -zmike
433 * 22 April 2014
434 */
435 else if (((ed->file->version >= 3) && (ed->file->minor >= 6)) ||
436 params->type.text.elipsis)
415 eo_do(ep->object, 437 eo_do(ep->object,
416 evas_obj_text_ellipsis_set(params->type.text.elipsis)); 438 evas_obj_text_ellipsis_set(params->type.text.elipsis));
417 439