summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Alzyod <ali198724@gmail.com>2019-12-02 10:56:12 +0900
committerWooHyun Jung <wh0705.jung@samsung.com>2019-12-02 10:56:13 +0900
commit0806b03346e49547c6c8d867eac70b9ed01fabda (patch)
treecd476566d3eb5a1b99fccefc0b717b6cd173fd68
parentadbf79a3a818dc57bf440c6c203761895bd4f004 (diff)
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
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c3
-rw-r--r--src/tests/evas/evas_test_textblock.c10
2 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index 75c4be5529..06c559688d 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -7580,6 +7580,7 @@ evas_object_textblock_add(Evas *e)
7580 o = efl_data_scope_get(eo_obj, MY_CLASS); 7580 o = efl_data_scope_get(eo_obj, MY_CLASS);
7581 o->legacy_newline = EINA_TRUE; 7581 o->legacy_newline = EINA_TRUE;
7582 o->auto_styles = EINA_FALSE; 7582 o->auto_styles = EINA_FALSE;
7583 _FMT(password) = EINA_TRUE;
7583 return eo_obj; 7584 return eo_obj;
7584} 7585}
7585 7586
@@ -7616,7 +7617,7 @@ _efl_canvas_text_efl_object_constructor(Eo *eo_obj, Efl_Canvas_Text_Data *class_
7616 _FMT(underline_dash_gap) = 2; 7617 _FMT(underline_dash_gap) = 2;
7617 _FMT(underline_height) = 1.0; 7618 _FMT(underline_height) = 1.0;
7618 _FMT(linerelgap) = 0.0; 7619 _FMT(linerelgap) = 0.0;
7619 _FMT(password) = 1; 7620 _FMT(password) = EINA_FALSE;
7620 _FMT(ellipsis) = -1; 7621 _FMT(ellipsis) = -1;
7621 _FMT_INFO(bitmap_scalable) = EFL_TEXT_FONT_BITMAP_SCALABLE_COLOR; 7622 _FMT_INFO(bitmap_scalable) = EFL_TEXT_FONT_BITMAP_SCALABLE_COLOR;
7622 7623
diff --git a/src/tests/evas/evas_test_textblock.c b/src/tests/evas/evas_test_textblock.c
index f23d8b8489..4c33a8fd43 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -4393,6 +4393,16 @@ EFL_START_TEST(efl_canvas_text_simple)
4393 efl_text_set(txt, buf); 4393 efl_text_set(txt, buf);
4394 fail_if(strcmp(efl_text_get(txt), buf)); 4394 fail_if(strcmp(efl_text_get(txt), buf));
4395 4395
4396 /* Check if password is false by default*/
4397 Eina_Bool password = efl_text_password_get(txt);
4398 fail_if(password);
4399 efl_text_password_set(txt, EINA_TRUE);
4400 password = efl_text_password_get(txt);
4401 fail_if(!password);
4402 efl_text_password_set(txt, EINA_FALSE);
4403 password = efl_text_password_get(txt);
4404 fail_if(password);
4405
4396 END_EFL_CANVAS_TEXT_TEST(); 4406 END_EFL_CANVAS_TEXT_TEST();
4397} 4407}
4398EFL_END_TEST 4408EFL_END_TEST