summaryrefslogtreecommitdiff
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
parent0b9e9499386ed9b9c40c15a6a02b1d9020b57319 (diff)
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)
9162 IMPORT_DATA(Edje_Text_Class, ted->text.text_class, text_classes); 9162 IMPORT_DATA(Edje_Text_Class, ted->text.text_class, text_classes);
9163 IMPORT_DATA(Edje_Style, ted->text.style.str, styles); 9163 IMPORT_DATA(Edje_Style, ted->text.style.str, styles);
9164 9164
9165 if ((ted->text.style.str) && (pcp->import))
9166 {
9167 Edje_Style *stl;
9168 Edje_Style_Parser *stlp;
9169 Eina_List *l;
9170
9171 EINA_LIST_FOREACH(edje_file->styles, l, stl)
9172 {
9173 if (!strcmp(ted->text.style.str, stl->name))
9174 {
9175 stlp = (Edje_Style_Parser *)stl;
9176 break;
9177 }
9178 }
9179
9180 if (!stl || (stlp->imported))
9181 {
9182 EINA_LIST_FOREACH(edje_file_import->styles, l, stl)
9183 {
9184 if (!strcmp(ted->text.style.str, stl->name))
9185 break;
9186 }
9187
9188 if (stl)
9189 {
9190 Edje_Style_Tag *tag;
9191 char *tmp;
9192
9193 EINA_LIST_FOREACH(stl->tags, l, tag)
9194 {
9195 if (!strcmp(tag->key, "DEFAULT"))
9196 break;
9197 }
9198
9199 if (tag && (tmp = strstr(tag->value, "text_class=")))
9200 {
9201 char buf[512];
9202 char *ptr = buf;
9203
9204 tmp += strlen("text_class=");
9205 while (*tmp == ' ') tmp++;
9206 while ((*tmp != ' ') && (*tmp != '\0'))
9207 *ptr++ = *tmp++;
9208 *ptr = '\0';
9209
9210 ptr = buf;
9211 IMPORT_DATA(Edje_Text_Class, ptr, text_classes);
9212 }
9213 }
9214 }
9215 }
9216
9165 _filter_copy(&ted->filter, &tparent->filter); 9217 _filter_copy(&ted->filter, &tparent->filter);
9166 data_queue_copied_part_nest_lookup(pc, &(tparent->text.id_source), &(ted->text.id_source), &ted->text.id_source_part); 9218 data_queue_copied_part_nest_lookup(pc, &(tparent->text.id_source), &(ted->text.id_source), &ted->text.id_source_part);
9167 data_queue_copied_part_nest_lookup(pc, &(tparent->text.id_text_source), &(ted->text.id_text_source), &ted->text.id_text_source_part); 9219 data_queue_copied_part_nest_lookup(pc, &(tparent->text.id_text_source), &(ted->text.id_text_source), &ted->text.id_text_source_part);