diff options
Diffstat (limited to 'src/layout/movie.c')
-rw-r--r-- | src/layout/movie.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/layout/movie.c b/src/layout/movie.c index 6e44997..79416cd 100644 --- a/src/layout/movie.c +++ b/src/layout/movie.c @@ -259,6 +259,35 @@ static void _recent_item_selected(struct _priv *priv, app_media *am) viewmgr_push_view(VIEW_VIEWER); } +static void _recent_key_down_cb(void *data, Evas_Object *obj, + Evas_Event_Key_Down *ev) +{ + struct view_update_data vdata; + struct datamgr *dmgr; + struct _priv *priv; + + if (!data || !ev) + return; + + priv = data; + + dmgr = priv->dmgr[E_DATA_MEDIA]; + if (!dmgr) + return; + + if (!strcmp(ev->keyname, KEY_MENU) || + !strcmp(ev->keyname, KEY_CONTEXT_MENU)) { + vdata.list = dmgr->ops->get_list(dmgr->handle, + E_LIST_MEDIA, NULL); + vdata.index = util_get_media_index(vdata.list, + priv->recent_info); + vdata.id = VIEW_BASE; + + viewmgr_update_view(VIEW_ACTION_MENU, UPDATE_CONTENT, &vdata); + viewmgr_show_view(VIEW_ACTION_MENU); + } +} + static void _recent_selected_cb(void *data, Evas_Object *obj) { struct _priv *priv; @@ -300,6 +329,7 @@ static struct listmgr_data *_create_listmgr_data(struct _priv *priv) pdata->draw = _draw_recent; pdata->update = _update_recent; + pdata->key_down_cb = _recent_key_down_cb; pdata->selected_cb = _recent_selected_cb; pdata->cb_data = priv; |