[EGIT] [core/efl] master 05/05: edje_entry: Add matching tag.
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=5eb7ae8b586af4dccfc267a9b773ecf1d0ee75bd commit 5eb7ae8b586af4dccfc267a9b773ecf1d0ee75bd Author: Subodh Kumar Date: Fri Jan 24 14:49:03 2020 + edje_entry: Add matching tag. When textblock has several other tags which are closing as , textblock is not able to find the matching one. @fix Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D11172 --- src/lib/edje/edje_entry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c index eb63c4f61f..6afd99472a 100644 --- a/src/lib/edje/edje_entry.c +++ b/src/lib/edje/edje_entry.c @@ -853,7 +853,7 @@ _edje_anchor_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EIN { an->en->have_link_pressed = EINA_TRUE; evas_textblock_cursor_format_append(an->start, ""); - evas_textblock_cursor_format_prepend(an->end, ""); + evas_textblock_cursor_format_prepend(an->end, ""); } } ev->event_flags |= rp->mask_flags; --
[EGIT] [core/efl] master 04/06: edje: Add text change signal
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f86dbae7e3621ce8766a1fc782f4304fde0f45e3 commit f86dbae7e3621ce8766a1fc782f4304fde0f45e3 Author: Subodh Kumar Date: Tue Dec 3 10:56:00 2019 + edje: Add text change signal There is no way to know about text changes in edc. This signal will help developer to know about text changes and do some operation based on that. @feature Co-authored-by: Cedric BAIL Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D10780 --- src/lib/edje/edje_util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c index 2acfce3282..f699f835ff 100644 --- a/src/lib/edje/edje_util.c +++ b/src/lib/edje/edje_util.c @@ -2043,6 +2043,8 @@ _edje_object_part_text_raw_generic_set(Edje *ed, Evas_Object *obj, Edje_Real_Par _edje_recalc(ed); if (ed->text_change.func) ed->text_change.func(ed->text_change.data, obj, part); + edje_object_signal_emit(ed->obj, "edje,text,changed", "edje"); + return EINA_TRUE; } --
[EGIT] [core/efl] efl-1.20 06/47: edje_edit: duplicate assignment to variable.
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=ea7d87f05f7d65651853b601f9b03ce7a807dca5 commit ea7d87f05f7d65651853b601f9b03ce7a807dca5 Author: Subodh Kumar <s7158.ku...@samsung.com> Date: Mon Oct 16 13:27:35 2017 -0700 edje_edit: duplicate assignment to variable. Summary: Avoid duplicate assignment to same variable. @fix Reviewers: cedric, jpeg Reviewed By: cedric, jpeg Subscribers: shilpasingh, jpeg Differential Revision: https://phab.enlightenment.org/D5275 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/edje/edje_edit.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c index 16839baea5..f3fb546bca 100644 --- a/src/lib/edje/edje_edit.c +++ b/src/lib/edje/edje_edit.c @@ -14186,9 +14186,6 @@ fill: size_abs = ((img->image.fill.abs_x == 0) && (img->image.fill.abs_y == 0)) ? EINA_FALSE : EINA_TRUE; } - - - attr_amount = smooth + type; attr_orig_amount = orig_rel + orig_abs; attr_size_amount = size_rel + size_abs; attr_amount = smooth + type + attr_orig_amount + attr_size_amount; @@ -14532,9 +14529,6 @@ fill_proxy: size_abs = ((pro->proxy.fill.abs_x == 0) && (pro->proxy.fill.abs_y == 0)) ? EINA_FALSE : EINA_TRUE; } - - - attr_amount = smooth + type; attr_orig_amount = orig_rel + orig_abs; attr_size_amount = size_rel + size_abs; attr_amount = smooth + type + attr_orig_amount + attr_size_amount; --
[EGIT] [core/efl] efl-1.20 07/47: ecore_wayland: fix assigned value is never used.
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=c5efbda95952579de0ed24400e5636fb8bc16b51 commit c5efbda95952579de0ed24400e5636fb8bc16b51 Author: Subodh Kumar <s7158.ku...@samsung.com> Date: Mon Oct 16 13:28:08 2017 -0700 ecore_wayland: fix assigned value is never used. Summary: Fix assigned value is never used. @fix Reviewers: cedric Subscribers: shilpasingh, jpeg Differential Revision: https://phab.enlightenment.org/D5283 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/ecore_wayland/ecore_wl_dnd.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lib/ecore_wayland/ecore_wl_dnd.c b/src/lib/ecore_wayland/ecore_wl_dnd.c index f40eaf7e68..a7694c1587 100644 --- a/src/lib/ecore_wayland/ecore_wl_dnd.c +++ b/src/lib/ecore_wayland/ecore_wl_dnd.c @@ -769,10 +769,9 @@ static void _ecore_wl_dnd_source_cb_target(void *data, struct wl_data_source *source EINA_UNUSED, const char *mime_type EINA_UNUSED) { Ecore_Wl_Event_Data_Source_Target *event; - Ecore_Wl_Input *input; LOGFN(__FILE__, __LINE__, __FUNCTION__); - if (!(input = data)) return; + if (!data) return; if (!(event = calloc(1, sizeof(Ecore_Wl_Event_Data_Source_Target return; @@ -800,11 +799,10 @@ static void _ecore_wl_dnd_source_cb_send(void *data, struct wl_data_source *source EINA_UNUSED, const char *mime_type, int32_t fd) { Ecore_Wl_Event_Data_Source_Send *event; - Ecore_Wl_Input *input; LOGFN(__FILE__, __LINE__, __FUNCTION__); - if (!(input = data)) return; + if (!data) return; if (!(event = calloc(1, sizeof(Ecore_Wl_Event_Data_Source_Send return; --
[EGIT] [core/efl] master 01/06: edje_edit: duplicate assignment to variable.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=230810c4c4f03519fd3167244757983b865a94bc commit 230810c4c4f03519fd3167244757983b865a94bc Author: Subodh Kumar <s7158.ku...@samsung.com> Date: Mon Oct 16 13:27:35 2017 -0700 edje_edit: duplicate assignment to variable. Summary: Avoid duplicate assignment to same variable. @fix Reviewers: cedric, jpeg Reviewed By: cedric, jpeg Subscribers: shilpasingh, jpeg Differential Revision: https://phab.enlightenment.org/D5275 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/edje/edje_edit.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c index f12eeb355c..0a83ff0739 100644 --- a/src/lib/edje/edje_edit.c +++ b/src/lib/edje/edje_edit.c @@ -14186,9 +14186,6 @@ fill: size_abs = ((img->image.fill.abs_x == 0) && (img->image.fill.abs_y == 0)) ? EINA_FALSE : EINA_TRUE; } - - - attr_amount = smooth + type; attr_orig_amount = orig_rel + orig_abs; attr_size_amount = size_rel + size_abs; attr_amount = smooth + type + attr_orig_amount + attr_size_amount; @@ -14532,9 +14529,6 @@ fill_proxy: size_abs = ((pro->proxy.fill.abs_x == 0) && (pro->proxy.fill.abs_y == 0)) ? EINA_FALSE : EINA_TRUE; } - - - attr_amount = smooth + type; attr_orig_amount = orig_rel + orig_abs; attr_size_amount = size_rel + size_abs; attr_amount = smooth + type + attr_orig_amount + attr_size_amount; --
[EGIT] [core/efl] master 02/23: eina: comparing unsigned integer with less than zero.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=be63db00a71bf1b5b3da59c29e0b3fb569b0ba90 commit be63db00a71bf1b5b3da59c29e0b3fb569b0ba90 Author: Subodh Kumar <s7158.ku...@samsung.com> Date: Fri Oct 13 11:46:28 2017 -0700 eina: comparing unsigned integer with less than zero. Summary: Unsigned integer should not be compared less than zero. Test Plan: NA Reviewers: cedric Subscribers: shilpasingh, jpeg Differential Revision: https://phab.enlightenment.org/D5274 Signed-off-by: Cedric Bail <ced...@osg.samsung.com> --- src/lib/eina/eina_share_common.c | 2 +- src/lib/eina/eina_strbuf.c | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/eina/eina_share_common.c b/src/lib/eina/eina_share_common.c index 6ad55b7053..e7ba2a72d2 100644 --- a/src/lib/eina/eina_share_common.c +++ b/src/lib/eina/eina_share_common.c @@ -740,7 +740,7 @@ eina_share_common_add_length(Eina_Share *share, eina_share_common_population_add(share, slen); - if (slen <= 0) + if (slen == 0) return NULL; hash = eina_hash_superfast(str, slen); diff --git a/src/lib/eina/eina_strbuf.c b/src/lib/eina/eina_strbuf.c index f18408d59e..a76e4418ea 100644 --- a/src/lib/eina/eina_strbuf.c +++ b/src/lib/eina/eina_strbuf.c @@ -94,7 +94,7 @@ eina_strbuf_append_printf(Eina_Strbuf *buf, const char *fmt, ...) len = vasprintf(, fmt, args); va_end(args); - if (len <= 0 || !str) + if (len == 0 || !str) return EINA_FALSE; ret = eina_strbuf_append_length(buf, str, len); @@ -111,7 +111,7 @@ eina_strbuf_append_vprintf(Eina_Strbuf *buf, const char *fmt, va_list args) len = vasprintf(, fmt, args); - if (len <= 0 || !str) + if (len == 0 || !str) return EINA_FALSE; ret = eina_strbuf_append_length(buf, str, len); @@ -131,7 +131,7 @@ eina_strbuf_insert_printf(Eina_Strbuf *buf, const char *fmt, size_t pos, ...) len = vasprintf(, fmt, args); va_end(args); - if (len <= 0 || !str) + if (len == 0 || !str) return EINA_FALSE; ret = eina_strbuf_insert(buf, str, pos); @@ -151,7 +151,7 @@ eina_strbuf_insert_vprintf(Eina_Strbuf *buf, len = vasprintf(, fmt, args); - if (len <= 0 || !str) + if (len == 0 || !str) return EINA_FALSE; ret = eina_strbuf_insert(buf, str, pos); --
[EGIT] [core/elementary] master 01/01: Elm entry: No use of top object if not editable.
hermet pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=25f05848ccfc087450ae6bea1da5e1d344e4743d commit 25f05848ccfc087450ae6bea1da5e1d344e4743d Author: Subodh Kumar <s7158.ku...@samsung.com> Date: Tue Feb 23 20:33:24 2016 +0900 Elm entry: No use of top object if not editable. Summary: No use of top object if not editable. Reviewers: cedric, Hermet Reviewed By: Hermet Differential Revision: https://phab.enlightenment.org/D3719 --- src/lib/elm_entry.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c index 3e057b8..3165847 100644 --- a/src/lib/elm_entry.c +++ b/src/lib/elm_entry.c @@ -1169,11 +1169,12 @@ _elm_entry_elm_widget_on_focus(Eo *obj, Elm_Entry_Data *sd, Elm_Object_Item *ite Evas_Object *top; Eina_Bool top_is_win = EINA_FALSE; + if (!sd->editable) return EINA_FALSE; + top = elm_widget_top_get(obj); if (top && eo_isa(top, ELM_WIN_CLASS)) top_is_win = EINA_TRUE; - if (!sd->editable) return EINA_FALSE; if (elm_widget_focus_get(obj)) { evas_object_focus_set(sd->entry_edje, EINA_TRUE); --
[EGIT] [core/elementary] master 05/06: spinner: fix vertical drag style and logic
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=cbbf08b4ed1157efaa1597cad798fb506c1853a8 commit cbbf08b4ed1157efaa1597cad798fb506c1853a8 Author: Subodh Kumar <s7158.ku...@samsung.com> Date: Fri Feb 12 21:00:50 2016 +0100 spinner: fix vertical drag style and logic Summary: Fix vertical drag style and logic. For vertical spinner graggable should move in y direction and since drag value is inverse of spinner increment and decrement so delta should be inversed. @fix Test Plan: 1. Elementary test 2. Vertical spinner Reviewers: cedric Projects: #elementary Differential Revision: https://phab.enlightenment.org/D3662 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- data/themes/edc/elm/spinner.edc | 11 +++ src/lib/elm_spinner.c | 8 +++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/data/themes/edc/elm/spinner.edc b/data/themes/edc/elm/spinner.edc index 9b4257d..463c6c3 100644 --- a/data/themes/edc/elm/spinner.edc +++ b/data/themes/edc/elm/spinner.edc @@ -224,5 +224,16 @@ group { name: "elm/spinner/base/vertical"; align: 0.0 0.5; } } + part { name: "elm.dragable.slider"; type: RECT; + repeat_events: 1; + dragable.x: 0 0 0; + dragable.y: 1 1 0; + description { state: "default" 0.0; +fixed: 1 0; +rel1.to: "elm.swallow.text_button"; +rel2.to: "elm.swallow.text_button"; +color: 0 0 0 0; + } + } } } diff --git a/src/lib/elm_spinner.c b/src/lib/elm_spinner.c index 45674bd..0e94cf1 100644 --- a/src/lib/elm_spinner.c +++ b/src/lib/elm_spinner.c @@ -260,15 +260,18 @@ _drag_cb(void *data, { double pos = 0.0, delta; Evas_Object *obj = data; + const char *style; ELM_SPINNER_DATA_GET(obj, sd); ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); if (sd->entry_visible) return; + style = elm_widget_style_get(obj); + if (sd->button_layout) { -if (!strncmp(elm_widget_style_get(obj), "vertical", 8)) +if (!strncmp(style, "vertical", 8)) eo_do((Eo *)wd->resize_obj, edje_obj_part_drag_value_get("elm.dragable.slider", NULL, )); else @@ -288,6 +291,9 @@ _drag_cb(void *data, delta = sd->drag_val_step * sd->step * _elm_config->scale; if (pos < sd->drag_prev_pos) delta *= -1; sd->drag_prev_pos = pos; + + /* Dragable is inverse of spinner value */ + if (!strncmp(style, "vertical", 8)) delta *= -1; /* If we are on rtl mode, change the delta to be negative on such changes */ if (elm_widget_mirrored_get(obj)) delta *= -1; if (_value_set(data, sd->val + delta)) _label_write(data); --
[EGIT] [core/elementary] master 01/03: Elm entry: Use edje api and simplify empty check logic
tasn pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=b82092f4f3260c71dd27909f46465c38673543fa commit b82092f4f3260c71dd27909f46465c38673543fa Author: Subodh Kumar <s7158.ku...@samsung.com> Date: Tue Jan 12 13:25:12 2016 + Elm entry: Use edje api and simplify empty check logic Summary: Use edje api and simplify empty check logic Test Plan: NA Reviewers: herdsman, tasn Reviewed By: tasn Subscribers: shilpasingh, cedric Differential Revision: https://phab.enlightenment.org/D3505 --- src/lib/elm_entry.c | 27 --- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c index 6d0e4d7..226f5a5 100644 --- a/src/lib/elm_entry.c +++ b/src/lib/elm_entry.c @@ -3989,26 +3989,15 @@ _elm_entry_entry_append(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd, const char *ent EOLIAN static Eina_Bool _elm_entry_is_empty(const Eo *obj EINA_UNUSED, Elm_Entry_Data *sd) { - Eina_Bool ret; - /* FIXME: until there's support for that in textblock, we just -* check to see if the there is text or not. */ - const Evas_Object *tb; - Evas_Textblock_Cursor *cur; - - /* It's a hack until we get the support suggested above. We just -* create a cursor, point it to the beginning, and then try to -* advance it, if it can advance, the tb is not empty, otherwise it -* is. */ - tb = edje_object_part_object_get(sd->entry_edje, "elm.text"); - - /* This is actually, ok for the time being, these hackish stuff - will be removed once evas 1.0 is out */ - cur = evas_object_textblock_cursor_new((Evas_Object *)tb); - evas_textblock_cursor_pos_set(cur, 0); - ret = evas_textblock_cursor_char_next(cur); - evas_textblock_cursor_free(cur); + edje_object_part_text_cursor_copy + (sd->entry_edje, "elm.text", EDJE_CURSOR_MAIN, EDJE_CURSOR_USER); + edje_object_part_text_cursor_pos_set + (sd->entry_edje, "elm.text", EDJE_CURSOR_USER, 1); + if (edje_object_part_text_cursor_pos_get +(sd->entry_edje, "elm.text", EDJE_CURSOR_USER) == 1) + return EINA_FALSE; - return !ret; + return EINA_TRUE; } EOLIAN static Evas_Object* --
[EGIT] [core/efl] master 01/01: Edje entry: Fix memory leak.
tasn pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=97b7964e8cc0b9328e1c8c829c9f099bbc044a34 commit 97b7964e8cc0b9328e1c8c829c9f099bbc044a34 Author: Subodh Kumar <s7158.ku...@samsung.com> Date: Fri Jan 8 16:17:29 2016 + Edje entry: Fix memory leak. Summary: Fix memory leak If user or extra cursor is used, these should be free on shutdown. @fix Test Plan: NA Reviewers: tasn, herdsman Subscribers: shilpasingh, cedric, jpeg Projects: #efl Differential Revision: https://phab.enlightenment.org/D3550 --- src/lib/edje/edje_entry.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c index 54fd3a8..cb64c34 100644 --- a/src/lib/edje/edje_entry.c +++ b/src/lib/edje/edje_entry.c @@ -2678,6 +2678,12 @@ _edje_entry_real_part_shutdown(Edje *ed, Edje_Real_Part *rp) evas_object_del(en->cursor_fg); evas_object_del(en->cursor_fg2); + if (en->cursor_user) + evas_textblock_cursor_free(en->cursor_user); + + if (en->cursor_user_extra) + evas_textblock_cursor_free(en->cursor_user_extra); + if (en->pw_timer) { ecore_timer_del(en->pw_timer); --
[EGIT] [core/efl] master 01/01: Edje entry: Do not update cursor for non editable entry.
tasn pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=593c7eac0202a95589cfac87cce35d1f8f113301 commit 593c7eac0202a95589cfac87cce35d1f8f113301 Author: Subodh Kumar <s7158.ku...@samsung.com> Date: Tue Jan 5 14:30:20 2016 + Edje entry: Do not update cursor for non editable entry. Summary: Do not update cursor for non editable entry. If entry is not editable there must not be any need to query tb cursor geometry and run other codes related to it. This may improve some performance of non-editable entry. Test Plan: NA Reviewers: tasn, herdsman, thiepha Subscribers: shilpasingh, cedric, jpeg Projects: #efl Differential Revision: https://phab.enlightenment.org/D3532 --- src/lib/edje/edje_entry.c | 76 --- 1 file changed, 39 insertions(+), 37 deletions(-) diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c index 9b9d194..54fd3a8 100644 --- a/src/lib/edje/edje_entry.c +++ b/src/lib/edje/edje_entry.c @@ -2719,50 +2719,52 @@ _edje_entry_real_part_configure(Edje *ed, Edje_Real_Part *rp) (!rp->typedata.text)) return; en = rp->typedata.text->entry_data; if (!en) return; - switch (rp->part->cursor_mode) - { - case EDJE_ENTRY_CURSOR_MODE_BEFORE: -cur_type = EVAS_TEXTBLOCK_CURSOR_BEFORE; -break; - - case EDJE_ENTRY_CURSOR_MODE_UNDER: - /* no break for a reason */ - default: -cur_type = EVAS_TEXTBLOCK_CURSOR_UNDER; - } _sel_update(ed, en->cursor, rp->object, en); _anchors_update_check(ed, rp); - x = y = w = h = -1; - xx = yy = ww = hh = -1; - evas_object_geometry_get(rp->object, , , , ); - bidi_cursor = evas_textblock_cursor_geometry_bidi_get(en->cursor, , , , , , , NULL, NULL, cur_type); - if (ww < 1) ww = 1; - if (hh < 1) hh = 1; - if (en->cursor_bg) - { -evas_object_move(en->cursor_bg, x + xx, y + yy); -evas_object_resize(en->cursor_bg, ww, hh); - } - if (en->cursor_fg) - { -evas_object_move(en->cursor_fg, x + xx, y + yy); -evas_object_resize(en->cursor_fg, ww, hh); - } - if (en->cursor_fg2) + if (rp->part->entry_mode >= EDJE_ENTRY_EDIT_MODE_EDITABLE) { -if (bidi_cursor) +switch (rp->part->cursor_mode) + { + case EDJE_ENTRY_CURSOR_MODE_BEFORE: + cur_type = EVAS_TEXTBLOCK_CURSOR_BEFORE; +break; + + case EDJE_ENTRY_CURSOR_MODE_UNDER: + /* no break for a reason */ + default: + cur_type = EVAS_TEXTBLOCK_CURSOR_UNDER; + } +x = y = w = h = -1; +xx = yy = ww = hh = -1; +evas_object_geometry_get(rp->object, , , , ); +bidi_cursor = evas_textblock_cursor_geometry_bidi_get(en->cursor, , , , , , , NULL, NULL, cur_type); +if (ww < 1) ww = 1; +if (hh < 1) hh = 1; +if (en->cursor_bg) { - evas_object_image_fill_set(en->cursor_fg2, 0, 0, ww, hh / 2); - evas_object_move(en->cursor_fg2, x + xx2, y + yy2 + (hh / 2)); - evas_object_resize(en->cursor_fg, ww, hh / 2); - evas_object_resize(en->cursor_fg2, ww, hh / 2); - - evas_object_show(en->cursor_fg2); + evas_object_move(en->cursor_bg, x + xx, y + yy); + evas_object_resize(en->cursor_bg, ww, hh); } -else +if (en->cursor_fg) { - evas_object_hide(en->cursor_fg2); + evas_object_move(en->cursor_fg, x + xx, y + yy); + evas_object_resize(en->cursor_fg, ww, hh); + } +if (en->cursor_fg2) + { + if (bidi_cursor) + { + evas_object_image_fill_set(en->cursor_fg2, 0, 0, ww, hh / 2); + evas_object_move(en->cursor_fg2, x + xx2, y + yy2 + (hh / 2)); + evas_object_resize(en->cursor_fg, ww, hh / 2); + evas_object_resize(en->cursor_fg2, ww, hh / 2); + evas_object_show(en->cursor_fg2); + } + else + { + evas_object_hide(en->cursor_fg2); + } } } } --
[EGIT] [core/elementary] master 01/01: Elm entry: Fix to hide magnifier when menu is disabled.
tasn pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=319d80dd2bb26f109b2dfa942fa878481e01381f commit 319d80dd2bb26f109b2dfa942fa878481e01381f Author: Subodh Kumar <s7158.ku...@samsung.com> Date: Wed Dec 23 13:03:45 2015 + Elm entry: Fix to hide magnifier when menu is disabled. Summary: Fix to hide magnifier when menu is disabled @fix Test Plan: 1. Enable magnifier 2. Disable menu 3. Long press and mouse up 4. observe magnifier is not hidden. Reviewers: tasn, herdsman, thiepha Subscribers: shilpasingh Differential Revision: https://phab.enlightenment.org/D3490 --- src/lib/elm_entry.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c index b7c953d..811d6f6 100644 --- a/src/lib/elm_entry.c +++ b/src/lib/elm_entry.c @@ -1857,11 +1857,13 @@ _mouse_up_cb(void *data, /* Since context menu disabled flag was checked at long press start while mouse * down, hence the same should be checked at mouse up from a long press * as well */ -if ((sd->long_pressed) && (!_elm_config->context_menu_disabled) && -(_elm_config->magnifier_enable)) +if ((sd->long_pressed) && (_elm_config->magnifier_enable)) { _magnifier_hide(data); - _menu_call(data); + if (!_elm_config->context_menu_disabled) + { + _menu_call(data); + } } else { --
[EGIT] [core/elementary] master 01/02: Entry: Add newline filter for single line entry
tasn pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=b4fca621509571623f3c5b25cc547cca699d09d5 commit b4fca621509571623f3c5b25cc547cca699d09d5 Author: Subodh Kumar <s7158.ku...@samsung.com> Date: Mon Dec 21 14:41:28 2015 + Entry: Add newline filter for single line entry Summary: Add newline filter Using the present filter infra a newline or paragraph separator filter is being added for single line entry. @fix Test Plan: Copy multiline text from and paste it to single line entry. it will fix T2660 Reviewers: herdsman, tasn Subscribers: thiepha, DaveMDS Maniphest Tasks: T2660 Differential Revision: https://phab.enlightenment.org/D3109 --- src/lib/elm_entry.c | 82 + 1 file changed, 82 insertions(+) diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c index 700116c..fa28a37 100644 --- a/src/lib/elm_entry.c +++ b/src/lib/elm_entry.c @@ -2604,6 +2604,79 @@ _item_get(void *data, return o; } +static Eina_Bool +_entry_has_new_line(const char *text) +{ + if (!text) return EINA_FALSE; + + while (*text) + { +if (!strncmp(text, "<br", 3) || !strncmp(text, "<ps", 3)) + { + if (text[4] == '>' || ((text[4] == '/') && (text[5] == '>'))) + { + return EINA_TRUE; + } + } +text++; + } + + return EINA_FALSE; +} + +static char * +_entry_remove_new_line(const char *text) +{ + Eina_Strbuf *str; + char *new_text; + + if (!_entry_has_new_line(text)) return NULL; + + str = eina_strbuf_new(); + eina_strbuf_append(str, text); + eina_strbuf_replace_all(str, "", ""); + eina_strbuf_replace_all(str, "", ""); + eina_strbuf_replace_all(str, "", ""); + eina_strbuf_replace_all(str, "", ""); + new_text = eina_strbuf_string_steal(str); + eina_strbuf_free(str); + return new_text; +} + +static void +_entry_new_line_filter_init(Evas_Object *obj) +{ + const char *text; + char *text2 = NULL; + + if (elm_entry_is_empty(obj)) return; + + text = elm_entry_entry_get(obj); + text2 = _entry_remove_new_line(text); + if (text2) + { +elm_entry_entry_set(obj, text2); +free(text2); + } +} + +static void +_entry_new_line_filter_cb(void *data EINA_UNUSED, + Evas_Object *entry EINA_UNUSED, + char **text) +{ + char *old_text; + + if (!*text) return; + + old_text = *text; + *text = _entry_remove_new_line((const char*)*text); + if (*text) + free(old_text); + else + *text = old_text; +} + static void _markup_filter_cb(void *data, Evas_Object *edje EINA_UNUSED, @@ -3816,6 +3889,15 @@ _elm_entry_single_line_set(Eo *obj, Elm_Entry_Data *sd, Eina_Bool single_line) sd->line_wrap = ELM_WRAP_NONE; if (elm_entry_cnp_mode_get(obj) == ELM_CNP_MODE_MARKUP) elm_entry_cnp_mode_set(obj, ELM_CNP_MODE_NO_IMAGE); + if (sd->single_line) + { +_entry_new_line_filter_init(obj); +elm_entry_markup_filter_append(obj, _entry_new_line_filter_cb, NULL); + } + else + { +elm_entry_markup_filter_remove(obj, _entry_new_line_filter_cb, NULL); + } eo_do(obj, elm_obj_widget_theme_apply()); if (sd->scroll) --
[EGIT] [core/efl] master 01/01: Evas textblock: Fix some indentation and formatting.
tasn pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=105960b24f15140710896710fe94080961e0bb50 commit 105960b24f15140710896710fe94080961e0bb50 Author: Subodh Kumar <s7158.ku...@samsung.com> Date: Fri Dec 18 15:14:05 2015 + Evas textblock: Fix some indentation and formatting. Summary: Fix some indentation and formatting. Reviewers: herdsman, cedric, tasn Reviewed By: cedric Subscribers: jpeg, cedric Differential Revision: https://phab.enlightenment.org/D3174 --- src/lib/evas/canvas/evas_object_textblock.c | 185 ++-- 1 file changed, 92 insertions(+), 93 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index c615b5e..bfa7cf5 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -431,9 +431,9 @@ struct _Evas_Object_Textblock_Format } font; struct { struct { -unsigned char r, g, b, a; + unsigned char r, g, b, a; } normal, underline, underline2, underline_dash, outline, shadow, glow, glow2, backing, - strikethrough; +strikethrough; } color; struct { int l, r; @@ -719,13 +719,13 @@ _style_replace(Evas_Textblock_Style *ts, const char *style_text) if (ts->default_tag) free(ts->default_tag); while (ts->tags) { - Evas_Object_Style_Tag *tag; +Evas_Object_Style_Tag *tag; - tag = (Evas_Object_Style_Tag *)ts->tags; - ts->tags = (Evas_Object_Style_Tag *)eina_inlist_remove(EINA_INLIST_GET(ts->tags), EINA_INLIST_GET(tag)); - free(tag->tag.tag); - free(tag->tag.replace); - free(tag); +tag = (Evas_Object_Style_Tag *)ts->tags; +ts->tags = (Evas_Object_Style_Tag *)eina_inlist_remove(EINA_INLIST_GET(ts->tags), EINA_INLIST_GET(tag)); +free(tag->tag.tag); +free(tag->tag.replace); +free(tag); } ts->default_tag = NULL; ts->tags = NULL; @@ -759,12 +759,12 @@ _style_match_tag(const Evas_Textblock_Style *ts, const char *s, size_t tag_len, /* Try the style tags */ EINA_INLIST_FOREACH(ts->tags, tag) { - if (tag->tag.tag_len != tag_len) continue; - if (!strncmp(tag->tag.tag, s, tag_len)) - { -*replace_len = tag->tag.replace_len; -return tag->tag.replace; - } +if (tag->tag.tag_len != tag_len) continue; +if (!strncmp(tag->tag.tag, s, tag_len)) + { + *replace_len = tag->tag.replace_len; + return tag->tag.replace; + } } /* Try the default tags */ @@ -799,9 +799,9 @@ _nodes_clear(const Evas_Object *eo_obj) Evas_Textblock_Data *o = eo_data_scope_get(eo_obj, MY_CLASS); while (o->text_nodes) { - Evas_Object_Textblock_Node_Text *n; +Evas_Object_Textblock_Node_Text *n; - n = o->text_nodes; +n = o->text_nodes; o->text_nodes = _NODE_TEXT(eina_inlist_remove( EINA_INLIST_GET(o->text_nodes), EINA_INLIST_GET(n))); _evas_textblock_node_text_free(n); @@ -6291,13 +6291,17 @@ evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text) { if (!key_start) { -if (!isspace((unsigned char)(*p))) -key_start = p; + if (!isspace((unsigned char)(*p))) +{ + key_start = p; +} } else if (!key_stop) { -if ((*p == '=') || (isspace((unsigned char)(*p -key_stop = p; + if ((*p == '=') || (isspace((unsigned char)(*p +{ + key_stop = p; +} } else if (!val_start) { @@ -7993,15 +7997,13 @@ evas_textblock_cursor_paragraph_last(Evas_Textblock_Cursor *cur) { node = _NODE_TEXT(EINA_INLIST_GET(node)->last); cur->node = node; - cur->pos = 0; - - evas_textblock_cursor_paragraph_char_last(cur); +cur->pos = 0; +evas_textblock_cursor_paragraph_char_last(cur); } else { - cur->node = NULL; - cur->pos = 0; - +cur->node = NULL; +cur->pos = 0; } } @@ -8428,8 +8430,8 @@ evas_textblock_cursor_line_char_last(Evas_Textblock_Cursor *cur) { size_t ind; - cur->node = it->text_node; - cur->pos = it->text_pos; +cur->node = it->text_node; +cur->pos = it->text_pos; if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) { ind = _ITEM_TEXT(it)->text_props.text_len -
[EGIT] [core/efl] master 01/01: Evas textblock: Use width of item format to position cursor.
tasn pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=43f50dc7dbb159752d7913dea35e8156d0f10c7b commit 43f50dc7dbb159752d7913dea35e8156d0f10c7b Author: Subodh Kumar <s7158.ku...@samsung.com> Date: Thu Dec 17 11:54:35 2015 + Evas textblock: Use width of item format to position cursor. Summary: Use width of item format to position cursor. Sometimes it becomes very difficult to position cursor over item and selection becomes very difficult as we position the cursor once the input X coord reached end of the item, like one attached in the test plan. So this patch decides over 50% of item width for X coord reaches to position it at start or end. @ix Test Plan: Attached setup shows how difficult to position cursor at the end when clicked over item and selection is also very difficult. Consider such case in mobile device, its becomes impossible to position cursor at the end and selection is too much difficult. {F27036} Also added test cases in evas test suite Reviewers: herdsman, tasn Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D3390 --- src/lib/evas/canvas/evas_object_textblock.c | 10 +- src/tests/evas/evas_test_textblock.c| 14 +- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index 48e7b3b..54e4311 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -10786,7 +10786,15 @@ evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, E { Evas_Object_Textblock_Format_Item *fi; fi = _ITEM_FORMAT(it); - cur->pos = fi->parent.text_pos; + /* Lets keep cur position half way for easy positioning */ + if (x > (ln->x + it->x + (it->adv / 2))) + { + cur->pos = fi->parent.text_pos + 1; + } + else + { + cur->pos = fi->parent.text_pos; + } cur->node = found_par->text_node; return EINA_TRUE; } diff --git a/src/tests/evas/evas_test_textblock.c b/src/tests/evas/evas_test_textblock.c index 467e164..528e640 100644 --- a/src/tests/evas/evas_test_textblock.c +++ b/src/tests/evas/evas_test_textblock.c @@ -1693,7 +1693,7 @@ END_TEST /* Testing items */ START_TEST(evas_textblock_items) { - Evas_Coord w, h, w2, h2, nw, nh, ih; + Evas_Coord x, y, w, h, w2, h2, nw, nh, ih; START_TB_TEST(); const char *buf = "This is an ."; @@ -1798,6 +1798,18 @@ START_TEST(evas_textblock_items) if (evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, , )) fail_if((w != 64) || (h != 64)); + /* Test char coordinate for item at middle position of the item to decide cursor position, +* it means when char coordinate exceeds the half width of the item then only +* cursor position is changed. */ + buf = "."; + evas_object_textblock_text_markup_set(tb, buf); + evas_textblock_cursor_format_item_geometry_get(cur, , , , NULL); + evas_textblock_cursor_char_coord_set(cur, x + (w / 2) + 1, y); + fail_if(evas_textblock_cursor_pos_get(cur) != 1); + /* Test small increment in x and cursor position will be same */ + evas_textblock_cursor_char_coord_set(cur, x + 10, y); + fail_if(evas_textblock_cursor_pos_get(cur) != 0); + /* FIXME: Also verify x,y positions of the item. */ /* FIXME We need some item tests that involve line wrapping that make the --
[EGIT] [core/efl] master 01/01: Edje entry: Use markup text for password in preedit mode
tasn pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=320733ecd72e4c8d4b01a185d15b7f4c168cc009 commit 320733ecd72e4c8d4b01a185d15b7f4c168cc009 Author: Subodh Kumar <s7158.ku...@samsung.com> Date: Thu Dec 3 16:04:07 2015 + Edje entry: Use markup text for password in preedit mode Summary: Use markup text for password in preedit mode Problem is that when text comes in preedit mode it is always markup text and when it is committed to entry it got committed with markup tags along with the original string, so for preedit mode password should be filtered all markup to set the proper text. @fix Test Plan: In preedit mode, enter any character say 'A' preedit markup like A will come in preedit changed callback Result: Text is set as plain text like below preeditA/preedit Reviewers: thiepha, jihoon, herdsman, shilpasingh, tasn Reviewed By: shilpasingh, tasn Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2929 --- src/lib/edje/edje_entry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c index 38fb5ff..9ed6ff7 100644 --- a/src/lib/edje/edje_entry.c +++ b/src/lib/edje/edje_entry.c @@ -4297,7 +4297,7 @@ _edje_entry_imf_event_preedit_changed_cb(void *data, Ecore_IMF_Context *ctx EINA Edje_Entry_Change_Info *info; _edje_entry_hide_visible_password(ed, en->rp); - info = _text_filter_text_prepend(ed, en, en->cursor, + info = _text_filter_markup_prepend(ed, en, en->cursor, eina_strbuf_string_get(buf), "+ password=off", "- password", --
[EGIT] [core/efl] master 01/02: Evas text: Fix memory leak
tasn pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=392df9479f816a641fabbf26bdab4b9cfc28 commit 392df9479f816a641fabbf26bdab4b9cfc28 Author: Subodh Kumar <s7158.ku...@samsung.com> Date: Wed Nov 18 10:52:34 2015 + Evas text: Fix memory leak Summary: Fix memory leak Position is getting returned without freeing the temporary logical item list. @fix Test Plan: NA Reviewers: tasn, raster Reviewed By: raster Subscribers: raster, cedric Differential Revision: https://phab.enlightenment.org/D3345 --- src/lib/evas/canvas/evas_object_text.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c index 2cf1a54..97c0711 100644 --- a/src/lib/evas/canvas/evas_object_text.c +++ b/src/lib/evas/canvas/evas_object_text.c @@ -271,6 +271,7 @@ _evas_object_text_last_up_to_pos(const Evas_Object *eo_obj, { Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); Evas_Object_Text_Item *it; + int pos = 0; #ifdef BIDI_SUPPORT /*FIXME: not very efficient, sort the items arrays. */ @@ -291,15 +292,17 @@ _evas_object_text_last_up_to_pos(const Evas_Object *eo_obj, { if ((x <= cx) && (cx < x + it->adv)) { - return it->text_pos + ENFN->font_last_up_to_pos(ENDT, + pos = it->text_pos + ENFN->font_last_up_to_pos(ENDT, o->font, >text_props, cx - x, cy); + break; } x += it->adv; } eina_list_free(logical_it); +return pos; } else #endif --
[EGIT] [core/efl] master 01/01: Evas text: Remove fixme marker
tasn pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f1cffd77096c4314598629e12a4c42498ba2e7cf commit f1cffd77096c4314598629e12a4c42498ba2e7cf Author: Subodh Kumar <s7158.ku...@samsung.com> Date: Tue Nov 17 11:24:39 2015 + Evas text: Remove fixme marker Summary: Remove fixme marker Algorithm used is good enough to sort very few number of items, usually 2 to 6 items. Test Plan: NA Reviewers: herdsman, cedric, tasn Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D3312 --- src/lib/evas/canvas/evas_object_text.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c index 9680a86..2cf1a54 100644 --- a/src/lib/evas/canvas/evas_object_text.c +++ b/src/lib/evas/canvas/evas_object_text.c @@ -559,7 +559,6 @@ _evas_object_text_item_order(Evas_Object *eo_obj, Evas_Text_Data *o) { (void) eo_obj; #ifdef BIDI_SUPPORT - /*FIXME: not very efficient, sort the items arrays. */ /* Reorder if it's a bidi text */ if (o->bidi_par_props) { --
[EGIT] [core/efl] master 01/01: Evas text: Remove tabs for readability
tasn pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d14dc12d3bbaac07e88bfb99e5d189170dd6da3c commit d14dc12d3bbaac07e88bfb99e5d189170dd6da3c Author: Subodh Kumar <s7158.ku...@samsung.com> Date: Tue Nov 17 11:22:17 2015 + Evas text: Remove tabs for readability Summary: Remove tabs Test Plan: NA Reviewers: tasn Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D3337 --- src/lib/evas/canvas/evas_object_text.c | 184 + 1 file changed, 94 insertions(+), 90 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c index 52b9170..9680a86 100644 --- a/src/lib/evas/canvas/evas_object_text.c +++ b/src/lib/evas/canvas/evas_object_text.c @@ -34,7 +34,7 @@ struct _Evas_Text_Data struct { struct { -unsigned char r, g, b, a; + unsigned char r, g, b, a; } outline, shadow, glow, glow2; const char *utf8_text; /* The text exposed to the API */ @@ -620,8 +620,8 @@ _layout_ellipsis_item_new(Evas_Object_Protected_Data *obj, Evas_Text_Data *o) { (void) ENFN->font_run_end_get(ENDT, o->font, _fi, _fi, script, _ellip_str, 1); - ellip_ti = _evas_object_text_item_new(obj, o, cur_fi, - _ellip_str, script, 0, 0, len); + ellip_ti = _evas_object_text_item_new(obj, o, cur_fi, + _ellip_str, script, 0, 0, len); } return ellip_ti; @@ -905,7 +905,9 @@ _evas_object_text_layout(Evas_Object *eo_obj, Evas_Text_Data *o, Eina_Unicode *t { Eina_Inlist *itrn = EINA_INLIST_GET(itr)->next; if ((itr != start_ellip_it) && (itr != end_ellip_it)) - _evas_object_text_item_del(o, itr); +{ + _evas_object_text_item_del(o, itr); +} itr = (Evas_Object_Text_Item *) itrn; } } @@ -1002,8 +1004,8 @@ _evas_text_efl_text_text_set(Eo *eo_obj, Evas_Text_Data *o, const char *_text) if (!text) text = eina_unicode_strdup(EINA_UNICODE_EMPTY_STRING); was = evas_object_is_in_output_rect(eo_obj, obj, - obj->layer->evas->pointer.x, - obj->layer->evas->pointer.y, 1, 1); + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, 1, 1); /* DO II */ /*Update bidi_props*/ @@ -1022,14 +1024,14 @@ _evas_text_efl_text_text_set(Eo *eo_obj, Evas_Text_Data *o, const char *_text) evas_object_clip_dirty(eo_obj, obj); evas_object_coords_recalc(eo_obj, obj); is = evas_object_is_in_output_rect(eo_obj, obj, - obj->layer->evas->pointer.x, - obj->layer->evas->pointer.y, 1, 1); + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, 1, 1); if ((is || was) && obj->cur->visible) evas_event_feed_mouse_move(obj->layer->evas->evas, - obj->layer->evas->pointer.x, - obj->layer->evas->pointer.y, - obj->layer->evas->last_timestamp, - NULL); +obj->layer->evas->pointer.x, +obj->layer->evas->pointer.y, +obj->layer->evas->last_timestamp, +NULL); evas_object_inform_call_resize(eo_obj); } @@ -1144,15 +1146,15 @@ _evas_text_char_pos_get(const Eo *eo_obj, Evas_Text_Data *o, int pos, Evas_Coord x -= l; if (x < 0) { - w += x; - x = 0; +w += x; +x = 0; } if ((x + w) > obj->cur->geometry.w) w = obj->cur->geometry.w - x; if (w < 0) w = 0; if (y < 0) { - h += y; - y = 0; +h += y; +y = 0; } if ((y + h) > obj->cur->geometry.h) h = obj->cur->geometry.h - y; if (h < 0) h = 0; @@ -1198,16 +1200,16 @@ _evas_text_char_coords_get(const Eo *eo_obj, Evas_Text_Data *o, Evas_Coord x, Ev rx -= l; if (rx < 0) { - rw += rx; - rx = 0; +rw += rx; +rx = 0; } Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); if ((rx + rw) > obj->cur->geometry.w) rw = obj->cur->geometry.w - rx; if (rw < 0) rw = 0; if (ry < 0) { - rh += ry; - ry = 0; +rh += ry; +ry = 0; } if ((ry + rh) > obj->cur->geom
[EGIT] [core/elementary] master 01/01: Elm entry: Keep cursor at inserted position after dnd.
thiep pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=c63d91aa6dab37e29ccfa4a6e61348378f196e4c commit c63d91aa6dab37e29ccfa4a6e61348378f196e4c Author: Subodh Kumar <s7158.ku...@samsung.com> Date: Wed Nov 18 11:57:49 2015 +0900 Elm entry: Keep cursor at inserted position after dnd. Summary: Keep cursor at inserted position after dnd. For good user experience, after dnd users expect the cursor should be at the last inserted position. @feature Test Plan: NA Reviewers: thiepha, herdsman, cedric, tasn Subscribers: shilpasingh Differential Revision: https://phab.enlightenment.org/D3267 --- src/lib/elm_entry.c | 5 - 1 file changed, 5 deletions(-) diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c index 5cf77a5..c1984a8 100644 --- a/src/lib/elm_entry.c +++ b/src/lib/elm_entry.c @@ -700,8 +700,6 @@ _drag_drop_cb(void *data EINA_UNUSED, ELM_ENTRY_DATA_GET(obj, sd); - edje_object_part_text_cursor_copy - (sd->entry_edje, "elm.text", EDJE_CURSOR_MAIN, /*->*/ EDJE_CURSOR_USER); rv = edje_object_part_text_cursor_coord_set (sd->entry_edje, "elm.text", EDJE_CURSOR_MAIN, drop->x, drop->y); @@ -709,9 +707,6 @@ _drag_drop_cb(void *data EINA_UNUSED, rv = _selection_data_cb(NULL, obj, drop); - edje_object_part_text_cursor_copy - (sd->entry_edje, "elm.text", EDJE_CURSOR_USER, /*->*/ EDJE_CURSOR_MAIN); - return rv; } --
[EGIT] [core/efl] master 06/16: edje entry: remove unreachable dead code
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=95d398b5c8bfde8d6d760ca5881d19691b522c92 commit 95d398b5c8bfde8d6d760ca5881d19691b522c92 Author: Subodh Kumar <s7158.ku...@samsung.com> Date: Tue Oct 20 12:06:00 2015 -0700 edje entry: remove unreachable dead code Summary: Remove dead code If anchor sel is not there, code inside while can not execute. Test Plan: NA Reviewers: tasn, herdsman, cedric Reviewed By: cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D3190 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/edje/edje_entry.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c index bf9a140..92c40a6 100644 --- a/src/lib/edje/edje_entry.c +++ b/src/lib/edje/edje_entry.c @@ -927,16 +927,6 @@ _anchors_update(Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o, Entry *en) if (!an->sel) { - while (an->sel) -{ - sel = an->sel->data; - if (sel->obj_bg) evas_object_del(sel->obj_bg); - if (sel->obj_fg) evas_object_del(sel->obj_fg); - if (sel->obj) evas_object_del(sel->obj); - free(sel); - an->sel = eina_list_remove_list(an->sel, an->sel); -} - sel = calloc(1, sizeof(Sel)); an->sel = eina_list_append(an->sel, sel); --
[EGIT] [core/efl] master 05/16: edje entry: do not create object if theme source is not available.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=9cc8c470be4aee9c7f6a48f624c233194c91c368 commit 9cc8c470be4aee9c7f6a48f624c233194c91c368 Author: Subodh Kumar <s7158.ku...@samsung.com> Date: Tue Oct 20 11:57:17 2015 -0700 edje entry: do not create object if theme source is not available. Summary: Object not created if theme source is not available. In many case we dont need or define all the theme sources for entry, even if the sources are null, edje object is being created. Test Plan: NA Reviewers: tasn, herdsman, cedric Reviewed By: cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D3199 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/edje/edje_entry.c | 122 ++ 1 file changed, 69 insertions(+), 53 deletions(-) diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c index b6cbf84..bf9a140 100644 --- a/src/lib/edje/edje_entry.c +++ b/src/lib/edje/edje_entry.c @@ -674,25 +674,31 @@ _sel_update(Edje *ed, Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o, Entr sel = calloc(1, sizeof(Sel)); en->sel = eina_list_append(en->sel, sel); - ob = edje_object_add(ed->base->evas); - edje_object_file_set(ob, ed->path, en->rp->part->source); - evas_object_smart_member_add(ob, smart); - evas_object_stack_below(ob, o); - evas_object_clip_set(ob, clip); - evas_object_pass_events_set(ob, EINA_TRUE); - evas_object_show(ob); - sel->obj_bg = ob; - _edje_subobj_register(ed, sel->obj_bg); - - ob = edje_object_add(ed->base->evas); - edje_object_file_set(ob, ed->path, en->rp->part->source2); - evas_object_smart_member_add(ob, smart); - evas_object_stack_above(ob, o); - evas_object_clip_set(ob, clip); - evas_object_pass_events_set(ob, EINA_TRUE); - evas_object_show(ob); - sel->obj_fg = ob; - _edje_subobj_register(ed, sel->obj_fg); + if (en->rp->part->source) +{ + ob = edje_object_add(ed->base->evas); + edje_object_file_set(ob, ed->path, en->rp->part->source); + evas_object_smart_member_add(ob, smart); + evas_object_stack_below(ob, o); + evas_object_clip_set(ob, clip); + evas_object_pass_events_set(ob, EINA_TRUE); + evas_object_show(ob); + sel->obj_bg = ob; + _edje_subobj_register(ed, sel->obj_bg); +} + + if (en->rp->part->source2) +{ + ob = edje_object_add(ed->base->evas); + edje_object_file_set(ob, ed->path, en->rp->part->source2); + evas_object_smart_member_add(ob, smart); + evas_object_stack_above(ob, o); + evas_object_clip_set(ob, clip); + evas_object_pass_events_set(ob, EINA_TRUE); + evas_object_show(ob); + sel->obj_fg = ob; + _edje_subobj_register(ed, sel->obj_fg); +} } else { @@ -970,25 +976,31 @@ _anchors_update(Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o, Entry *en) sel = calloc(1, sizeof(Sel)); an->sel = eina_list_append(an->sel, sel); - ob = edje_object_add(ed->base->evas); - edje_object_file_set(ob, ed->path, en->rp->part->source5); - evas_object_smart_member_add(ob, smart); - evas_object_stack_below(ob, o); - evas_object_clip_set(ob, clip); - evas_object_pass_events_set(ob, EINA_TRUE); - evas_object_show(ob); - sel->obj_bg = ob; - _edje_subobj_register(ed, sel->obj_bg); + if (en->rp->part->source5) + { +ob = edje_object_add(ed->base->evas); +edje_object_file_set(ob, ed->path, en->rp->part->source5); +evas_object_smart_member_add(ob, smart); +evas_object_stack_below(o
[EGIT] [core/efl] master 07/24: evas: fix some indentation and formatting in textblock.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=3f0d0daf0d1a9b96cf112a0ee741b4549e9d2828 commit 3f0d0daf0d1a9b96cf112a0ee741b4549e9d2828 Author: Subodh Kumar <s7158.ku...@samsung.com> Date: Mon Nov 9 15:39:10 2015 -0800 evas: fix some indentation and formatting in textblock. Summary: Fix some indentation and formatting. Reviewers: herdsman, tasn Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D3174 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/evas/canvas/evas_object_textblock.c | 236 ++-- 1 file changed, 118 insertions(+), 118 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index d579efd..05d0050 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -431,9 +431,9 @@ struct _Evas_Object_Textblock_Format } font; struct { struct { -unsigned char r, g, b, a; + unsigned char r, g, b, a; } normal, underline, underline2, underline_dash, outline, shadow, glow, glow2, backing, - strikethrough; +strikethrough; } color; struct { int l, r; @@ -530,17 +530,17 @@ struct _Evas_Textblock_Selection_Iterator /* private methods for textblock objects */ static void evas_object_textblock_init(Evas_Object *eo_obj); static void evas_object_textblock_render(Evas_Object *eo_obj, -Evas_Object_Protected_Data *obj, -void *type_private_data, -void *output, void *context, void *surface, -int x, int y, Eina_Bool do_async); + Evas_Object_Protected_Data *obj, + void *type_private_data, + void *output, void *context, void *surface, + int x, int y, Eina_Bool do_async); static void evas_object_textblock_free(Evas_Object *eo_obj); static void evas_object_textblock_render_pre(Evas_Object *eo_obj, -Evas_Object_Protected_Data *obj, -void *type_private_data); + Evas_Object_Protected_Data *obj, + void *type_private_data); static void evas_object_textblock_render_post(Evas_Object *eo_obj, - Evas_Object_Protected_Data *obj, - void *type_private_data); + Evas_Object_Protected_Data *obj, + void *type_private_data); static Evas_Object_Textblock_Node_Text *_evas_textblock_node_text_new(void); static unsigned int evas_object_textblock_id_get(Evas_Object *eo_obj); @@ -548,17 +548,17 @@ static unsigned int evas_object_textblock_visual_id_get(Evas_Object *eo_obj); static void *evas_object_textblock_engine_data_get(Evas_Object *eo_obj); static int evas_object_textblock_is_opaque(Evas_Object *eo_obj, - Evas_Object_Protected_Data *obj, - void *type_private_data); + Evas_Object_Protected_Data *obj, + void *type_private_data); static int evas_object_textblock_was_opaque(Evas_Object *eo_obj, - Evas_Object_Protected_Data *obj, - void *type_private_data); +Evas_Object_Protected_Data *obj, +void *type_private_data); static void evas_object_textblock_coords_recalc(Evas_Object *eo_obj, - Evas_Object_Protected_Data *obj, - void *type_private_data); +Evas_Object_Protected_Data *obj, +void *type_private_data); static void evas_object_textblock_scale_update(Evas_Object *eo_obj, - Evas_Object_Protected_Data *obj, - void *type_private_data); + Evas_Object_Protected_Data *obj, + void *type_private_data); static const Evas_Object_Func object_func = { @@ -705,13 +705,13 @@ _style_replace(Evas_Textblock_Style *ts, const char *style_text) if (ts->default_tag) free(ts->default_tag); while (ts->tags) { - Evas_Object_Style_Tag *tag; +Evas_Object_Style_Tag *tag; - tag = (Evas_Object_Style_Tag *)ts->tags; - ts->tags = (Evas_Object_Style_Tag *)eina_inlist_remove(EINA_INLIST_GET(ts->tags), EINA_INLIST_GET(tag)); - free(tag->tag.tag); - free(tag->tag.repla
[EGIT] [core/efl] master 01/03: evas: fix memory leak.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=6bd863cf4ffb46f0267e96844cea37a95599e9de commit 6bd863cf4ffb46f0267e96844cea37a95599e9de Author: Subodh Kumar <s7158.ku...@samsung.com> Date: Tue Oct 20 11:51:17 2015 -0700 evas: fix memory leak. Summary: Fix memory leak Delimiter string is being saved using eina_stringshare_replace without any del or free when object is deleted. @fix Test Plan: NA Reviewers: cedric, tasn, herdsman Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D3201 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/evas/canvas/evas_object_text.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c index 5eab0eb..3e3e9ff 100644 --- a/src/lib/evas/canvas/evas_object_text.c +++ b/src/lib/evas/canvas/evas_object_text.c @@ -1554,6 +1554,7 @@ evas_object_text_free(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) if (o->cur.font) eina_stringshare_del(o->cur.font); if (o->cur.fdesc) evas_font_desc_unref(o->cur.fdesc); if (o->cur.source) eina_stringshare_del(o->cur.source); + if (o->bidi_delimiters) eina_stringshare_del(o->bidi_delimiters); if (o->cur.text) free(o->cur.text); if (o->font && obj->layer && obj->layer->evas) evas_font_free(obj->layer->evas->evas, o->font); --
[EGIT] [core/efl] master 08/08: evas textblock: fix memory leak
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=69c2b13474b84fa7c8fd9f3942ab89c0d346af79 commit 69c2b13474b84fa7c8fd9f3942ab89c0d346af79 Author: Subodh Kumar <s7158.ku...@samsung.com> Date: Mon Oct 19 11:34:38 2015 -0700 evas textblock: fix memory leak Summary: Fix memory leak Delimiter string is being saved using eina_stringshare_replace without any del or free when object is deleted. @fix Test Plan: N/A Reviewers: tasn, herdsman Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D3175 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/evas/canvas/evas_object_textblock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index ca37af4..3d302e8 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -11533,6 +11533,7 @@ evas_object_textblock_free(Evas_Object *eo_obj) } if (o->repch) eina_stringshare_del(o->repch); if (o->ellip_ti) _item_free(eo_obj, NULL, _ITEM(o->ellip_ti)); + if (o->bidi_delimiters) eina_stringshare_del(o->bidi_delimiters); _format_command_shutdown(); /* remove obstacles */ --
[EGIT] [core/efl] master 02/02: evas_box: fix children size and position calculation when padding is used for horizontal flow layout
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=4290567fd67cee39a3e36fddf0dc526190250724 commit 4290567fd67cee39a3e36fddf0dc526190250724 Author: Subodh Kumar <s7158.ku...@samsung.com> Date: Sun Oct 4 15:23:49 2015 +0200 evas_box: fix children size and position calculation when padding is used for horizontal flow layout Summary: Fix children size and position calculation when padding is used For each child size calculation padding is adjusted but box height should include padding. Secondly, x and y position of children should not include the vertical and horizonatal padding as child size has already included the given paddings. @fix Test Plan: Please modify test_box.c file in function test_box_vert2 as follows: bx = elm_box_add(win); evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_win_resize_object_add(win, bx); elm_box_padding_set(bx, 50, 50); elm_box_layout_set(bx, evas_object_box_layout_flow_horizontal, NULL, NULL); evas_object_show(bx); Now, 1. open elementary_test 2. box 3. Box vert 2 (observe box is broken) 4. Try resizing the window (observe) Reviewers: raster, cedric Reviewed By: cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D3049 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/evas/canvas/evas_object_box.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_box.c b/src/lib/evas/canvas/evas_object_box.c index a33a9e4..3510fb0 100644 --- a/src/lib/evas/canvas/evas_object_box.c +++ b/src/lib/evas/canvas/evas_object_box.c @@ -1333,7 +1333,7 @@ _evas_box_layout_flow_horizontal(Eo *o, Evas_Object_Box_Data *priv, Evas_Object_ (priv, w, _count, row_max_h, row_break, row_width, _y, _w, _h); inc_y = 0; - remain_y = h - (offset_y + max_h); + remain_y = h - (priv->pad.v * row_count -1) - (offset_y + max_h); if (remain_y > 0) { @@ -1353,7 +1353,7 @@ _evas_box_layout_flow_horizontal(Eo *o, Evas_Object_Box_Data *priv, Evas_Object_ int row_size, remain_x; row_size = row_break[r] - i; -remain_x = (w - row_width[r]); +remain_x = (w - (row_width[r] - priv->pad.h)); if (priv->align.h < 0.0) { @@ -1403,6 +1403,9 @@ _evas_box_layout_flow_horizontal(Eo *o, Evas_Object_Box_Data *priv, Evas_Object_ evas_object_geometry_get(o, , NULL, NULL, NULL); min_h += row_max_h[r]; y += row_max_h[r] + inc_y; + +if (r > 0) + min_h += priv->pad.v; } evas_object_size_hint_min_set(o, min_w, min_h); --
[EGIT] [core/efl] master 01/01: Edje entry: Make cursors to null after free
tasn pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=df190346a154822d9cead0619cb7957fcfeaefd8 commit df190346a154822d9cead0619cb7957fcfeaefd8 Author: Subodh Kumar <s7158.ku...@samsung.com> Date: Fri Sep 25 09:49:18 2015 +0100 Edje entry: Make cursors to null after free Summary: Edje entry: Make cursors to null after free To prevent any illegal access of cursors can lead to crash @fix Test Plan: NA Reviewers: tasn Reviewed By: tasn Subscribers: shilpasingh, cedric Differential Revision: https://phab.enlightenment.org/D3093 --- src/lib/edje/edje_entry.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c index e32a52e..b6cbf84 100644 --- a/src/lib/edje/edje_entry.c +++ b/src/lib/edje/edje_entry.c @@ -1100,8 +1100,6 @@ _anchors_clear(Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o EINA_UNUSED, { Anchor *an = en->anchors->data; -evas_textblock_cursor_free(an->start); -evas_textblock_cursor_free(an->end); while (an->sel) { Sel *sel = an->sel->data; @@ -,6 +1109,8 @@ _anchors_clear(Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o EINA_UNUSED, free(sel); an->sel = eina_list_remove_list(an->sel, an->sel); } +evas_textblock_cursor_free(an->start); +evas_textblock_cursor_free(an->end); free(an->name); free(an); en->anchors = eina_list_remove_list(en->anchors, en->anchors); --
[EGIT] [core/efl] master 01/01: Edje entry: Remove useless commented code
tasn pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=46ff6f11723f8f7918a620e470bfbf1cdc6a45d5 commit 46ff6f11723f8f7918a620e470bfbf1cdc6a45d5 Author: Subodh Kumar s7158.ku...@samsung.com Date: Tue Aug 11 12:10:59 2015 +0100 Edje entry: Remove useless commented code Summary: After the commit D2904 this commented code and comments are not required Test Plan: NA Reviewers: tasn Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2938 --- src/lib/edje/edje_entry.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c index bcdeea9..8b4f256 100644 --- a/src/lib/edje/edje_entry.c +++ b/src/lib/edje/edje_entry.c @@ -2875,9 +2875,6 @@ _edje_entry_text_markup_insert(Edje_Real_Part *rp, const char *text) if (!en) return; _edje_entry_imf_context_reset(rp); - // prepend markup @ cursor pos .. XXX: do we need to do this? maybe not? -// if (en-have_selection) -// _range_del(en-cursor, rp-object, en); _text_filter_markup_prepend(en-ed, en, en-cursor, text, NULL, NULL, EINA_TRUE, EINA_FALSE); _anchors_get(en-cursor, rp-object, en); --
[EGIT] [core/efl] master 01/01: Edje entry: Fix to delete selection when preedit status has not ended.
tasn pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=20822f2008bbd3460467154b5cfd1eeaae403dc7 commit 20822f2008bbd3460467154b5cfd1eeaae403dc7 Author: Subodh Kumar s7158.ku...@samsung.com Date: Wed Aug 5 11:02:53 2015 +0100 Edje entry: Fix to delete selection when preedit status has not ended. Summary: Fix to delete selection when preedit status has not ended In preedit mode when selection is made and input any letter, there is duplicate character appeared because the selection is cleared when commit happens so delete the selection in preedit last stage. @fix Test Plan: Test in Tizen devices. Reviewers: woohyun, id213sin, shilpasingh, tasn Subscribers: rajeshps, cedric, govi Differential Revision: https://phab.enlightenment.org/D2837 --- src/lib/edje/edje_entry.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c index c095f16..bcdeea9 100644 --- a/src/lib/edje/edje_entry.c +++ b/src/lib/edje/edje_entry.c @@ -4226,6 +4226,9 @@ _edje_entry_imf_event_preedit_changed_cb(void *data, Ecore_IMF_Context *ctx EINA if (!strcmp(preedit_string, )) preedit_end_state = EINA_TRUE; + if (en-have_selection !preedit_end_state) + _range_del_emit(ed, en-cursor, rp-object, en); + /* delete preedit characters */ _preedit_del(en); --
[EGIT] [core/efl] master 01/01: Evas textblock: Add underline height support
tasn pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=77e3ac7f82bacdf7da2251625e6badd3b5d2123e commit 77e3ac7f82bacdf7da2251625e6badd3b5d2123e Author: Subodh Kumar s7158.ku...@samsung.com Date: Wed May 27 11:14:59 2015 +0100 Evas textblock: Add underline height support Summary: For showing text error like spell error thick underline is used hence added the underline height support. @feature Test Plan: test case added in evas textblock test. Reviewers: raster, shilpasingh, tasn Subscribers: govi, rajeshps, cedric Differential Revision: https://phab.enlightenment.org/D2531 TAsn comment: I wonder if the format should be renamed to underline_relheight instead of height. If you have any thoughts, please let me know. --- AUTHORS | 1 + src/lib/evas/canvas/evas_object_textblock.c | 24 +++- src/tests/evas/evas_test_textblock.c| 1 + 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index ac070ec..eab2011 100644 --- a/AUTHORS +++ b/AUTHORS @@ -146,6 +146,7 @@ MinKyoung Kim mer@samsung.com Pierre Lamot pierre.la...@yahoo.fr Michelle Legrand legrand.miche...@outlook.com Romain Perier romain.per...@openwide.fr +Subodh Kumar s7158.ku...@samsung.com Ecore - diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index 6cf2648..664df75 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -444,6 +444,7 @@ struct _Evas_Object_Textblock_Format int linegap; /** Value to set the line gap in text. */ int underline_dash_width; /** Valule to set the width of the underline dash. */ int underline_dash_gap; /** Value to set the gap of the underline dash. */ + double underline_height; /** Value to set the height of the single underline. */ double linerelsize; /** Value to set the size of line of text. */ double linerelgap; /** Value for setting line gap. */ double linefill; /** The value must be a percentage. */ @@ -1130,6 +1131,7 @@ static const char *ellipsisstr = NULL; static const char *passwordstr = NULL; static const char *underline_dash_widthstr = NULL; static const char *underline_dash_gapstr = NULL; +static const char *underline_heightstr = NULL; /** * @page evas_textblock_style_page Evas Textblock Style Options @@ -1190,6 +1192,7 @@ _format_command_init(void) * @li @ref evas_textblock_style_password * @li @ref evas_textblock_style_underline_dash_width * @li @ref evas_textblock_style_underline_dash_gap + * @li @ref evas_textblock_style_underline_height * * @section evas_textblock_style_contents Contents */ @@ -1231,6 +1234,7 @@ _format_command_init(void) passwordstr = eina_stringshare_add(password); underline_dash_widthstr = eina_stringshare_add(underline_dash_width); underline_dash_gapstr = eina_stringshare_add(underline_dash_gap); +underline_heightstr = eina_stringshare_add(underline_height); } format_refcount++; } @@ -1282,6 +1286,7 @@ _format_command_shutdown(void) eina_stringshare_del(passwordstr); eina_stringshare_del(underline_dash_widthstr); eina_stringshare_del(underline_dash_gapstr); + eina_stringshare_del(underline_heightstr); } /** @@ -2317,6 +2322,21 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch fmt-underline_dash_gap = atoi(param); if (fmt-underline_dash_gap = 0) fmt-underline_dash_gap = 1; } + else if (cmd == underline_heightstr) + { +/** + * @page evas_textblock_style_page Evas Textblock Style Options + * + * @subsection evas_textblock_style_underline_height Underline height + * + * Sets the height of the single underline. The value should be a floating number. + * @code + * underline_height=floatingnumber + * @endcode + */ +fmt-underline_height = atof(param); +if (fmt-underline_height = 0.0) fmt-underline_height = 1.0; + } } /** @@ -3000,6 +3020,7 @@ _layout_format_push(Ctxt *c, Evas_Object_Textblock_Format *fmt, fmt-linegap = 0; fmt-underline_dash_width = 6; fmt-underline_dash_gap = 2; +fmt-underline_height = 1.0; fmt-linerelgap = 0.0; fmt-password = 1; fmt-ellipsis = -1; @@ -11699,7 +11720,8 @@ evas_object_textblock_render(Evas_Object *eo_obj EINA_UNUSED, DRAW_FORMAT(strikethrough, (ln-h / 2), line_thickness); /* UNDERLINE */ -DRAW_FORMAT(underline, ln-baseline + line_position, line_thickness); +DRAW_FORMAT(underline, ln
[EGIT] [core/elementary] elementary-1.14 01/01: [ELM] elm_toolbar: Use item sizing eval function.
hermet pushed a commit to branch elementary-1.14. http://git.enlightenment.org/core/elementary.git/commit/?id=d5e0d0076e932cc5d49728358b097a7a9f6d4238 commit d5e0d0076e932cc5d49728358b097a7a9f6d4238 Author: Subodh Kumar s7158.ku...@samsung.com Date: Tue May 19 21:34:29 2015 +0900 [ELM] elm_toolbar: Use item sizing eval function. Summary: Item sizing evaluation function can be used instead of repeating the same code. Test Plan: NA Reviewers: herb, shilpasingh, cedric, Hermet Reviewed By: shilpasingh Subscribers: poornima.srinivasan Differential Revision: https://phab.enlightenment.org/D2486 --- src/lib/elm_toolbar.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c index 0087a0a..9d41844 100644 --- a/src/lib/elm_toolbar.c +++ b/src/lib/elm_toolbar.c @@ -1309,7 +1309,6 @@ _inform_item_number(Evas_Object *obj) char buf[sizeof(elm,number,item,) + 4]; static int scount = 0; int count = 0; - Evas_Coord mw, mh; EINA_INLIST_FOREACH(sd-items, it) { @@ -1327,12 +1326,7 @@ _inform_item_number(Evas_Object *obj) { edje_object_signal_emit(VIEW(it), buf, elm); edje_object_message_signal_process(VIEW(it)); - - mw = mh = -1; - elm_coords_finger_size_adjust(1, mw, 1, mh); - - edje_object_size_min_restricted_calc(VIEW(it), mw, mh, mw, mh); - evas_object_size_hint_min_set(VIEW(it), mw, mh); + _resizing_eval_item(it); } } } --