From: Kim Tae Soo Date: Thu, 26 Mar 2015 23:09:04 +0000 (+0900) Subject: Fix genlist issue again: X-Git-Tag: accepted/tizen/tv/20150331.005013~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F50%2F37450%2F2;p=profile%2Ftv%2Fapps%2Fnative%2Fmusicplayer.git Fix genlist issue again: According to the EFL specs, the index of genlist starts with 1. Change-Id: I95d3c0ab2a9d96ae3f278db2d135e35d1938ae35 Signed-off-by: Kim Tae Soo --- diff --git a/src/views/playback-view.cpp b/src/views/playback-view.cpp index 90f9921..35f1642 100644 --- a/src/views/playback-view.cpp +++ b/src/views/playback-view.cpp @@ -1342,7 +1342,7 @@ public: if (!strcmp(part, "elm.text0")) { index = elm_genlist_item_index_get(pItemInfo->item); - snprintf(buf, sizeof(buf), "%d", index + 1); + snprintf(buf, sizeof(buf), "%d", index); if ((index & 1) == 1) { elm_object_item_signal_emit(pItemInfo->item, MUSIC_SIGNAL_EVEN_ROW, MUSIC_PLAYBACK_VIEW); @@ -1644,7 +1644,7 @@ void CPlaybackView::m_HandleGenlistItemActivated(Evas_Object *obj, Elm_Object_It index = elm_genlist_item_index_get(genListItem); - m->hMusicController->PlayIndexSong(index); + m->hMusicController->PlayIndexSong(--index); m_UpdateCurrentSongInfo(); }