aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeeyong Um <conr2d@gmail.com>2018-05-01 02:05:52 +0900
committerJeeyong Um <conr2d@gmail.com>2018-05-01 04:46:47 +0900
commit929bcec6b22eb6afc7e525de4d6b15b759de1fd0 (patch)
tree5a9efbbfcd6556202e81e71831688eb029a919c9
parentedje_cc: Use macro to get rid of repeated section (diff)
downloadefl-929bcec6b22eb6afc7e525de4d6b15b759de1fd0.tar.gz
edje_cc: Copy text classes used in style
-rw-r--r--src/bin/edje/edje_cc_handlers.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index 7f5981895c..a5d3e4a176 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -9162,6 +9162,58 @@ st_collections_group_parts_part_description_inherit(void)
IMPORT_DATA(Edje_Text_Class, ted->text.text_class, text_classes);
IMPORT_DATA(Edje_Style, ted->text.style.str, styles);
+ if ((ted->text.style.str) && (pcp->import))
+ {
+ Edje_Style *stl;
+ Edje_Style_Parser *stlp;
+ Eina_List *l;
+
+ EINA_LIST_FOREACH(edje_file->styles, l, stl)
+ {
+ if (!strcmp(ted->text.style.str, stl->name))
+ {
+ stlp = (Edje_Style_Parser *)stl;
+ break;
+ }
+ }
+
+ if (!stl || (stlp->imported))
+ {
+ EINA_LIST_FOREACH(edje_file_import->styles, l, stl)
+ {
+ if (!strcmp(ted->text.style.str, stl->name))
+ break;
+ }
+
+ if (stl)
+ {
+ Edje_Style_Tag *tag;
+ char *tmp;
+
+ EINA_LIST_FOREACH(stl->tags, l, tag)
+ {
+ if (!strcmp(tag->key, "DEFAULT"))
+ break;
+ }
+
+ if (tag && (tmp = strstr(tag->value, "text_class=")))
+ {
+ char buf[512];
+ char *ptr = buf;
+
+ tmp += strlen("text_class=");
+ while (*tmp == ' ') tmp++;
+ while ((*tmp != ' ') && (*tmp != '\0'))
+ *ptr++ = *tmp++;
+ *ptr = '\0';
+
+ ptr = buf;
+ IMPORT_DATA(Edje_Text_Class, ptr, text_classes);
+ }
+ }
+ }
+ }
+
_filter_copy(&ted->filter, &tparent->filter);
data_queue_copied_part_nest_lookup(pc, &(tparent->text.id_source), &(ted->text.id_source), &ted->text.id_source_part);
data_queue_copied_part_nest_lookup(pc, &(tparent->text.id_text_source), &(ted->text.id_text_source), &ted->text.id_text_source_part);