elementary: remove redundant parts_text_fix from Elm.Layout
Summary: When a theme is loaded, Elm.Layout updates strings with new theme. This adjustment will be performed by Edje. (See D4219) Reviewers: cedric, jpeg Subscribers: taxi2se Differential Revision: https://phab.enlightenment.org/D4220
This commit is contained in:
parent
4fc6d3cf90
commit
30ec592638
|
@ -93,10 +93,6 @@ struct _Elm_Layout_Sub_Object_Data
|
|||
{
|
||||
unsigned short col, row, colspan, rowspan;
|
||||
} table;
|
||||
struct
|
||||
{
|
||||
const char *text;
|
||||
} text;
|
||||
} p;
|
||||
};
|
||||
|
||||
|
@ -232,24 +228,6 @@ _parts_signals_emit(Elm_Layout_Smart_Data *sd)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_parts_text_fix(Elm_Layout_Smart_Data *sd)
|
||||
{
|
||||
const Eina_List *l;
|
||||
Elm_Layout_Sub_Object_Data *sub_d;
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(sd->obj, wd);
|
||||
|
||||
EINA_LIST_FOREACH(sd->subs, l, sub_d)
|
||||
{
|
||||
if (sub_d->type == TEXT)
|
||||
{
|
||||
edje_object_part_text_escaped_set
|
||||
(wd->resize_obj, sub_d->part,
|
||||
sub_d->p.text.text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_part_cursor_part_apply(const Elm_Layout_Sub_Object_Cursor *pc)
|
||||
{
|
||||
|
@ -325,7 +303,6 @@ _visuals_refresh(Evas_Object *obj,
|
|||
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
|
||||
|
||||
_parts_text_fix(sd);
|
||||
_parts_signals_emit(sd);
|
||||
_parts_cursors_apply(sd);
|
||||
|
||||
|
@ -800,10 +777,6 @@ _elm_layout_efl_canvas_group_group_del(Eo *obj, Elm_Layout_Smart_Data *sd)
|
|||
EINA_LIST_FREE(sd->subs, sub_d)
|
||||
{
|
||||
eina_stringshare_del(sub_d->part);
|
||||
|
||||
if (sub_d->type == TEXT)
|
||||
eina_stringshare_del(sub_d->p.text.text);
|
||||
|
||||
free(sub_d);
|
||||
}
|
||||
|
||||
|
@ -1283,7 +1256,6 @@ _elm_layout_text_set(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part, const
|
|||
if (!text)
|
||||
{
|
||||
eina_stringshare_del(sub_d->part);
|
||||
eina_stringshare_del(sub_d->p.text.text);
|
||||
free(sub_d);
|
||||
edje_object_part_text_escaped_set
|
||||
(wd->resize_obj, part, NULL);
|
||||
|
@ -1293,7 +1265,6 @@ _elm_layout_text_set(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part, const
|
|||
else
|
||||
break;
|
||||
}
|
||||
sub_d = NULL;
|
||||
}
|
||||
|
||||
if (!text) return EINA_TRUE;
|
||||
|
@ -1311,8 +1282,6 @@ _elm_layout_text_set(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part, const
|
|||
sd->subs = eina_list_append(sd->subs, sub_d);
|
||||
}
|
||||
|
||||
eina_stringshare_replace(&sub_d->p.text.text, text);
|
||||
|
||||
_text_signal_emit(sd, sub_d, !!text);
|
||||
|
||||
elm_obj_layout_sizing_eval(obj);
|
||||
|
|
Loading…
Reference in New Issue