summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJehun Lim <jehun.lim@samsung.com>2015-11-26 06:56:49 (GMT)
committerJehun Lim <jehun.lim@samsung.com>2015-11-26 06:57:51 (GMT)
commit37f4aea8000a9f41c81d2457f30dfa0fe28deb4d (patch)
tree2f03b478107235a564074de1b74cee3e95b8ef3b
parent0e0216489a6ba1830f612cd8705baa1a8e6d4c00 (diff)
downloadair_mediahub-37f4aea8000a9f41c81d2457f30dfa0fe28deb4d.zip
air_mediahub-37f4aea8000a9f41c81d2457f30dfa0fe28deb4d.tar.gz
air_mediahub-37f4aea8000a9f41c81d2457f30dfa0fe28deb4d.tar.bz2
Change-Id: I4291580ea522d578f168624ecf418e610b022118
-rw-r--r--src/view/base.c31
1 files changed, 25 insertions, 6 deletions
diff --git a/src/view/base.c b/src/view/base.c
index c48c22b..4aa3680 100644
--- a/src/view/base.c
+++ b/src/view/base.c
@@ -550,6 +550,29 @@ static bool _draw_title(struct _priv *priv)
return true;
}
+static void _set_menu_focus(struct _priv *priv)
+{
+ Evas_Object *btn_l, *btn_r;
+ int i;
+
+ for (i = 0; i < E_LAYOUT_MAX; i++) {
+ if (i == 0)
+ btn_l = priv->menu_btn[i];
+ else
+ btn_l = priv->menu_btn[i - 1];
+
+ if (i == E_LAYOUT_MAX - 1)
+ btn_r = priv->menu_btn[i];
+ else
+ btn_r = priv->menu_btn[i + 1];
+
+ elm_object_focus_next_object_set(priv->menu_btn[i],
+ btn_l, ELM_FOCUS_LEFT);
+ elm_object_focus_next_object_set(priv->menu_btn[i],
+ btn_r, ELM_FOCUS_RIGHT);
+ }
+}
+
static bool _draw_menu_btn(struct _priv *priv)
{
Evas_Object *box, *btn;
@@ -588,16 +611,12 @@ static bool _draw_menu_btn(struct _priv *priv)
priv->menu_btn[i] = btn;
}
+ _set_menu_focus(priv);
+
evas_object_show(box);
elm_object_part_content_set(priv->base, PART_BASE_MENU_AREA, box);
- elm_object_focus_next_object_set(priv->menu_btn[E_LAYOUT_MAX - 1],
- priv->menu_btn[0], ELM_FOCUS_RIGHT);
- elm_object_focus_next_object_set(priv->menu_btn[0],
- priv->menu_btn[E_LAYOUT_MAX - 1],
- ELM_FOCUS_LEFT);
-
return true;
}