forked from enlightenment/efl
efl_canvas_text: correct password behaviour with efl_text_password_get/set
Summary: In simple words: when we create efl_canvas_text object, efl_text_password_get will return TRUE. which is wrong, efl_text_password_get should return FALSE, unless user change the password using efl_text_password_set Reviewers: woohyun, zmike, segfaultxavi, tasn Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10735
This commit is contained in:
parent
adbf79a3a8
commit
0806b03346
|
@ -7580,6 +7580,7 @@ evas_object_textblock_add(Evas *e)
|
||||||
o = efl_data_scope_get(eo_obj, MY_CLASS);
|
o = efl_data_scope_get(eo_obj, MY_CLASS);
|
||||||
o->legacy_newline = EINA_TRUE;
|
o->legacy_newline = EINA_TRUE;
|
||||||
o->auto_styles = EINA_FALSE;
|
o->auto_styles = EINA_FALSE;
|
||||||
|
_FMT(password) = EINA_TRUE;
|
||||||
return eo_obj;
|
return eo_obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7616,7 +7617,7 @@ _efl_canvas_text_efl_object_constructor(Eo *eo_obj, Efl_Canvas_Text_Data *class_
|
||||||
_FMT(underline_dash_gap) = 2;
|
_FMT(underline_dash_gap) = 2;
|
||||||
_FMT(underline_height) = 1.0;
|
_FMT(underline_height) = 1.0;
|
||||||
_FMT(linerelgap) = 0.0;
|
_FMT(linerelgap) = 0.0;
|
||||||
_FMT(password) = 1;
|
_FMT(password) = EINA_FALSE;
|
||||||
_FMT(ellipsis) = -1;
|
_FMT(ellipsis) = -1;
|
||||||
_FMT_INFO(bitmap_scalable) = EFL_TEXT_FONT_BITMAP_SCALABLE_COLOR;
|
_FMT_INFO(bitmap_scalable) = EFL_TEXT_FONT_BITMAP_SCALABLE_COLOR;
|
||||||
|
|
||||||
|
|
|
@ -4393,6 +4393,16 @@ EFL_START_TEST(efl_canvas_text_simple)
|
||||||
efl_text_set(txt, buf);
|
efl_text_set(txt, buf);
|
||||||
fail_if(strcmp(efl_text_get(txt), buf));
|
fail_if(strcmp(efl_text_get(txt), buf));
|
||||||
|
|
||||||
|
/* Check if password is false by default*/
|
||||||
|
Eina_Bool password = efl_text_password_get(txt);
|
||||||
|
fail_if(password);
|
||||||
|
efl_text_password_set(txt, EINA_TRUE);
|
||||||
|
password = efl_text_password_get(txt);
|
||||||
|
fail_if(!password);
|
||||||
|
efl_text_password_set(txt, EINA_FALSE);
|
||||||
|
password = efl_text_password_get(txt);
|
||||||
|
fail_if(password);
|
||||||
|
|
||||||
END_EFL_CANVAS_TEXT_TEST();
|
END_EFL_CANVAS_TEXT_TEST();
|
||||||
}
|
}
|
||||||
EFL_END_TEST
|
EFL_END_TEST
|
||||||
|
|
Loading…
Reference in New Issue