Hi, ChunEon.
The processing of KP_Enter is missed in your patch.
I think KP_Enter or Return key should be processed in the same way.
I think you had better to use "activated" smart callback of elm_entry
widget.

Thanks.

On Thursday, March 6, 2014, ChunEon Park <her...@hermet.pe.kr> wrote:

> hermet pushed a commit to branch master.
>
>
> http://git.enlightenment.org/tools/enventor.git/commit/?id=acaca0129c470e7694552b594356295d810ef50a
>
> commit acaca0129c470e7694552b594356295d810ef50a
> Author: ChunEon Park <her...@hermet.pe.kr <javascript:;>>
> Date:   Thu Mar 6 23:26:44 2014 +0900
>
>     search - improve usage
>
>     replace text if user press the enter key at the replace entry.
> ---
>  src/bin/search.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/src/bin/search.c b/src/bin/search.c
> index e3c03a0..e9e562a 100644
> --- a/src/bin/search.c
> +++ b/src/bin/search.c
> @@ -195,6 +195,16 @@ find_key_down_cb(void *data, Evas *e EINA_UNUSED,
> Evas_Object *obj EINA_UNUSED,
>     find_forward_proc(sd);
>  }
>
> +static void
> +replace_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj
> EINA_UNUSED,
> +                    void* event_info)
> +{
> +   Evas_Event_Key_Down *ev = event_info;
> +   if (strcmp(ev->key, "Return")) return;
> +   search_data *sd = data;
> +   replace_proc(sd);
> +}
> +
>  void
>  search_open()
>  {
> @@ -248,6 +258,8 @@ search_open()
>     Evas_Object *entry_replace = elm_entry_add(layout);
>     elm_entry_single_line_set(entry_replace, EINA_TRUE);
>     elm_entry_scrollable_set(entry_replace, EINA_TRUE);
> +   evas_object_event_callback_add(entry_replace, EVAS_CALLBACK_KEY_DOWN,
> +                                     replace_key_down_cb, sd);
>     evas_object_size_hint_weight_set(entry_replace, EVAS_HINT_EXPAND,0);
>     evas_object_size_hint_align_set(entry_replace, EVAS_HINT_FILL, 0);
>     elm_object_part_content_set(layout, "elm.swallow.replace_entry",
>
> --
>
>
>
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to