On Fri, 10 Apr 2009 11:34:29 +0400 Sergey Semernin <sergey.semer...@gmail.com>
said:

in svn! thanks!

> Hello, All.
> 
> In E_Dialog space key grabbed before than keydown event reach to entry widget
> in E_Entry_Dialog. Thus, I forced ungrab space key in e_entry_dialog_show
> constructor. Moreover, I added escape key handling in _e_entry_cb_key_down
> callback.
> 
> I do not delete space key grub in E_Dialog, because, I think, it may be
> usefull here, when we need selecting controls with space. Or not?
> 
>  e_entry_dialog.c |   14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
> 
> Index: e/src/bin/e_entry_dialog.c
> ===================================================================
> --- e/src/bin/e_entry_dialog.c        (revision 39904)
> +++ e/src/bin/e_entry_dialog.c        (working copy)
> @@ -18,6 +18,7 @@
>     E_Entry_Dialog *ed;
>     E_Dialog *dia;
>     Evas_Object *o, *ob;
> +   Evas_Modifier_Mask mask;
>     int w, h;
>  
>     ed = E_OBJECT_ALLOC(E_Entry_Dialog, E_ENTRY_DIALOG_TYPE,
> _e_entry_dialog_free); @@ -37,6 +38,9 @@
>     dia->data = ed;
>     ed->dia = dia;
>     
> +   mask = 0;
> +   evas_object_key_ungrab(dia->event_object, "space", mask, ~mask);
> +   
>     e_win_delete_callback_set(dia->win, _e_entry_dialog_delete);
>     
>     if (title) e_dialog_title_set(dia, title);
> @@ -116,10 +120,10 @@
>     E_Entry_Dialog *ed;
>     
>     ev = event_info;
> -   if (strcmp(ev->keyname, "Return")) return;
>     if (!(ed = data)) return;
> -   e_object_ref(E_OBJECT(ed));
> -   if (ed->ok.func) ed->ok.func(ed->text, ed->ok.data);
> -   e_object_del(E_OBJECT(ed));
> -   e_object_unref(E_OBJECT(ed));
> +   if (!strcmp(ev->keyname, "Return")) 
> +      _e_entry_dialog_ok(data, ed->dia);
> +   else
> +      if (!strcmp(ev->keyname, "Escape"))
> +         _e_entry_dialog_cancel(data, ed->dia);
>  }
> 
> 
> Sincerely yours, Sergey.
> 
> --
> Jabber/XMPP: sergey.semer...@gmail.com
> Cellular: +7-909-206-5992
> 
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> High Quality Requirements in a Collaborative Environment.
> Download a free trial of Rational Requirements Composer Now!
> http://p.sf.net/sfu/www-ibm-com
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to