From: Sergey Semernin <>

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?

SVN revision: 39936
This commit is contained in:
Sergey Semernin 2009-04-10 14:21:36 +00:00 committed by Carsten Haitzler
parent 992597240a
commit 5c62d98898
1 changed files with 9 additions and 5 deletions

View File

@ -18,6 +18,7 @@ e_entry_dialog_show(const char *title, const char *icon, const char *text,
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 @@ e_entry_dialog_show(const char *title, const char *icon, const char *text,
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_cb_key_down(void *data, Evas_Object *obj, void *event_info)
E_Entry_Dialog *ed;
ev = event_info;
if (strcmp(ev->keyname, "Return")) return;
if (!(ed = data)) return;
if (ed->ok.func) ed->ok.func(ed->text, ed->;
if (!strcmp(ev->keyname, "Return"))
_e_entry_dialog_ok(data, ed->dia);
if (!strcmp(ev->keyname, "Escape"))
_e_entry_dialog_cancel(data, ed->dia);