Fix focus bug when sort button is disabled. 23/36923/1 submit/tizen_tv/20150317.062857
authorKim Tae Soo <taesoo46.kim@samsung.com>
Tue, 17 Mar 2015 06:27:12 +0000 (15:27 +0900)
committerKim Tae Soo <taesoo46.kim@samsung.com>
Tue, 17 Mar 2015 06:27:12 +0000 (15:27 +0900)
Change-Id: I7e7b49500c18ee304fcb917eb6648596a4e91978
Signed-off-by: Kim Tae Soo <taesoo46.kim@samsung.com>
src/views/base-view.cpp

index 39d1b6f..1b3093a 100644 (file)
@@ -895,12 +895,21 @@ void CMusicBaseView::t_OnUpdate(void *data)
                if (!layout_id)
                        return;
 
-               elm_object_disabled_set(m->sortbtn, EINA_FALSE);
                if (!strcmp(layout_id, MUSIC_ALBUM_SONGS_LAYOUT) ||
                        !strcmp(layout_id, MUSIC_CATEGORY_SONGS_LAYOUT) ||
                        !strcmp(layout_id, MUSIC_CATEGORY_ALBUM_LAYOUT) ||
-                       !strcmp(layout_id, MUSIC_CATEGORY_SELECTLIST_LAYOUT))
+                       !strcmp(layout_id, MUSIC_CATEGORY_SELECTLIST_LAYOUT)) {
                        elm_object_disabled_set(m->sortbtn, EINA_TRUE);
+                       elm_object_focus_next_object_set(m->plbackbtn, m->srcbtn, ELM_FOCUS_RIGHT);
+                       elm_object_focus_next_object_set(m->srcbtn, m->plbackbtn, ELM_FOCUS_LEFT);
+               }
+               else {
+                       elm_object_disabled_set(m->sortbtn, EINA_FALSE);
+                       elm_object_focus_next_object_set(m->plbackbtn, m->sortbtn, ELM_FOCUS_RIGHT);
+                       elm_object_focus_next_object_set(m->sortbtn, m->srcbtn, ELM_FOCUS_RIGHT);
+                       elm_object_focus_next_object_set(m->srcbtn, m->sortbtn, ELM_FOCUS_LEFT);
+                       elm_object_focus_next_object_set(m->sortbtn, m->plbackbtn, ELM_FOCUS_LEFT);
+               }
        }
        else if (update_type == E_DEPTH_UPDATE) {
                if (!layout_id)