<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="@PACKAGE_NAME@" version="1.2.0" install-location="internal-only">
+<manifest xmlns="http://tizen.org/ns/packages" package="@PACKAGE_NAME@" version="1.2.1" install-location="internal-only">
<label>Simple Menu-screen</label>
<author email="jinny.yoon@samsung.com" href="www.samsung.com">Jin Yoon</author>
<author email="yjoo93.park@samsung.com" href="www.samsung.com">Youngjoo Park</author>
#define KEY_LEFT "Left"
#define KEY_RIGHT "Right"
+#define KEY_UP "Up"
+#define KEY_DOWN "Down"
static Eina_Bool _key_release_cb(void *data, int type, void *event)
{
Evas_Event_Key_Up *ev = event;
Evas_Object *scroller = evas_object_data_get(all_apps, "scroller");
break_if(NULL == scroller);
- int left = 0;
if (!strcmp(ev->keyname, KEY_SELECT) || !strcmp(ev->keyname, KEY_BACK)) {
if (popup_exist()) {
popup_destroy_all();
if (all_apps_layout_is_edited(all_apps)) {
all_apps_layout_unedit(all_apps);
}
- } else if ((left = !strcmp(ev->keyname, KEY_LEFT)) ||
- !strcmp(ev->keyname, KEY_RIGHT))
+ } else if (!strcmp(ev->keyname, KEY_LEFT) ||
+ !strcmp(ev->keyname, KEY_RIGHT) ||
+ !strcmp(ev->keyname, KEY_UP) ||
+ !strcmp(ev->keyname, KEY_DOWN))
{
int cur_idx = page_scroller_get_current_page_no(scroller);
int idx = 0, x = 0, w = 0;
break;
}
- int vector = left ? -1 : 1;
- if (x % w) {
- page_scroller_focus_into_vector(scroller, vector);
+ /* If there are no items to be focused after pressing keys,
+ Menu-screen forces to focus the first item of the other page */
+ int rest = x % w;
+ if (rest) {
+ page_scroller_focus_into_vector(scroller, rest > w / 2 ? -1 : 1);
}
}
} while (0);