From: titan Date: Thu, 17 Feb 2011 20:12:43 +0000 (+0000) Subject: Elementary gengrid: Pressing the enter(return) key on the selected item now fires... X-Git-Tag: REL_F_I9500_20120323_1~17^2~3140 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ed29a6ce22f1dc18a8fd915d506711406470def1;p=framework%2Fuifw%2Felementary.git Elementary gengrid: Pressing the enter(return) key on the selected item now fires the "clicked" callback the same way double clicking does. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@57135 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in index be87b4b..c3354e6 100644 --- a/src/lib/Elementary.h.in +++ b/src/lib/Elementary.h.in @@ -969,7 +969,7 @@ extern "C" { * * selected - User has selected a item. * unselected - User has unselected a item. - * clicked - User has double-clicked a item. + * clicked - User has double-clicked or pressed enter on a item. * realized - An evas object for a item was built. * unrealized - An evas object for a item was deleted. * changed - An item has been added, removed, resized or moved, diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index 788fca2..0a65596 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -12,8 +12,9 @@ * * Signals that you can add callbacks for are: * - * clicked - The user has double-clicked a item. The event_info - * parameter is the Gengrid item that was double-clicked. + * clicked - The user has double-clicked or pressed enter on + * a item. The event_infoparameter is the Gengrid item + * that was double-clicked. * * selected - The user has made an item selected. The event_info * parameter is the Gengrid item that was selected. @@ -430,6 +431,11 @@ _event_hook(Evas_Object *obj, ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; return EINA_TRUE; } + else if (!strcmp(ev->keyname, "Return")) + { + item = elm_gengrid_selected_item_get(obj); + evas_object_smart_callback_call(item->wd->self, "clicked", item); + } else return EINA_FALSE; ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;