forked from enlightenment/efl
Elementary gengrid: Pressing the enter(return) key on the selected item now fires the "clicked" callback the same way double clicking does.
SVN revision: 57135
This commit is contained in:
parent
d77a5f3daa
commit
0050463206
|
@ -969,7 +969,7 @@ extern "C" {
|
||||||
*
|
*
|
||||||
* selected - User has selected a item.
|
* selected - User has selected a item.
|
||||||
* unselected - User has unselected 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.
|
* realized - An evas object for a item was built.
|
||||||
* unrealized - An evas object for a item was deleted.
|
* unrealized - An evas object for a item was deleted.
|
||||||
* changed - An item has been added, removed, resized or moved,
|
* changed - An item has been added, removed, resized or moved,
|
||||||
|
|
|
@ -12,8 +12,9 @@
|
||||||
*
|
*
|
||||||
* Signals that you can add callbacks for are:
|
* Signals that you can add callbacks for are:
|
||||||
*
|
*
|
||||||
* clicked - The user has double-clicked a item. The event_info
|
* clicked - The user has double-clicked or pressed enter on
|
||||||
* parameter is the Gengrid item that was double-clicked.
|
* a item. The event_infoparameter is the Gengrid item
|
||||||
|
* that was double-clicked.
|
||||||
*
|
*
|
||||||
* selected - The user has made an item selected. The event_info
|
* selected - The user has made an item selected. The event_info
|
||||||
* parameter is the Gengrid item that was selected.
|
* 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;
|
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
|
||||||
return EINA_TRUE;
|
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;
|
else return EINA_FALSE;
|
||||||
|
|
||||||
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
|
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
|
||||||
|
|
Loading…
Reference in New Issue