HelloI've made a patch for efm "Open with..." dialog. Now one is able to cancel the dialog using Esc key, and open file with Enter. Besides i made a focus on "Custom command" - so after dialog shows a user is able to type a command and just press Enter to open the file.
I hope it is ok for commit :)
regards, manio jabber/e-mail: ma...@skyboo.net http://manio.skyboo.net
Index: trunk/e/src/modules/fileman/e_fwin.c =================================================================== --- e_fwin.c (revision 40686) +++ e_fwin.c (working copy) @@ -72,6 +72,7 @@ Evas_Object *o_all; Evas_Object *o_entry; char *exec_cmd; + Ecore_Event_Handler *fad_keydown_handler; }; typedef enum @@ -118,6 +119,7 @@ static E_Fwin_Exec_Type _e_fwin_file_is_exec(E_Fm2_Icon_Info *ici); static void _e_fwin_file_exec(E_Fwin_Page *page, E_Fm2_Icon_Info *ici, E_Fwin_Exec_Type ext); static void _e_fwin_file_open_dialog(E_Fwin_Page *page, Eina_List *files, int always); +static int _e_fwin_file_open_dialog_cb_key_down(void *data, int type, void *event); static void _e_fwin_pan_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y); static void _e_fwin_pan_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y); @@ -1925,10 +1927,28 @@ e_widget_min_size_get(ot, &mw, &mh); e_dialog_content_set(dia, ot, mw, mh); + fad->fad_keydown_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _e_fwin_file_open_dialog_cb_key_down, page); e_dialog_show(dia); e_dialog_border_icon_set(dia, "preferences-applications"); + e_widget_focus_set(fad->o_entry, 0); } +static int +_e_fwin_file_open_dialog_cb_key_down(void *data, int type, void *event) +{ + Ecore_Event_Key *ev; + E_Fwin *fwin; + E_Fwin_Page *page; + + page = data; + fwin = page->fwin; + ev = event; + + if (!strcmp(ev->keyname, "Escape")) _e_fwin_cb_close(fwin->fad, fwin->fad->dia); + if (!strcmp(ev->keyname, "Return")) _e_fwin_cb_open(fwin->fad, fwin->fad->dia); + return 1; +} + static int _e_fwin_dlg_cb_desk_sort(const void *p1, const void *p2) { @@ -2026,6 +2046,8 @@ dia = (E_Dialog *)obj; fad = dia->data; + if (fad->fad_keydown_handler) + ecore_event_handler_del(fad->fad_keydown_handler); eina_stringshare_del(fad->app2); E_FREE(fad->exec_cmd); fad->fwin->fad = NULL;
------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects
_______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel