Fixed Genlist default styles 66/54466/3 accepted/tizen/mobile/20151217.224206 submit/tizen_mobile/20151217.135835
authorbhutani.92 <bhutani.92@samsung.com>
Tue, 15 Dec 2015 11:07:49 +0000 (16:37 +0530)
committerbhutani.92 <bhutani.92@samsung.com>
Thu, 17 Dec 2015 09:00:52 +0000 (14:30 +0530)
Change-Id: Ia1af69bba4c9aba20d89b36ad13dc8affc4eb1f1
Signed-off-by: bhutani.92 <bhutani.92@samsung.com>
music-chooser/src/mc-common.c
music-chooser/src/mc-group-list.c
music-chooser/src/mc-track-list.c
src/widget/mp-folder-list.c
src/widget/mp-now-playing-list.c
src/widget/mp-playlist-list.c
src/widget/mp-search-list.c

index 1dd0ae6..f4662d1 100755 (executable)
@@ -277,10 +277,10 @@ char *mc_artist_text_get(void *data, Evas_Object *obj, const char *part)
        MP_CHECK_NULL(item_data);
        mp_media_info_h handle = item_data->media;
 
-       if (strcmp(part, "elm.text.main.left.top") == 0) {
+       if (strcmp(part, "elm.text") == 0) {
                mp_media_info_group_get_main_info(handle, &text);
                return g_strdup(text);
-       } else if (strcmp(part, "elm.text.sub.left.bottom") == 0) {
+       } else if (strcmp(part, "elm.text.sub") == 0) {
                char **album_thumbs = NULL;
                int song_count;
                int album_count = 0;
@@ -308,11 +308,11 @@ char *mc_album_text_get(void *data, Evas_Object *obj, const char *part)
        mp_media_info_h handle = item_data->media;
 
        int ret = 0;
-       if (strcmp(part, "elm.text.main.left.top") == 0) {
+       if (strcmp(part, "elm.text") == 0) {
                ret = mp_media_info_group_get_main_info(handle, &text);
                MP_CHECK_NULL(ret == 0);
                return g_strdup(text);
-       } else if (strcmp(part, "elm.text.sub.left.bottom") == 0) {
+       } else if (strcmp(part, "elm.text.sub") == 0) {
                ret = mp_media_info_group_get_sub_info(handle, &text);
                MP_CHECK_NULL(ret == 0);
                return g_strdup(text);
index 5ac63b4..082c4d8 100644 (file)
@@ -137,22 +137,22 @@ _mc_itc_init(int type, group_list_data_t *ld)
        ld->itc.func.del = _mc_group_list_gl_del;
        switch (type) {
        case MP_GROUP_BY_ALBUM:
-               ld->itc.item_style = "2line.top";
+               ld->itc.item_style = "type1";
                ld->itc.func.text_get = mc_album_text_get;
                ld->type = MP_GROUP_BY_ALBUM;
                break;
        case MP_GROUP_BY_ARTIST:
-               ld->itc.item_style = "2line.top";
+               ld->itc.item_style = "type1";
                ld->itc.func.text_get = mc_artist_text_get;
                ld->type = MP_GROUP_BY_ARTIST;
                break;
        case MP_GROUP_BY_PLAYLIST:
-               ld->itc.item_style = "2line.top";
+               ld->itc.item_style = "type1";
                ld->itc.func.text_get = mc_playlist_text_get;
                ld->type = MP_GROUP_BY_PLAYLIST;
                break;
        case MP_GROUP_BY_FOLDER:
-               ld->itc.item_style = "2line.top";
+               ld->itc.item_style = "type1";
                ld->itc.func.text_get = mc_folder_list_label_get;
                ld->type = MP_GROUP_BY_FOLDER;
                break;
index b815f10..c8a02cc 100755 (executable)
@@ -158,7 +158,7 @@ static Evas_Object *_gl_content_get(void *data, Evas_Object *obj, const char *pa
                }
        }
 
-       if (!strcmp(part, "elm.icon.1")) {
+       if (!strcmp(part, "elm.swallow.icon")) {
                content = elm_layout_add(obj);
                mp_media_info_get_thumbnail_path(media, &thumbpath);
                icon = elm_image_add(obj);
@@ -175,7 +175,7 @@ static Evas_Object *_gl_content_get(void *data, Evas_Object *obj, const char *pa
                return content;
        }
 
-       if ((!strcmp(part, "elm.icon.2") && (it_data->ad->select_type == MC_SELECT_SINGLE_RINGTONE || it_data->ad->select_type == MC_SELECT_SINGLE))) { // swallow checkbox or radio button
+       if ((!strcmp(part, "elm.swallow.end") && (it_data->ad->select_type == MC_SELECT_SINGLE_RINGTONE || it_data->ad->select_type == MC_SELECT_SINGLE))) {    // swallow checkbox or radio button
                if (it_data->ad->select_uri && it_data->ad->select_type == MC_SELECT_SINGLE_RINGTONE) {
                        char *filepath = NULL;
                        mp_media_info_get_file_path(media, &filepath);
@@ -194,7 +194,7 @@ static Evas_Object *_gl_content_get(void *data, Evas_Object *obj, const char *pa
                evas_object_propagate_events_set(check, EINA_TRUE);
                elm_layout_theme_set(content, "layout", "list/C/type.2", "default");
                elm_layout_content_set(content, "elm.swallow.content", check);
-       } else if ((!strcmp(part, "elm.icon.right") && (it_data->ad->select_type == MC_SELECT_MULTI))) {
+       } else if ((!strcmp(part, "elm.swallow.end") && (it_data->ad->select_type == MC_SELECT_MULTI))) {
                content = elm_check_add(obj);
                elm_check_state_pointer_set(content, &it_data->checked);
                elm_object_style_set(content, "default/genlist");
@@ -266,8 +266,8 @@ static char *_gl_text_get(void *data, Evas_Object *obj, const char *part)
        mp_retv_if(!uri, NULL);
 
        int ret = 0;
-       if ((!strcmp(part, "elm.text.main.left.top")) || (!strcmp(part, "elm.text.sub.left.bottom"))) {
-               if (!strcmp(part, "elm.text.main.left.top")) {
+       if ((!strcmp(part, "elm.text")) || (!strcmp(part, "elm.text.sub"))) {
+               if (!strcmp(part, "elm.text")) {
                        ret = mp_media_info_get_title(media,  &title);
                        MP_CHECK_NULL(ret == 0);
                } else {
@@ -945,7 +945,7 @@ Evas_Object *mc_track_list_create(Evas_Object *parent, struct app_data *ad)
        evas_object_data_set(layout, "list_data", ld);
        evas_object_event_callback_add(layout, EVAS_CALLBACK_FREE, _layout_del_cb, ld);
 
-       ld->itc.item_style = "2line.top";
+       ld->itc.item_style = "type1";
        ld->itc.func.content_get = _gl_content_get;
        ld->itc.func.text_get = _gl_text_get;
        ld->itc.func.del = _gl_del;
index 9994bcd..af38fbf 100755 (executable)
@@ -631,9 +631,7 @@ void _mp_folder_list_update(void *thiz)
                if (!list->itc) {
                        list->itc = elm_genlist_item_class_new();
                        if (list->itc) {
-                               list->itc->item_style = "2line.top";
-                               //list->itc->decorate_all_item_style = "musiclist/edit_default";
-                               //list->itc->decorate_item_style = folder_slide_style;
+                               list->itc->item_style = "type1";
                                list->itc->func.text_get = _mp_folder_list_label_get;
                                list->itc->func.content_get = _mp_folder_list_icon_get;
                                list->itc->func.del = _mp_folder_list_item_del_cb;
index 3596c81..0ad3afa 100755 (executable)
@@ -43,9 +43,9 @@ _mp_now_playing_list_label_get(void *data, Evas_Object * obj, const char *part)
        struct appdata *ad = mp_util_get_appdata();
        mp_plst_item * current = mp_playlist_mgr_get_current(ad->playlist_mgr);
 
-       if (!strcmp(part, "elm.text.main.left.top") || !strcmp(part, "elm.text.sub.left.bottom")) {
+       if (!strcmp(part, "elm.text") || !strcmp(part, "elm.text.sub")) {
                char *title = NULL;
-               if (!strcmp(part, "elm.text.main.left.top")) {
+               if (!strcmp(part, "elm.text")) {
                        mp_media_info_get_title(track,  &title);
                } else {
                        mp_media_info_get_artist(track, &title);
@@ -120,7 +120,7 @@ _mp_now_playing_list_content_get(void *data, Evas_Object * obj, const char *part
                }
        }
 
-       if (!g_strcmp0(part, "elm.icon.1")) {
+       if (!g_strcmp0(part, "elm.swallow.icon")) {
                char *thumbpath = NULL;
 
                mp_media_info_get_thumbnail_path(track, &thumbpath);
@@ -403,7 +403,7 @@ _mp_now_playing_list_update(void *thiz)
 
                        list->itc = elm_genlist_item_class_new();
                        MP_CHECK(list->itc);
-                       list->itc->item_style = "2line.top";
+                       list->itc->item_style = "type1";
                        list->itc->func.text_get = _mp_now_playing_list_label_get;
                        list->itc->func.content_get = _mp_now_playing_list_content_get;
                        list->itc->func.del = _mp_now_playing_list_item_del_cb;
index 36c2aa0..ff0eb3d 100755 (executable)
@@ -67,7 +67,7 @@ _mp_playlist_list_label_get(void *data, Evas_Object * obj, const char *part)
        MP_CHECK_NULL(plst_item);
 
        int ret = 0;
-       if (!strcmp(part, "elm.text.main") || !strcmp(part, "elm.text")) {
+       if (!strcmp(part, "elm.text")) {
 
                char *name = NULL;
                ret = mp_media_info_group_get_main_info(plst_item, &name);
@@ -75,7 +75,7 @@ _mp_playlist_list_label_get(void *data, Evas_Object * obj, const char *part)
                mp_retvm_if(name == NULL, NULL, "Fail to get value");
 
                return elm_entry_utf8_to_markup(GET_STR(name));
-       } else if (!strcmp(part, "elm.text.sub.left.bottom")) {
+       } else if (!strcmp(part, "elm.text.sub")) {
                int count = -1;
                int plst_id = -1;
                int total_time = 0;
@@ -970,9 +970,7 @@ _mp_playlist_list_genlist_create(MpPlaylistList_t *list)
        if (!list->itc_auto) {
                list->itc_auto = elm_genlist_item_class_new();
                MP_CHECK(list->itc_auto);
-               //list->itc_auto->item_style = "music/2line.top";
-               list->itc_auto->item_style = "2line.top";
-               //list->itc_auto->decorate_all_item_style = "decorate/edit_default";
+               list->itc_auto->item_style = "type1";
                list->itc_auto->func.text_get = _mp_playlist_list_label_get;
                list->itc_auto->func.content_get = _mp_playlist_list_icon_get;
                list->itc_auto->func.del = _mp_playlist_list_item_del_cb;
index 13e49d4..8a5e339 100755 (executable)
@@ -268,7 +268,6 @@ _mp_search_album_list_label_get(void *data, Evas_Object * obj, const char *part)
                return g_strdup(name);
        }
 
-       DEBUG_TRACE("Unusing part: %s", part);
        return NULL;
 }