Fix genlist issue again: 50/37450/2
authorKim Tae Soo <taesoo46.kim@samsung.com>
Thu, 26 Mar 2015 23:09:04 +0000 (08:09 +0900)
committerTaeSoo Kim <taesoo46.kim@samsung.com>
Thu, 26 Mar 2015 23:22:43 +0000 (16:22 -0700)
According to the EFL specs, the index of genlist starts with 1.

Change-Id: I95d3c0ab2a9d96ae3f278db2d135e35d1938ae35
Signed-off-by: Kim Tae Soo <taesoo46.kim@samsung.com>
src/views/playback-view.cpp

index 90f9921..35f1642 100644 (file)
@@ -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();
 }