Re: [E-devel] [EGIT] [core/efl] master 01/01: Evas textblock: Correct word start/end moving at new line or line begins with spaces

2014-08-04 Thread thie...@gmail.com
Hello,

Sorry for that.
I will take care of this next time.

Best Regards,
Thiep Ha



- Reply message -
From: "Tom Hacohen" 
To: "Enlightenment developer list" 
Subject: [E-devel] [EGIT] [core/efl] master 01/01: Evas textblock: Correct word 
start/end moving at new line or line begins with spaces
Date: Mon, Aug 4, 2014 8:44 pm


Spank spank spank !!!
The summary lines are too long. It didn't show on phab. :(
My bad.

Thanks to Quaker for pointing that out.

--
Tom.

On 04/08/14 11:07, Thiep Ha wrote:
> tasn pushed a commit to branch master.
>
> http://git.enlightenment.org/core/efl.git/commit/?id=104f04eda19395396116ba4c4c23b17f00ace2ae
>
> commit 104f04eda19395396116ba4c4c23b17f00ace2ae
> Author: Thiep Ha 
> Date:   Mon Aug 4 11:01:51 2014 +0100
>
>  Evas textblock: Correct word start/end moving at new line or line begins 
> with spaces
>
>  Summary:
>  Word start/end works incorrectly when it goes to new line or line begins 
> with spaces.
>  Ex: In elementary_test/Entry, place cursor at the end of line, press 
> ctrl + right arrow keys: cursor moves to begin of next line. In this case, 
> cursor should move to end of 1st word in next line.
>  Ex2: In elementary_test/Entry, add some spaces to begin of 2nd line ("   
> uses markup"), place cursor at the first word ("uses"), press ctrl + left 
> arrow keys twice, cursor moves to begin of 2nd line. In this case, cursor 
> should move to begin of last word in 1st line.
>
>  This patch provides a fix by considerring next/previous text node to 
> move cursor to correct place.
>
>  @fix
>
>  Reviewers: woohyun, raster, tasn
>
>  Subscribers: cedric
>
>  Differential Revision: https://phab.enlightenment.org/D1140
> ---
>   src/lib/evas/canvas/evas_object_textblock.c | 30 
> -
>   src/tests/evas/evas_test_textblock.c| 12 
>   2 files changed, 41 insertions(+), 1 deletion(-)
>
> diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
> b/src/lib/evas/canvas/evas_object_textblock.c
> index 58cc476..87d6664 100644
> --- a/src/lib/evas/canvas/evas_object_textblock.c
> +++ b/src/lib/evas/canvas/evas_object_textblock.c
> @@ -7349,7 +7349,23 @@ evas_textblock_cursor_word_start(Evas_Textblock_Cursor 
> *cur)
>
>  for (i = cur->pos ; _is_white(text[i]) && BREAK_AFTER(i) ; i--)
>{
> -if (i == 0) break;
> +if (i == 0)
> +  {
> + Evas_Object_Textblock_Node_Text *pnode;
> + pnode = _NODE_TEXT(EINA_INLIST_GET(cur->node)->prev);
> + if (pnode)
> +   {
> +  cur->node = pnode;
> +  len = eina_ustrbuf_length_get(cur->node->unicode);
> +  cur->pos = len - 1;
> +  free(breaks);
> +  return evas_textblock_cursor_word_start(cur);
> +   }
> + else
> +   {
> +  break;
> +   }
> +  }
>}
>
>  for ( ; i > 0 ; i--)
> @@ -7390,6 +7406,18 @@ evas_textblock_cursor_word_end(Evas_Textblock_Cursor 
> *cur)
>}
>
>  for (i = cur->pos; text[i] && _is_white(text[i]) && (BREAK_AFTER(i)) ; 
> i++);
> +   if (i == len)
> + {
> +Evas_Object_Textblock_Node_Text *nnode;
> +nnode = _NODE_TEXT(EINA_INLIST_GET(cur->node)->next);
> +if (nnode)
> +  {
> + cur->node = nnode;
> + cur->pos = 0;
> + free(breaks);
> + return evas_textblock_cursor_word_end(cur);
> +  }
> + }
>
>  for ( ; text[i] ; i++)
>{
> diff --git a/src/tests/evas/evas_test_textblock.c 
> b/src/tests/evas/evas_test_textblock.c
> index a727b76..63ba40e 100644
> --- a/src/tests/evas/evas_test_textblock.c
> +++ b/src/tests/evas/evas_test_textblock.c
> @@ -637,6 +637,18 @@ START_TEST(evas_textblock_cursor)
>
>   evas_textblock_cursor_word_end(cur);
>   ck_assert_int_eq(5, evas_textblock_cursor_pos_get(cur));
> +
> +/* moving across paragraphs */
> +evas_object_textblock_text_markup_set(tb,
> +  "test"
> +  "  case");
> +evas_textblock_cursor_pos_set(cur, 4);
> +evas_textblock_cursor_word_end(cur);
> +ck_assert_int_eq(10, evas_textblock_cursor_pos_get(cur));
> +
> +evas_textblock_cursor_pos_set(cur, 6);
> +evas_textblock_cursor_word_start(cur);
> +ck_assert_int_eq(0, evas_textblock_cursor_pos_get(cur));
>}
>
>  /* Make sure coords are correct for ligatures */
>



--
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
__

Re: [E-devel] [EGIT] [core/elementary] master 01/01: entry/test: make scrollable entries visible

2014-10-30 Thread thie...@gmail.com
Hello,

Yes, we can do that way too.
The reason for fixing is that I just want to see entries at the beginning, so 
that we can notice entries exist.
Before that, I always forgot about their existence.
I think it would be a normal  operation if the entries do not show their 
content when we resize, since window is small.

Best Regards,
Thiep Ha

- Reply message -
From: "Daniel Juyung Seo" 
To: "Enlightenment developer list" 
Cc: 
Subject: [E-devel] [EGIT] [core/elementary] master 01/01: entry/test: make 
scrollable entries visible
Date: Thu, Oct 30, 2014 9:11 pm


Hi

How about setting the min height to the scrollable entry instead of
increasing the window size?
The entry will not show its contents when the window is resized down again.

Thanks.

Daniel Juyung Seo (SeoZ)


On Wed, Oct 29, 2014 at 5:42 PM, Thiep Ha  wrote:

> tasn pushed a commit to branch master.
>
>
> http://git.enlightenment.org/core/elementary.git/commit/?id=9d06e52ac0d0f71c1d57cd6ea17b4304db6a73d9
>
> commit 9d06e52ac0d0f71c1d57cd6ea17b4304db6a73d9
> Author: Thiep Ha 
> Date:   Wed Oct 29 08:37:10 2014 +
>
> entry/test: make scrollable entries visible
>
> Summary:
> Two scrollable entries' size is too small to view.
> This patch expands window size to have suitable size for entries.
>
> @fix
>
> Reviewers: Hermet, seoz, woohyun, tasn
>
> Reviewed By: tasn
>
> Differential Revision: https://phab.enlightenment.org/D1597
> ---
>  src/bin/test_entry.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/bin/test_entry.c b/src/bin/test_entry.c
> index 9f08ed4..025e7c7 100644
> --- a/src/bin/test_entry.c
> +++ b/src/bin/test_entry.c
> @@ -620,7 +620,7 @@ test_entry_scrolled(void *data EINA_UNUSED,
> Evas_Object *obj EINA_UNUSED, void *
> evas_object_show(bx3);
>
> elm_object_focus_set(win, EINA_TRUE);
> -   evas_object_resize(win, 320, 300);
> +   evas_object_resize(win, 320, 500);
> evas_object_show(win);
>  }
>
>
> --
>
>
>
--
___
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
___
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel