diff options
author | Minkyu Kang <mk7.kang@samsung.com> | 2015-09-16 14:25:04 +0900 |
---|---|---|
committer | Minkyu Kang <mk7.kang@samsung.com> | 2015-09-16 14:25:04 +0900 |
commit | 8bbcaa610b7952edf0f3058b0099d874c1cd71b9 (patch) | |
tree | 3b656bf0b4280265fe3fb4619c450ec0e90ec4d8 | |
parent | fbfc2393cf390509957d19b78c9c8d19bff09f56 (diff) | |
download | air_livetv-8bbcaa610b7952edf0f3058b0099d874c1cd71b9.tar.gz air_livetv-8bbcaa610b7952edf0f3058b0099d874c1cd71b9.tar.bz2 air_livetv-8bbcaa610b7952edf0f3058b0099d874c1cd71b9.zip |
modify key values as key_define
Change-Id: If3e317a0ff95d5acb98176afdb94cca4d2e704ec
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
-rw-r--r-- | src/layout_channelinfo.c | 5 | ||||
-rw-r--r-- | src/layout_channelinfo_list.c | 12 | ||||
-rw-r--r-- | src/layout_channelinfo_search.c | 5 | ||||
-rw-r--r-- | src/main.c | 8 | ||||
-rw-r--r-- | src/view_action_menu.c | 9 | ||||
-rw-r--r-- | src/view_channelinfo.c | 11 | ||||
-rw-r--r-- | src/view_channelnumber.c | 6 |
7 files changed, 20 insertions, 36 deletions
diff --git a/src/layout_channelinfo.c b/src/layout_channelinfo.c index 6226ae0..1f28e94 100644 --- a/src/layout_channelinfo.c +++ b/src/layout_channelinfo.c @@ -76,10 +76,9 @@ static void _key_down_cb(int id, void *data, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev) { if (!strcmp(ev->keyname, KEY_BACK) || - !strcmp(ev->keyname, KEY_BACK_REMOTE) || - !strcmp(ev->keyname, KEY_EXIT)) { + !strcmp(ev->keyname, KEY_ESC) || + !strcmp(ev->keyname, KEY_EXIT)) viewmgr_hide_view(VIEW_CHANNELINFO); - } } static void _hide_finished_cb(void *data, Evas_Object *obj, diff --git a/src/layout_channelinfo_list.c b/src/layout_channelinfo_list.c index 760d565..d64743c 100644 --- a/src/layout_channelinfo_list.c +++ b/src/layout_channelinfo_list.c @@ -178,7 +178,7 @@ static void _key_down_cb(int id, void *data, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev) { if (!strcmp(ev->keyname, KEY_BACK) || - !strcmp(ev->keyname, KEY_BACK_REMOTE) || + !strcmp(ev->keyname, KEY_ESC) || !strcmp(ev->keyname, KEY_EXIT)) { viewmgr_hide_view(VIEW_CHANNELINFO); } @@ -315,15 +315,13 @@ static void _update(void *layout_data, int type, void *data) return; } - if (!strcmp(ev->keyname, KEY_CHANNELUP) || - !strcmp(ev->keyname, KEY_CHANNELUP_REMOTE)) { + if (!strcmp(ev->keyname, KEY_CHANNELUP)) { r = _set_next_channel(priv, CHANNEL_NEXT); if (r < 0) _ERR("failed to set next channel"); else _update_channel_info(priv); - } else if (!strcmp(ev->keyname, KEY_CHANNELDOWN) || - !strcmp(ev->keyname, KEY_CHANNELDOWN_REMOTE)) { + } else if (!strcmp(ev->keyname, KEY_CHANNELDOWN)) { r = _set_next_channel(priv, CHANNEL_PREV); if (r < 0) _ERR("failed to set prev channel"); @@ -339,9 +337,7 @@ static void _update(void *layout_data, int type, void *data) } if (!strcmp(ev->keyname, KEY_CHANNELUP) || - !strcmp(ev->keyname, KEY_CHANNELUP_REMOTE) || - !strcmp(ev->keyname, KEY_CHANNELDOWN) || - !strcmp(ev->keyname, KEY_CHANNELDOWN_REMOTE)) { + !strcmp(ev->keyname, KEY_CHANNELDOWN)) { if (!priv->channel_info) { _ERR("failed to get channel info"); return; diff --git a/src/layout_channelinfo_search.c b/src/layout_channelinfo_search.c index 4267b7f..bd89866 100644 --- a/src/layout_channelinfo_search.c +++ b/src/layout_channelinfo_search.c @@ -68,13 +68,12 @@ static void _key_down_cb(int id, void *data, Evas *e, Evas_Object *obj, { int op; - if (!strcmp(ev->keyname, KEY_ENTER) || - !strcmp(ev->keyname, KEY_ENTER_REMOTE)) { + if (!strcmp(ev->keyname, KEY_ENTER)) { ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; _tune_channel(data); } else if (!strcmp(ev->keyname, KEY_BACK) || - !strcmp(ev->keyname, KEY_BACK_REMOTE) || + !strcmp(ev->keyname, KEY_ESC) || !strcmp(ev->keyname, KEY_EXIT)) { viewmgr_hide_view(VIEW_CHANNELINFO); } else if (!strcmp(ev->keyname, KEY_UP) || @@ -56,9 +56,9 @@ static struct key_map g_kmap[] = { { VIEW_CHANNELINFO, { - KEY_ENTER, KEY_ENTER_REMOTE, - KEY_CHANNELUP, KEY_CHANNELUP_REMOTE, - KEY_CHANNELDOWN, KEY_CHANNELDOWN_REMOTE + KEY_ENTER, + KEY_CHANNELUP, + KEY_CHANNELDOWN } }, { @@ -72,7 +72,7 @@ static struct key_map g_kmap[] = { { VIEW_ACTION_MENU, { - KEY_MENU, KEY_MENU_REMOTE + KEY_MENU, KEY_CONTEXT_MENU } }, }; diff --git a/src/view_action_menu.c b/src/view_action_menu.c index 6c21921..a7d56b7 100644 --- a/src/view_action_menu.c +++ b/src/view_action_menu.c @@ -276,7 +276,7 @@ static void _key_down_cb(int id, void *data, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev) { if (!strcmp(ev->keyname, KEY_BACK) || - !strcmp(ev->keyname, KEY_BACK_REMOTE)) + !strcmp(ev->keyname, KEY_ESC)) viewmgr_hide_view(VIEW_ACTION_MENU); ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; @@ -332,11 +332,8 @@ static void _button_clicked(Evas_Object *obj, int id, void *data) static void _button_key_up_cb(int id, void *data, Evas *e, Evas_Object *obj, Evas_Event_Key_Up *ev) { - if (strcmp(ev->keyname, KEY_ENTER) && - strcmp(ev->keyname, KEY_ENTER_REMOTE)) - return; - - _button_clicked(obj, id, data); + if (!strcmp(ev->keyname, KEY_ENTER)) + _button_clicked(obj, id, data); } static void _button_mouse_up_cb(int id, void *data, Evas *e, diff --git a/src/view_channelinfo.c b/src/view_channelinfo.c index 20d40c4..610e5a3 100644 --- a/src/view_channelinfo.c +++ b/src/view_channelinfo.c @@ -195,17 +195,14 @@ static void _update(void *view_data, int type, void *data) return; } - if (!strcmp(ev->keyname, KEY_ENTER) || - !strcmp(ev->keyname, KEY_ENTER_REMOTE)) { + if (!strcmp(ev->keyname, KEY_ENTER)) { if (!priv->current_layout) _set_current_layout(priv, LAYOUT_CHANNELINFO); else _set_current_layout(priv, LAYOUT_CHANNELINFO_SEARCH); } else if (!strcmp(ev->keyname, KEY_CHANNELUP) || - !strcmp(ev->keyname, KEY_CHANNELUP_REMOTE) || - !strcmp(ev->keyname, KEY_CHANNELDOWN) || - !strcmp(ev->keyname, KEY_CHANNELDOWN_REMOTE)) { + !strcmp(ev->keyname, KEY_CHANNELDOWN)) { if (priv->current_layout && !strcmp(priv->current_layout, LAYOUT_CHANNELINFO_SEARCH)) @@ -226,9 +223,7 @@ static void _update(void *view_data, int type, void *data) } if (!strcmp(ev->keyname, KEY_CHANNELUP) || - !strcmp(ev->keyname, KEY_CHANNELUP_REMOTE) || - !strcmp(ev->keyname, KEY_CHANNELDOWN) || - !strcmp(ev->keyname, KEY_CHANNELDOWN_REMOTE)) { + !strcmp(ev->keyname, KEY_CHANNELDOWN)) { if (priv->current_layout && !strcmp(priv->current_layout, LAYOUT_CHANNELINFO_SEARCH)) diff --git a/src/view_channelnumber.c b/src/view_channelnumber.c index bf1ce0c..44971cd 100644 --- a/src/view_channelnumber.c +++ b/src/view_channelnumber.c @@ -43,9 +43,8 @@ static void _key_down_cb(int id, void *data, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev) { if (!strcmp(ev->keyname, KEY_BACK) || - !strcmp(ev->keyname, KEY_BACK_REMOTE)) { + !strcmp(ev->keyname, KEY_ESC)) viewmgr_hide_view(VIEW_CHANNELNUMBER); - } } static input_handler key_handler = { @@ -113,8 +112,7 @@ static void _tune_channel(void *data) static void _channel_key_down_cb(int id, void *data, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev) { - if (!strcmp(ev->keyname, KEY_ENTER) || - !strcmp(ev->keyname, KEY_ENTER_REMOTE)) { + if (!strcmp(ev->keyname, KEY_ENTER)) { ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; _tune_channel(data); |