Enlightenment CVS committal Author : codewarrior Project : e17 Module : proto
Dir : e17/proto/etk/src/lib Modified Files: etk_combobox.c Log Message: - combo box key / mouse behaviour: enter = activate + close space = activate (keep open) left mouse = activate + close right mouse = activate (keep open) other mouse = ignore =================================================================== RCS file: /cvs/e/e17/proto/etk/src/lib/etk_combobox.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- etk_combobox.c 9 Apr 2006 10:39:52 -0000 1.7 +++ etk_combobox.c 11 Apr 2006 13:51:44 -0000 1.8 @@ -908,7 +908,11 @@ else if (strcmp(event->keyname, "Return") == 0 || strcmp(event->keyname, "space") == 0 || strcmp(event->keyname, "KP_Enter") == 0) { if (combobox->selected_item) + { etk_combobox_active_item_set(combobox, combobox->selected_item); + if (strcmp(event->keyname, "Return") == 0 || strcmp(event->keyname, "KP_Enter") == 0) + etk_popup_window_popdown(combobox->window); + } } else if (strcmp(event->keyname, "Escape") == 0) etk_popup_window_popdown(combobox->window); @@ -939,11 +943,21 @@ /* Called when the mouse releases the item */ static void _etk_combobox_item_mouse_up_cb(Etk_Object *object, void *event_info, void *data) { + Etk_Event_Mouse_Up_Down *event; Etk_Combobox_Item *item; if (!(item = ETK_COMBOBOX_ITEM(object))) return; + + event = event_info; + + if (event->button != 1 && event->button != 3) + return; + etk_combobox_item_activate(item); + + if (event->button == 1) + etk_popup_window_popdown(ETK_COMBOBOX(item->combobox)->window); } /************************** ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs