This patch adds rounded background for JIRAs TIZENIOT-1630, TIZENIOT-1589 38/236738/7 submit/tizen/20200629.130700
authorJagrat Patidar <j1.patidar@samsung.com>
Sat, 20 Jun 2020 13:12:25 +0000 (18:42 +0530)
committerJagrat Patidar <j1.patidar@samsung.com>
Mon, 29 Jun 2020 11:59:45 +0000 (17:29 +0530)
Change-Id: If877672de770775823d2ad015ffdf73b5a10d1ff
Signed-off-by: Jagrat Patidar <j1.patidar@samsung.com>
37 files changed:
images/music_player/lite/core_button_reorder.png
images/music_player/mini_controller/icon_player_pause.png
images/music_player/mini_controller/icon_player_play.png
images/music_player/mini_controller/music_btn_player_next_nor.png
images/music_player/mini_controller/music_btn_player_pause_nor.png
images/music_player/mini_controller/music_btn_player_play_nor.png
images/music_player/mini_controller/music_btn_player_prev_nor.png
res/edje/mp-button.edc
res/edje/mp-list.edc
res/edje/mp-view.edc
res/images/horizontal_divider.png [new file with mode: 0644]
res/images/play_icon_shuffle.png [new file with mode: 0644]
res/images/playall.png [new file with mode: 0644]
res/po/en.po
res/po/en_PH.po
res/po/en_US.po
src/common/mp-widget.c
src/include/music.h
src/mp-main.c
src/view/include/mp-all-view.h
src/view/mp-album-detail-view.c
src/view/mp-all-view.c
src/view/mp-edit-view.c
src/view/mp-playlist-detail-view.c
src/view/mp-view.c
src/widget/include/mp-album-detail-list.h
src/widget/include/mp-album-list.h
src/widget/include/mp-artist-detail-list.h
src/widget/include/mp-artist-list.h
src/widget/include/mp-track-list.h
src/widget/mp-album-detail-list.c
src/widget/mp-album-list.c
src/widget/mp-artist-detail-list.c
src/widget/mp-artist-list.c
src/widget/mp-list.c
src/widget/mp-now-playing-list.c
src/widget/mp-track-list.c

index 21a06ec9e8094c51731c73d0cc009d6ee3ac23de..4eb1c92894b5891220a9176886af9360de78b5f7 100755 (executable)
Binary files a/images/music_player/lite/core_button_reorder.png and b/images/music_player/lite/core_button_reorder.png differ
index 4b1875925102910cc695acc99073b7faa25e5554..d7d02c233462c5d7269745eeb72c31a033fa7fdd 100755 (executable)
Binary files a/images/music_player/mini_controller/icon_player_pause.png and b/images/music_player/mini_controller/icon_player_pause.png differ
index 5862a77778b9d42e6bc2ed95aab72b48a73093f5..62c1b74501580f794ec30597d7eed9a7008f0182 100755 (executable)
Binary files a/images/music_player/mini_controller/icon_player_play.png and b/images/music_player/mini_controller/icon_player_play.png differ
index f911d3abcb3c617c2597f35a2f3c82e092dec0f8..44deb119ff1656d36ca74d11a60454af6cffa3fb 100755 (executable)
Binary files a/images/music_player/mini_controller/music_btn_player_next_nor.png and b/images/music_player/mini_controller/music_btn_player_next_nor.png differ
index 392da396500123f14053cfad1012d00bb2849b01..d7d02c233462c5d7269745eeb72c31a033fa7fdd 100755 (executable)
Binary files a/images/music_player/mini_controller/music_btn_player_pause_nor.png and b/images/music_player/mini_controller/music_btn_player_pause_nor.png differ
index 68dfaab469f2ea47a2247197589985a9db82e4bd..62c1b74501580f794ec30597d7eed9a7008f0182 100755 (executable)
Binary files a/images/music_player/mini_controller/music_btn_player_play_nor.png and b/images/music_player/mini_controller/music_btn_player_play_nor.png differ
index cab6d1a18dec76b2e321fdb6818f7774577dc9e9..6fc5737ca85a075bdb760cd0aee4fcb1c9912acf 100755 (executable)
Binary files a/images/music_player/mini_controller/music_btn_player_prev_nor.png and b/images/music_player/mini_controller/music_btn_player_prev_nor.png differ
index 2896a6c84119e70641b7866b214009d038647552..561053cb6fdcb653710d52ac79b2b35d3fade723 100755 (executable)
@@ -2171,7 +2171,8 @@ group {
                        repeat_events: 1;
                        description {
                                state: "default" 0.0;
-                               min: 100 0;
+                               min: 28 22;
+                               max: 28 22;
                                rel1.to: "elm.swallow.content";
                                rel2.to: "elm.swallow.content";
                                align: 1.0 0.5;
index 9d2dfacc9c500eaecfb5869c120f2edeeb264799..31b1158fd649a8f30a8020cafe712b38de0b588b 100755 (executable)
  */
 
 #define TABBAR_H 75
+#define PADDING_SIZE 40
 
 group {
        name: "list_layout";
        parts{
+               part {
+                       name: "base";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               color: 238 239 241 255;
+                       }
+               }
+               part {
+                       name: "padding.left";
+                       type: SPACER;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               min: PADDING_SIZE 0;
+                               max: PADDING_SIZE -1;
+                               fixed: 1 0;
+                               align: 0.0 0.0;
+                               rel.to: "base";
+                       }
+               }
+               part {
+                       name: "padding.right";
+                       type: SPACER;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               min: PADDING_SIZE 0;
+                               max: PADDING_SIZE -1;
+                               fixed: 1 0;
+                               align: 1.0 0.0;
+                               rel.to: "base";
+                       }
+               }
+               part{
+                       name: "control_bg";
+                       type: RECT;
+                       scale: 1;
+                       description{
+                               state: "default" 0.0;
+                               align: 0 0;
+                               rel1 { relative: 1.0 0.0; to: "padding.left";}
+                               rel2 { relative: 0.0 1.0; to: "padding.right";}
+                               min: 1200 40;
+                               max: 1200 40;
+                               fixed: 1 1;
+                               color: 0 0 0 0;
+                       }
+               }
+               part{
+                       name: "control_part";
+                       type: SWALLOW;
+                       description{
+                               state: "default" 0.0;
+                               rel1 { relative: 0.0 0.0; to: "control_bg";}
+                               rel2 { relative: 1.0 1.0; to: "control_bg";}
+                       }
+               }
                part {
                        name : "list_content";
                        type: SWALLOW;
                        mouse_events: 1;
                        description {
                                state: "default" 0.0;
-                               rel1 { relative: 0.0 0.0;}
+                               rel1 { relative: 0.0 0.0;}
                                rel2 { relative: 1.0 1.0;}
                        }
                        description {
@@ -34,7 +94,26 @@ group {
                                rel2 { relative: 0.0 1.0; to_x:"right_pad";}
                        }
                }
-
+               part {
+                       name : "track_list_content";
+                       type: SWALLOW;
+                       mouse_events: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: 1.0 0.0; to: "padding.left"; offset: 0 40;}
+                               rel2 { relative: 0.0 1.0; to: "padding.right"; }
+                       }
+                       description {
+                               state: "edit" 0.0;
+                               rel1 { relative: 1.0 0.0; to: "padding.left";}
+                               rel2 { relative: 0.0 1.0; to: "padding.right"; }
+                       }
+                       description {
+                               state: "fastscroll.visible" 0.0;
+                               rel1 { relative: 1.0 0.0; to: "padding.left"; offset: 0 40;}
+                               rel2 { relative: 0.0 1.0; to: "padding.right"; }
+                       }
+               }
                part{
                        name: "right_pad";
                        type: SPACER;
@@ -56,8 +135,8 @@ group {
                                state: "default" 0.0;
                                visible: 0;
                                fixed: 0 1;
-                               rel1 { relative: 0.0 0.0;}
-                               rel2 { relative: 1.0 1.0;}
+                               rel1 { relative: 0.0 0.0; }
+                               rel2 { relative: 1.0 1.0; }
                        }
                        description {
                                state: "fastscroll.visible" 0.0;
@@ -65,6 +144,7 @@ group {
                                visible: 1;
                        }
                }
+
        }
 
        programs {
@@ -82,6 +162,87 @@ group {
                        target : "elm.swallow.content.index";
                        target : "list_content";
                }
+               program { name: "edit_view";
+                        signal: "edit_signal";
+                        source: "edit_source";
+                        action: STATE_SET "edit" 0.0;
+                        target: "track_list_content";
+                }
+       }
+}
+
+group { name: "list_control_layout";
+       parts {
+               part {  name : "bg";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               color: 0 0 0 0;
+                       }
+               }
+               part {  name : "label_part";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: 0.0 0/40; to: "bg";}
+                               rel2 { relative: 500/1200 26/40; to: "bg"; }
+                               color: 0 0 0 0;
+                       }
+               }
+               part {  name : "label_part_swallow";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               align: 0 0.5;
+                               rel1 { relative: 0.0 0.0; to: "label_part";}
+                               rel2 { relative: 1.0 1.0; to: "label_part"; }
+                       }
+               }
+               part {  name : "shuffle_part";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               align: 0 0;
+                               rel1 { relative: 1108.51/1200 4/40; to: "bg";}
+                               rel2 { relative: 1132.51/1200 28/40; to: "bg"; }
+                               color: 0 0 0 0;
+                       }
+               }
+               part {  name : "shuffle_part_swallow";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               align: 0 0;
+                               rel1 { relative: 0.0 0.0; to: "shuffle_part";}
+                               rel2 { relative: 1.0 1.0; to: "shuffle_part"; }
+                       }
+               }
+               part {  name : "play_all_part";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               align: 0 0;
+                               rel1 { relative: 1168/1200 6.5/40; to: "bg";}
+                               rel2 { relative: 1194/1200 27.5/40; to: "bg"; }
+                               color: 0 0 0 0;
+                       }
+               }
+               part {  name : "play_all_part_swallow";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               align: 0 0;
+                               rel1 { relative: 0.0 0.0; to: "play_all_part";}
+                               rel2 { relative: 1.0 1.0; to: "play_all_part"; }
+                       }
+               }
        }
 }
 
@@ -279,3 +440,5 @@ group { name: "landscape_playlist_shortcut_layout";
        }
 }
 
+
+
index 9fc49128393be6258e5be27371014db57d34bafe..338ddc71ab19c966b6939a3c4d44c80886076402 100755 (executable)
@@ -44,32 +44,50 @@ group {
                                color: BG_COLOR;
                        }
                }
-               part { name: "tabbar";
-                               type: SWALLOW;
-                               scale: 1;
-                               description { state: "default" 0.0;
-                                               min: 0 0;
-                                               fixed: 0 1;
-                                               rel1 { relative: 0.0 0.0; }
-                                               rel2 { relative: 1.0 0.0; }
-                                               align: 0.5 0.0;
-                                               visible: 0;
-                               }
-                               description { state: "show" 0.0;
-                                               inherit: "default" 0.0;
-                                               rel1 { relative: 0.0 0.0; }
-                                               rel2 { relative: 1.0 0.052; }
-                                               visible: 1;
-                               }
-
+               part {
+                       name: "padding.left";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               min: PADDING_SIZE 0;
+                               max: PADDING_SIZE -1;
+                               fixed: 1 0;
+                               align: 0.0 0.0;
+                               rel.to: "background";
+                               color: 255 0 0 255;
+                       }
+               }
+               part {
+                       name: "padding.right";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               min: 60 0;
+                               max: 60 -1;
+                               fixed: 1 0;
+                               align: 1.0 0.0;
+                               rel.to: "background";
+                               color: 0 255 0 255;
+                       }
+               }
+               part { name: "ref";
+                       type: SPACER;
+                       mouse_events: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: 0.0 0.0; }
+                               rel2 { relative: 1.0 0.0; }
+                       }
                }
                part { name: "info_text_bar_clip";
                        type: RECT;
                        scale: 1;
                        mouse_events: 0;
                        description { state: "default" 0.0;
-                                rel1 { relative: 0.0 1.0;  to: "tabbar";}
-                               rel2 { relative: 1.0 0.5;  to: "tabbar";}
+                                rel1 { relative: 0.0 1.0;  to: "ref";}
+                               rel2 { relative: 1.0 0.5;  to: "ref";}
                                min: 0 0;
                                fixed: 0 1;
                                align: 0.0 0.0;
@@ -128,8 +146,8 @@ group {
                                state: "default" 0.0;
                                fixed: 1 1;
                                color: 255 255 255 255;
-                               rel1 { relative: 0 0; to: "info_text_bar_clip"; }
-                               rel2 { relative: 1 0.5; to: "info_text_bar_clip"; }
+                               rel1 { relative: 1 0; to: "padding.left"; }
+                               rel2 { relative: 0 0.5; to: "padding.right"; }
                        }
                }
                part { name: "select_all_bg";
@@ -159,7 +177,25 @@ group {
                                rel2 { relative: 1.0 1.0; to_y: "now_playing_overlap";}
                        }
                }
+               part { name: "tabbar";
+                       type: SWALLOW;
+                       scale: 1;
+                       description { state: "default" 0.0;
+                               min: 0 0;
+                               fixed: 0 1;
+                               rel1 { relative: 0.0 0.0; }
+                               rel2 { relative: 1.0 0.0; }
+                               align: 0.5 0.0;
+                               visible: 0;
+                       }
+                       description { state: "show" 0.0;
+                               inherit: "default" 0.0;
+                               rel1 { relative: 0.0 0.9125; }
+                               rel2 { relative: 1.0 1.0; }
+                               visible: 1;
+                       }
 
+               }
                part{
                        name: "now_playing_overlap";
                        type: RECT;
@@ -198,7 +234,7 @@ group {
                                inherit: "default" 0.0;
                                visible: 1;
                                rel1 {
-                                       relative: 0.0 530/610;
+                                       relative: 0.0 560/640;
                                }
                                rel2 {
                                        relative: 1.0 1.0;
@@ -216,7 +252,6 @@ group {
                        }
                }
        }
-
        programs {
                program {
                        name : "show_now_playng";
@@ -245,7 +280,6 @@ group {
                        target : "list_content";
                        target : "now_playing_overlap";
                }
-
                program { name: "show_info_text_bar";
                        signal: "SHOW_INFO_TEXT_BAR";
                        source: "*";
@@ -279,6 +313,465 @@ group {
        }
 }
 
+
+
+group { name: "album_detail_layout";
+       images {
+               image: mp_player_bg.png COMP;
+               image: divider.png COMP;
+               image: horizontal_divider.png COMP;
+       }
+
+       parts {
+               part {
+                       name: "base";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               color: 238 239 241 255;
+                       }
+               }
+               part {
+                       name: "padding.left";
+                       type: SPACER;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               min: PADDING_SIZE 0;
+                               max: PADDING_SIZE -1;
+                               fixed: 1 0;
+                               align: 0.0 0.0;
+                               rel.to: "base";
+                       }
+               }
+               part {
+                       name: "padding.right";
+                       type: SPACER;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               min: PADDING_SIZE 0;
+                               max: PADDING_SIZE -1;
+                               fixed: 1 0;
+                               align: 1.0 0.0;
+                               rel.to: "base";
+                       }
+               }
+               part {
+                       name: "background";
+                       mouse_events: 0;
+                       type: IMAGE;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: 1.0 0.0; to: "padding.left"; }
+                               rel2 { relative: 0.0 0.95; to: "padding.right"; }
+                               visible: 1;
+                               image { normal: mp_player_bg.png;}
+                       }
+                       description {
+                               state: "dim" 0.0;
+                               inherit: "default";
+                               image { normal: PV_BG_PATH_DIM;}
+                       }
+               }
+               part {  name: "album_area";
+                       mouse_events: 1;
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               fixed: 1 1;
+                               visible: 1;
+                               rel1 {
+                                       relative: 140/1200 40/600; to: "background";
+                               }
+                               rel2 {
+                                       relative: 460/1200 360/600; to: "background";
+                               }
+                               color: 0 0 0 0;
+                       }
+               }
+               part {  name : "album_image";
+                       type: SWALLOW;
+                       mouse_events: 1;
+                       scale: 1;
+                       description {
+                               fixed: 1 1;
+                               align: 0.5 0.5;
+                               rel1 {
+                                       relative: 0.0 0.0; to: "album_area";
+                               }
+                               rel2 {
+                                       relative: 1.0 1.0; to: "album_area";
+                               }
+                               color: 125 255 0 255;
+                       }
+
+               }
+               part {
+                       name: "player_view_title_bg";
+                       mouse_events: 0;
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               align: 0 0;
+                               fixed: 1 1;
+                               visible: 1;
+                               rel1 { relative: 135/1200 400/600; to: "background";}
+                               rel2 { relative: 465/1200 431/600; to: "background";}
+                               color: 0 0 0 0;
+                       }
+               }
+               part {
+                       name: "player_view_title_main";
+                       mouse_events: 0;
+                       type: TEXT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               align: 0.5 0.5;
+                               fixed: 1 1;
+                               visible: 1;
+                               text {
+                                  font: "Tizen:style=Regular";
+                                  size: 26;
+                                  min: 0 0;
+                                  align: 0.5 1.0;
+                               }
+                               rel1 { relative: 0.0 0.0; to: "player_view_title_bg";}
+                               rel2 { relative: 1.0 1.0; to: "player_view_title_bg";}
+                               color: 0 0 0 255;
+                       }
+               }
+               part {
+                       name: "player_view_subtitle_bg";
+                       mouse_events: 0;
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               align: 0 0;
+                               fixed: 1 1;
+                               visible: 1;
+                               rel1 { relative: 157/1200 447/600; to: "background";}
+                               rel2 { relative: 443/1200 469/600; to: "background";}
+                               color: 0 0 0 0;
+                       }
+               }
+               part {
+                       name: "player_view_title_subtitle";
+                       mouse_events: 0;
+                       type: TEXT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               align: 0.5 0.5;
+                               fixed: 1 1;
+                               visible: 1;
+                               text {
+                                  font: "Tizen:style=Regular";
+                                  size: 18;
+                                  min: 0 0;
+                                  align: 0.5 1.0;
+                               }
+                               rel1 { relative: 0.0 0.0; to: "player_view_subtitle_bg";}
+                               rel2 { relative: 1.0 1.0; to: "player_view_subtitle_bg";}
+                               color: 0 0 0 255;
+                       }
+               }
+               part { name: "tabbar";
+                               type: SWALLOW;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                               min: 0 0;
+                                               fixed: 0 1;
+                                               rel1 { relative: 0.0 0.0; }
+                                               rel2 { relative: 1.0 0.0; }
+                                               align: 0.5 0.0;
+                                               visible: 0;
+                               }
+                               description { state: "show" 0.0;
+                                               inherit: "default" 0.0;
+                                               rel1 { relative: 0.0 0.0; }
+                                               rel2 { relative: 1.0 0.052; }
+                                               visible: 1;
+                               }
+
+               }
+               part {
+                       name : "list_content";
+                       type: SWALLOW;
+                       mouse_events: 1;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: 0.5 0.0; to: "background"; }
+                               rel2 { relative: 1.0 1.0; to: "background";}
+                       }
+               }
+               part {
+                       name: "divider_part";
+                       type: IMAGE;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 1;
+                               align: 1 0;
+                               fixed: 1 1;
+                               rel1 { relative: 600/1200 0; to: "background";}
+                               rel2 { relative: 601/1200 1; to: "background";}
+                               min: 1 600;
+                               max: 1 600;
+                               image { normal: divider.png;}
+                       }
+               }
+               part{
+                       name: "now_playing_overlap";
+                       type: RECT;
+                       scale: 1;
+                       description { state: "default" 0.0;
+                               fixed: 0 1;
+                               align: 0.5 0.0;
+                               min: 0 0;
+                               visible: 0;
+                               rel1{relative: 0.0 0.0; to, "now_playing";}
+                               rel2{relative: 1.0 0.0; to, "now_playing";}
+                               color: 0 0 0 0;
+                       }
+                       description { state: "show" 0.0;
+                               inherit: "default" 0.0;
+                               min: 0 0;
+                       }
+
+               }
+               part{
+                       name: "now_playing";
+                       type: SWALLOW;
+                       mouse_events: 1;
+                       scale: 1;
+                       description { state: "default" 0.0;
+                               fixed: 1 1;
+                               visible: 0;
+                               rel1 {
+                                       relative: 0.0 1.0;
+                               }
+                               rel2 {
+                                       relative: 1.0 1.0;
+                               }
+                       }
+                       description { state: "show" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               rel1 {
+                                       relative: 0.0 560/640;
+                               }
+                               rel2 {
+                                       relative: 1.0 1.0;
+                               }
+                       }
+                       description { state: "landscape_show" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               rel1 {
+                                       relative: 0.0 0.8765625;
+                               }
+                               rel2 {
+                                       relative: 1.0 1.0;
+                               }
+                       }
+               }
+   
+       }
+       programs {
+               program {
+                       name : "show_now_playng";
+                       signal : "SHOW_NOW_PLAING";
+                       source : "music_app";
+                       action : STATE_SET "show" 0.0;
+                       target : "now_playing";
+                       target : "list_content";
+                       target : "now_playing_overlap";
+               }
+               program {
+                       name : "landscape_show_now_playng";
+                       signal : "LANDSCAPE_SHOW_NOW_PLAING";
+                       source : "music_app";
+                       action : STATE_SET "landscape_show" 0.0;
+                       target : "now_playing";
+                       target : "list_content";
+                       target : "now_playing_overlap";
+               }
+               program {
+                       name : "hide_now_playng";
+                       signal : "HIDE_NOW_PLAING";
+                       source : "music_app";
+                       action : STATE_SET "default" 0.0;
+                       target : "now_playing";
+                       target : "list_content";
+                       target : "now_playing_overlap";
+               }
+                program { name: "show_tabbar";
+                        signal: "SHOW_TABBAR";
+                        source: "*";
+                        action: STATE_SET "show" 0.0;
+                        target: "tabbar";
+                }
+       }
+}
+
+group { name: "album_detail_list_layout";
+       images {
+               image: mp_player_bg.png COMP;
+               image: divider.png COMP;
+               image: horizontal_divider.png COMP;
+       }
+       parts {
+               part {
+                       name: "background";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               color: 0 0 0 0;
+                       }
+               }
+               part {  name : "control_part";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: 0 0; to: "background";}
+                               rel2 { relative: 1 72/600; to: "background";}
+                               min: 600 72;
+                               max: 600 72;
+                               fixed: 1 1;
+                               color: 0 0 0 0;
+                       }
+               }
+               part {  name : "control_part_swallow";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               align: 0 0;
+                               rel1 { relative: 0.0 0.0; to: "control_part";}
+                               rel2 { relative: 1.0 1.0; to: "control_part"; }
+                       }
+               }
+               part {
+                       name: "horizontal_divider_part";
+                       type: IMAGE;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 1;
+                               align: 1 0;
+                               fixed: 1 1;
+                               rel1 { relative: 40/600 72/600; to: "background";}
+                               rel2 { relative: 420/600 73/600; to: "background";}
+                               min: 380 1;
+                               max: 380 1;
+                               image { normal: horizontal_divider.png;}
+                       }
+               }
+               part {
+                       name : "list_content";
+                       type: SWALLOW;
+                       mouse_events: 1;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: 0 73/600; to: "background"; }
+                               rel2 { relative: 1.0 0.95; to: "background";}
+                       }
+               }
+       }
+}
+
+group { name: "album_detail_list_control_layout";
+       images {
+               image: mp_player_bg.png COMP;
+               image: divider.png COMP;
+               image: horizontal_divider.png COMP;
+       }
+       parts {
+               part {
+                       name: "background";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               color: 0 0 0 0;
+                       }
+               }
+               part {  name : "label_part";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: 40/600 23/72; to: "background";}
+                               rel2 { relative: 240/600 49/72; to: "background";}
+                               color: 0 0 0 0;
+                       }
+               }
+               part {  name : "label_part_swallow";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               align: 0 0.5;
+                               rel1 { relative: 0.0 0.0; to: "label_part";}
+                               rel2 { relative: 1.0 1.0; to: "label_part"; }
+                       }
+               }
+               part {  name : "shuffle_part";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               align: 0 0;
+                               rel1 { relative: 489/600 24/72; to: "background";}
+                               rel2 { relative: 513/600 48/72; to: "background";}
+                               color: 0 0 0 0;
+                       }
+               }
+               part {  name : "shuffle_part_swallow";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               align: 0 0;
+                               rel1 { relative: 0.0 0.0; to: "shuffle_part";}
+                               rel2 { relative: 1.0 1.0; to: "shuffle_part"; }
+                       }
+               }
+               part {  name : "play_all_part";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               align: 0 0;
+                               rel1 { relative: 548/600 27/72; to: "background";}
+                               rel2 { relative: 574/600 48/72; to: "background";}
+                               color: 0 0 0 0;
+                       }
+               }
+               part {  name : "play_all_part_swallow";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               align: 0 0;
+                               rel1 { relative: 0.0 0.0; to: "play_all_part";}
+                               rel2 { relative: 1.0 1.0; to: "play_all_part"; }
+                       }
+               }
+       }
+}
+
 group { name: "common_view_layout";
       parts {
          part { name: "bg";
@@ -292,7 +785,13 @@ group { name: "common_view_layout";
             scale: 1;
             description { state: "default" 0.0;
                fixed: 0 1;
-               rel1 { relative: 0.0 0.875; }
+               rel1 { relative: 0.0 0.9125; }
+               rel2 { relative: 1.0 1.0; }
+               align: 0.5 0.0;
+            }
+            description { state: "reduce_size" 0.0;
+               fixed: 0 1;
+               rel1 { relative: 0.0 0.9; }
                rel2 { relative: 1.0 1.0; }
                align: 0.5 0.0;
             }
@@ -302,11 +801,31 @@ group { name: "common_view_layout";
             scale: 1;
             description { state: "default" 0.0;
                rel1 { relative: 0.0 0.0; }
-               rel2 { relative: 1.0 0.875; }
+               rel2 { relative: 1.0 0.9125; }
+            }
+            description { state: "reduce_size" 0.0;
+               rel1 { relative: 0.0 0.0; }
+               rel2 { relative: 1.0 0.9; }
             }
          }
       }
-   }
+      programs{      
+               program { name: "reduce_tabbar";
+                        signal: "reduce_signal";
+                        source: "reduce_source";
+                        action: STATE_SET "reduce_size" 0.0;
+                        target: "tabbar";
+                        target: "list-content";
+                }
+               program { name: "default_tabbar";
+                        signal: "default_signal";
+                        source: "default_source";
+                        action: STATE_SET "default" 0.0;
+                        target: "tabbar";
+                        target: "list-content";
+                }
+       }
+}
 
 group { name: "genre_view_layout";
       parts {
diff --git a/res/images/horizontal_divider.png b/res/images/horizontal_divider.png
new file mode 100644 (file)
index 0000000..4189b93
Binary files /dev/null and b/res/images/horizontal_divider.png differ
diff --git a/res/images/play_icon_shuffle.png b/res/images/play_icon_shuffle.png
new file mode 100644 (file)
index 0000000..dd96542
Binary files /dev/null and b/res/images/play_icon_shuffle.png differ
diff --git a/res/images/playall.png b/res/images/playall.png
new file mode 100644 (file)
index 0000000..e621b5c
Binary files /dev/null and b/res/images/playall.png differ
index 5a5ab32534fee8c5bb5a58d5a36e7a55f86b0142..dc3df2e29b7efb5ed8132c187aac889d0b5b9e7a 100755 (executable)
@@ -464,7 +464,7 @@ msgid "IDS_MUSIC_BODY_YOU_CAN_CONTROL_MUSIC_PLAYER_WITH_THE_VOICE_COMMANDS_P1SS_
 msgstr "You can control Music Player with the voice commands %1$s, %2$s, %3$s, %4$s, %5$s, and %6$s."
 
 msgid "IDS_MUSIC_HEADER_SHUFFLE_PD_TRACKS"
-msgstr "Shuffle %d tracks"
+msgstr "%d tracks"
 
 msgid "IDS_MUSIC_BODY_MORE_INFO"
 msgstr "More info"
@@ -737,7 +737,7 @@ msgid "IDS_MUSIC_BODY_1_TRACK"
 msgstr "1 track"
 
 msgid "IDS_MUSIC_HEADER_SHUFFLE_1_TRACK"
-msgstr "Shuffle 1 track"
+msgstr "1 track"
 
 msgid "IDS_MUSIC_POP_NO_MUSIC_FOUND_FOR_SELECTED_CELL"
 msgstr "No music found for selected cell"
index 01934e53ff9dfcea315b168337e580fe74acfe31..3b7e894be41602688c374bbbfc3fc607ac6c32e9 100755 (executable)
@@ -464,7 +464,7 @@ msgid "IDS_MUSIC_BODY_YOU_CAN_CONTROL_MUSIC_PLAYER_WITH_THE_VOICE_COMMANDS_P1SS_
 msgstr "You can control Music Player with the voice commands %1$s, %2$s, %3$s, %4$s, %5$s, and %6$s."
 
 msgid "IDS_MUSIC_HEADER_SHUFFLE_PD_TRACKS"
-msgstr "Shuffle %d tracks"
+msgstr "%d tracks"
 
 msgid "IDS_MUSIC_BODY_MORE_INFO"
 msgstr "More info"
@@ -737,7 +737,7 @@ msgid "IDS_MUSIC_BODY_1_TRACK"
 msgstr "1 track"
 
 msgid "IDS_MUSIC_HEADER_SHUFFLE_1_TRACK"
-msgstr "Shuffle 1 track"
+msgstr "1 track"
 
 msgid "IDS_MUSIC_POP_NO_MUSIC_FOUND_FOR_SELECTED_CELL"
 msgstr "No music found for selected cell"
index 84ef43de50f912be5dd9eb6dc25fff3c3782f5b5..eb9763c7ea77ead573e2a72e876c6c7c7c56092d 100755 (executable)
@@ -464,7 +464,7 @@ msgid "IDS_MUSIC_BODY_YOU_CAN_CONTROL_MUSIC_PLAYER_WITH_THE_VOICE_COMMANDS_P1SS_
 msgstr "You can control Music Player with the voice commands %1$s, %2$s, %3$s, %4$s, %5$s, and %6$s."
 
 msgid "IDS_MUSIC_HEADER_SHUFFLE_PD_TRACKS"
-msgstr "Shuffle %d tracks"
+msgstr "%d tracks"
 
 msgid "IDS_MUSIC_BODY_MORE_INFO"
 msgstr "More info"
@@ -737,7 +737,7 @@ msgid "IDS_MUSIC_BODY_1_TRACK"
 msgstr "1 track"
 
 msgid "IDS_MUSIC_HEADER_SHUFFLE_1_TRACK"
-msgstr "Shuffle 1 track"
+msgstr "1 track"
 
 msgid "IDS_MUSIC_POP_NO_MUSIC_FOUND_FOR_SELECTED_CELL"
 msgstr "No music found for selected cell"
index 756f03cdda93d147e881e9d1ea2a5caaee7feb85..d78cac47eac1adb524095e8bb2f8c0acc8db3c18 100755 (executable)
@@ -23,7 +23,7 @@
 #endif
 #include "mp-file-util.h"
 #include "mp-define.h"
-
+#include "mp-all-view.h"
 #define MAX_LEN_VIB_DURATION 0.5
 #define DEF_BUF_LEN            (512)
 
@@ -613,7 +613,6 @@ Evas_Object *mp_widget_create_no_contents(Evas_Object * parent,
 {
        MP_CHECK_NULL(parent);
        startfunc;
-
        Evas_Object *content = NULL;
 
        if (type == MP_NOCONTENT_NORMAL || type == MP_NOCONTENT_PLAYLIST
@@ -894,7 +893,7 @@ bool mp_widget_create_select_all_layout(Evas_Object * pParent,
        evas_object_smart_callback_add(pSelectAllCheckbox, "changed",
                                                                   pChangeFunc, pUserData);
        evas_object_propagate_events_set(pSelectAllCheckbox, EINA_FALSE);
-       elm_object_part_content_set(pSelectAllLayout, "elm.swallow.end",
+       elm_object_part_content_set(pSelectAllLayout, "elm.end",
                                                                pSelectAllCheckbox);
        mp_util_domain_translatable_part_text_set(pSelectAllLayout, "elm.text",
                                                                                          MP_SCREEN_READER_SELECT_ALL);
index fb8783eb98049e57d819caa56fb28b93f5b41967..a6931c6d65829029bb01e78017005b0a551522f9 100755 (executable)
@@ -279,6 +279,9 @@ struct appdata {
        bool can_play_drm_contents;
        bool show_now_playing;
        bool start_after_effect;
+  bool dragging;
+
+  Ecore_Timer *timer;
 
        mp_player_state player_state;
 
index 784466c529c01c3232c9fcd2e296cf48a1e53d6d..72d8801ad73b7fe62fa70d2421870f9ac7f98f7c 100755 (executable)
@@ -1217,6 +1217,9 @@ static bool mp_create(void *data)
        MP_CHECK_VAL(path, EINA_FALSE);
        snprintf(edje_path, 1024, "%s%s/%s", path, "edje", THEME_NAME);
 
+       /* Using 6.0 theme in 5.5 emulator */
+       //elm_theme_overlay_add(0, "/usr/share/elementary/themes/efl-theme-tizen-common.edj");
+
        elm_theme_extension_add(NULL, edje_path);
        PROFILE_OUT("elm_theme_extension_add");
 
index cfec0d94f520faedca5d6163cbb98b6117d364fd..245f02fdb67f094fde2991cf1e2ffcffb5a8b41b 100755 (executable)
@@ -58,4 +58,6 @@ MpAllView_t *mp_all_view_create(Evas_Object * parent, MpTab_e init_tab);
 int mp_all_view_destory(MpAllView_t * view);
 int mp_all_view_select_tab(MpAllView_t * view, MpTab_e tab);
 
+Evas_Object *mp_all_get_tabbar_layout();
+
 #endif
index 25f0f8523ed16f4a8e0c2f0c99ad467bb6e20995..b5ad0ba05066a7702dad6b877678027cf6860294 100755 (executable)
@@ -31,6 +31,7 @@ b='+ font=tizen style=Bold'"
 #define MP_ALBUM_TITLE_TEXT_WIDTH       446
 #define MP_ALBUM_TITLE_TEXT_WIDTH_LD    1006
 #define MP_ALBUM_TITLE_TEXT_HEIGHT      54
+#define ALBUM_DETAIL_VIEW_IMAGE_SIZE 320
 
 static void _mp_album_detail_view_tracklist_edit_cb(void *data,
                                                                                                        Evas_Object * obj,
@@ -190,6 +191,79 @@ Eina_Bool _mp_album_detail_view_tracklist_back_cb(void *data,
        return EINA_TRUE;
 }
 
+static Evas_Object *_mp_player_view_create_album_image(Evas_Object * obj,
+                                                                                                          const char *path,
+                                                                                                          int w, int h)
+{
+       int width, height;
+       Evas_Object *thumbnail =
+               evas_object_image_add(evas_object_evas_get(obj));
+       MP_CHECK_FALSE(thumbnail);
+
+       evas_object_size_hint_align_set(thumbnail, EVAS_HINT_FILL,
+                                                                       EVAS_HINT_FILL);
+       evas_object_size_hint_weight_set(thumbnail, EVAS_HINT_EXPAND,
+                                                                        EVAS_HINT_EXPAND);
+
+       evas_object_image_load_size_set(thumbnail, w, h);
+       if (path && strcmp(BROKEN_ALBUMART_IMAGE_PATH, path)) {
+               evas_object_image_file_set(thumbnail, path, NULL);
+       } else {
+               char default_thumbnail[1024] = { 0 };
+               char *shared_path = app_get_shared_resource_path();
+               snprintf(default_thumbnail, 1024, "%s%s/%s", shared_path,
+                                "shared_images", DEFAULT_PLAYER_THUMBNAIL);
+               free(shared_path);
+               evas_object_image_file_set(thumbnail, default_thumbnail, NULL);
+       }
+
+       evas_object_image_size_get(thumbnail, &width, &height);
+       evas_object_image_filled_set(thumbnail, true);
+
+       if (width <= 0 || height <= 0) {
+               char default_thumbnail[1024] = { 0 };
+               char *shared_path = app_get_shared_resource_path();
+               snprintf(default_thumbnail, 1024, "%s%s/%s", shared_path,
+                                "shared_images", DEFAULT_PLAYER_THUMBNAIL);
+               free(shared_path);
+               evas_object_image_file_set(thumbnail, default_thumbnail, NULL);
+       }
+       evas_object_image_preload(thumbnail, EINA_TRUE);
+
+       evas_object_show(thumbnail);
+       /*endfunc; */
+       return thumbnail;
+}
+
+static int _mp_album_detail_view_set_title_artist(MpAlbumDetailView_t *view)
+{
+       startfunc;
+       MP_CHECK_VAL(view, -1);
+
+       /* set title and artist */
+       char *title = NULL;
+       char *artist = NULL;
+
+               title =
+                       g_strdup_printf("%s", (view->name ? view->name : ""));
+               artist =
+                       g_strdup_printf("%s", (view->artist ? view->artist : GET_STR("IDS_COM_BODY_UNKNOWN")));
+
+       char *newtitle = elm_entry_utf8_to_markup(title);
+       char *newartist = elm_entry_utf8_to_markup(artist);
+
+       elm_object_part_text_set(view->album_detail_view_layout,
+                                                        "player_view_title_main", newtitle);
+       elm_object_part_text_set(view->album_detail_view_layout,
+                                                        "player_view_title_subtitle", newartist);
+
+       IF_G_FREE(newtitle);
+       IF_G_FREE(newartist);
+       IF_G_FREE(title);
+       IF_G_FREE(artist);
+  return 0;
+}
+
 static int _mp_album_detail_view_update_options(void *thiz)
 {
        startfunc;
@@ -219,6 +293,11 @@ static int _mp_album_detail_view_update_options(void *thiz)
 
        /* update the first controlba item */
        /*mp_view_manager_update_first_controlbar_item(layout_data); */
+
+       Evas_Object *album_image = _mp_player_view_create_album_image(view->album_detail_view_layout, view->thumbnail, ALBUM_DETAIL_VIEW_IMAGE_SIZE, ALBUM_DETAIL_VIEW_IMAGE_SIZE);
+       elm_object_part_content_set(view->album_detail_view_layout, "album_image", album_image);
+       _mp_album_detail_view_set_title_artist(view);
+
        endfunc;
        return 0;
 }
index bdc9bf86d97c3ee21281726bdf31f31e25993f57..cd4a24b73bbd20756f5dff2239a5619f74878b64 100755 (executable)
@@ -42,7 +42,7 @@ static void _mp_all_view_content_load(void *thiz, MpTab_e tab);
 static char *tab_str[TAB_COUNT] = { STR_MP_PLAYLISTS, STR_MP_TRACKS, STR_MP_ALBUMS, STR_MP_ARTISTS };
 static int tab_index[TAB_COUNT] = { 0 };
 static int tab_index_exist[TAB_COUNT] = { 0 };
-
+static Evas_Object* g_all_view_ly = NULL;
 static void _mp_all_view_tabs_sequence_get();
 
 static int _mp_all_view_tab_index_get(MpAllView_t * view)
@@ -57,6 +57,11 @@ static int _mp_all_view_tab_index_get(MpAllView_t * view)
 
 }
 
+Evas_Object* mp_all_get_tabbar_layout()
+{
+       return g_all_view_ly;
+}
+
 
 static void _mp_all_view_destory_cb(void *thiz)
 {
@@ -683,6 +688,8 @@ static int _mp_all_view_init(Evas_Object * parent, MpAllView_t * view)
                                        "common_view_layout");
        MP_CHECK_VAL(view->all_view_layout, -1);
 
+  g_all_view_ly = view->all_view_layout;
+
        elm_object_part_content_set(view->layout, "list_content",
                        view->all_view_layout);
 
index 0faa16e31a51f955cc04de3f5d488dd668e479c9..40821e94fb9a85d93c8664f8dd06b3c5db1ed1bb 100755 (executable)
@@ -76,25 +76,6 @@ int _mp_edit_view_update(void *thiz)
 
 /***************       functions for track list update *******************/
 
-static Eina_Bool _mp_edit_view_back_cb(void *data, Elm_Object_Item * it)
-{
-       eventfunc;
-
-       MpEditView_t *view = data;
-       MP_CHECK_VAL(view, EINA_TRUE);
-
-       struct appdata *ad = mp_util_get_appdata();
-       MP_CHECK_FALSE(ad);
-
-       MpViewMgr_t *view_mgr = mp_view_mgr_get_view_manager();
-       mp_view_mgr_pop_view(view_mgr, false);
-
-       MP_CHECK_FALSE(ad);
-       mp_evas_object_del(ad->popup_delete);
-
-       return EINA_TRUE;
-}
-
 void
 mp_edit_view_add_to_playlist_cb(void *data, Evas_Object * obj,
                                                                void *event_info)
@@ -311,6 +292,30 @@ mp_edit_view_list_item_reorder_update_cb(void *data, Evas_Object * obj,
                ecore_timer_add(0.1, _mp_edit_view_reorder_back_cb, view);
 }
 
+static Eina_Bool _mp_edit_view_back_cb(void *data, Elm_Object_Item * it)
+{
+       eventfunc;
+
+       MpEditView_t *view = data;
+       MP_CHECK_VAL(view, EINA_TRUE);
+
+       struct appdata *ad = mp_util_get_appdata();
+       MP_CHECK_FALSE(ad);
+
+       MpViewMgr_t *view_mgr = mp_view_mgr_get_view_manager();
+       mp_view_mgr_pop_view(view_mgr, false);
+
+       MP_CHECK_FALSE(ad);
+       mp_evas_object_del(ad->popup_delete);
+
+       if (view->reorder)
+               mp_edit_view_list_item_reorder_update_cb(data, NULL, NULL);
+       else
+               return EINA_FALSE;
+
+       return EINA_TRUE;
+}
+
 static int _mp_edit_view_update_options(void *thiz)
 {
        startfunc;
@@ -569,8 +574,8 @@ static int _mp_edit_view_content_load(void *thiz)
                                                          MP_LIST_EDIT_TYPE_SHARE);
        }
 
-       elm_object_part_content_set(view->layout, "list_content",
-                                                               view->content_to_show->layout);
+       elm_object_signal_emit(view->content_to_show->layout, "edit_signal", "edit_source");
+       elm_object_part_content_set(view->layout, "list_content", view->content_to_show->layout);
 
        return 0;
 }
index 1c45a7a4ee466c32694f24cf26f426ec2ba44662..9e6fde9e789c9dcd9554f584f3d359e54e35d72e 100755 (executable)
@@ -235,8 +235,8 @@ static int _mp_playlist_detail_view_update_options(void *thiz) {
                                        MP_TOOLBAR_BTN_MORE, NULL,
                                        _mp_playlist_detail_view_normal_more_btn_cb,
                                        view);
-       elm_object_item_part_content_set(view->navi_it, "toolbar_more_btn",
-                       btn);
+       elm_object_style_set(btn, "naviframe/more");
+       elm_object_item_part_content_set(view->navi_it, "title_content", btn);
        /*view->toolbar_options[MP_OPTION_MORE] = btn;
 
           elm_naviframe_item_pop_cb_set(view->navi_it, _mp_playlist_detail_view_back_cb, view); */
index 0eb1932746225e48108c1fff8bbe86558c362dad..490e3af363347a289bc9b27f55dc16eebfd9e94a 100755 (executable)
@@ -24,6 +24,7 @@
 #include "mp-player-control.h"
 #include "mp-player-mgr.h"
 #include "mp-list-view.h"
+#include "mp-all-view.h"
 
 #define CHECK_VIEW(view, val)  \
        do {\
@@ -200,6 +201,7 @@ static void _mp_view_show_now_playing(void *thiz, int show)
 static int _mp_view_set_nowplaying(void *thiz)
 {
        startfunc;
+       elm_object_signal_emit(mp_all_get_tabbar_layout(), "reduce_signal", "reduce_source");
        MpView_t *view = thiz;
 #ifndef MP_SOUND_PLAYER
        bool val = false;
@@ -240,6 +242,7 @@ static int _mp_view_set_nowplaying(void *thiz)
 static int _mp_view_unset_nowplaying(void *thiz)
 {
        startfunc;
+ elm_object_signal_emit(mp_all_get_tabbar_layout(), "default_signal", "default_source");
        MpView_t *view = thiz;
 
        _mp_view_show_now_playing(thiz, FALSE);
@@ -419,7 +422,13 @@ int mp_view_init(Evas_Object * parent, MpView_t * view,
        view->view_pause = _mp_view_view_pause;
        view->view_resume = _mp_view_view_resume;
        view->on_event = _mp_view_on_event;
-       view->layout = mp_common_load_edj(parent, MP_EDJ_NAME, "main_layout");
+
+       if (view_type == MP_VIEW_ALBUM_DETAIL)  {
+               view->layout = mp_common_load_edj(parent, MP_EDJ_NAME, "album_detail_layout");
+       }
+       else {
+               view->layout = mp_common_load_edj(parent, MP_EDJ_NAME, "main_layout");
+       }
 
        MP_CHECK_VAL(view->layout, -1);
 
index c2a776c5b50b54ecabe1c662d9d75ae24d77a8bc..98ea8be4c00013fb4ecc9c4ffa1833d20411e9bd 100755 (executable)
@@ -46,6 +46,11 @@ typedef struct __MpAlbumDetailList {
        char *artist;
        char *thumbnail;
 
+       Evas_Object *album_detail_control_layout;
+       Evas_Object *tracks_count_label;
+       Evas_Object *shuffle_btn;
+       Evas_Object *playall_btn;
+
 } MpAlbumDetailList_t;
 
 MpAlbumDetailList_t *mp_album_detail_list_create(Evas_Object * parent);
index d173fab7b52ce29c863e2bf48996b1f17077f287..a5c1a6c6c89d4c6d27953f2546275ae54132b9a9 100755 (executable)
@@ -34,6 +34,9 @@ typedef struct __MpAlbumList {
 
        mp_media_list_h album_list;
        int album_list_count;
+
+       Evas_Object * album_control_layout;
+       Evas_Object * album_count_label;
 } MpAlbumList_t;
 
 MpAlbumList_t *mp_album_list_create(Evas_Object * parent);
@@ -41,4 +44,6 @@ void mp_album_list_set_data(MpAlbumList_t * list, ...);
 void mp_album_list_copy_data(MpAlbumList_t * src, MpAlbumList_t * dest);
 void mp_album_list_set_reorder(MpAlbumList_t * list, bool reorder);
 
+#define DEF_STR_LEN 512
+
 #endif
index 46361d230ef234798fdd0ff9ce3d9fc1ebfd829e..7e65312f7fa9da64a355a6be48d23f4de69dacc0 100755 (executable)
@@ -38,7 +38,11 @@ typedef struct __MpArtistDetailList {
        mp_media_list_h album_list;
        GList *track_lists;
        int count_album;
-       //int edit_mode;
+
+       Evas_Object *artist_detail_control_layout;
+       Evas_Object *album_track_count_label;
+       Evas_Object *shuffle_btn;
+       Evas_Object *playall_btn;
 
 } MpArtistDetailList_t;
 
index 2c0c54b0861fb0879d9fb42d6fea5fd1610299cc..e27c8f56015aa9b77d0f0ebeb3693358414c1989 100755 (executable)
@@ -38,6 +38,9 @@ typedef struct __MpArtistList {
 
        mp_media_list_h artist_list;
        int artist_list_count;
+
+       Evas_Object *artist_control_layout;
+       Evas_Object *artist_count_label;
 } MpArtistList_t;
 
 MpArtistList_t *mp_artist_list_create(Evas_Object * parent);
index d43958af27180532bc1b2d5832ba63dae6becbd4..0dfdcf4e42ce1bb94fcecc773d03de2e5e3855c0 100755 (executable)
@@ -49,6 +49,11 @@ typedef struct __MpTrackList {
 
        int track_count;
        bool get_by_view;
+
+       Evas_Object * track_control_layout;
+       Evas_Object * tracks_count_label;
+       Evas_Object * shuffle_btn;
+       Evas_Object * playall_btn;
 } MpTrackList_t;
 
 MpTrackList_t *mp_track_list_create(Evas_Object * parent);
index 3731461429fb878a648dc305968d522597f2317f..f21013f448ca14f99984061f76ed79069f638e1c 100755 (executable)
@@ -117,7 +117,7 @@ static char *_mp_album_detail_list_label_get(void *data, Evas_Object * obj,
                return markup;
        }
        if (!list->edit_mode) {
-               if (!strcmp(part, "elm.text.end")) {
+               if (!strcmp(part, "elm.text.sub")) {
                        int duration;
                        char time[16] = "";
                        bool match =
@@ -327,9 +327,7 @@ static char *_mp_album_detail_list_album_text_get(void *data,
 
 }
 
-static char *_mp_album_detail_list_shuffle_text_get(void *data,
-                                                                                                       Evas_Object * obj,
-                                                                                                       const char *part)
+static char *_mp_album_detail_list_shuffle_text_get(MpAlbumDetailList_t *list)
 {
        startfunc;
        int res = -1;
@@ -337,15 +335,8 @@ static char *_mp_album_detail_list_shuffle_text_get(void *data,
        char *markup = NULL;
        static char result[DEF_STR_LEN + 1] = { 0, };
 
-       if (!strcmp(part, "elm.text")) {
-               MpAlbumDetailList_t *list = evas_object_data_get(obj, "list_data");
                MP_CHECK_NULL(list);
-
-               int r = 21;
-               int g = 108;
-               int b = 148;
-               int a = 255;
-
+               int font_size = 22;
                res =
                        mp_media_info_list_count(MP_TRACK_BY_ALBUM, list->type_str,
                                                                         NULL, NULL, 0, &count);
@@ -357,14 +348,13 @@ static char *_mp_album_detail_list_shuffle_text_get(void *data,
                        g_strdup_printf(GET_STR(STR_MP_SHUFFLE_PD_TRACKS), count);
 
                memset(result, 0x00, DEF_STR_LEN + 1);
-               snprintf(result, DEF_STR_LEN,
-                                "<color=#%02x%02x%02x%02x>%s</color>", r, g, b, a,
+               snprintf(result, DEF_STR_LEN,
+                                "<align=left><font=BreezeSans:style=Regular font_size=%d><color=#000C2B>%s</color></font></align>",font_size ,
                                 markup);
                IF_FREE(markup);
 
                return g_strdup(result);
-       }
-       return NULL;
+
 
 }
 
@@ -426,17 +416,13 @@ Evas_Object *_mp_album_detail_list_shuffle_icon_get(void *data,
 
 }
 
-
 static void
-_mp_album_detail_list_shuffle_cb(void *data, Evas_Object * obj,
-                                                                void *event_info)
+_mp_album_detail_list_shuffle_cb(void *data, Evas_Object * o, void *event_info)
 {
-       eventfunc;
-       Elm_Object_Item *gli = (Elm_Object_Item *) event_info;
-       elm_genlist_item_selected_set(gli, FALSE);
 
+       eventfunc;
+       Evas_Object *obj = ((MpTrackList_t *)data)->genlist;
        MP_LIST_ITEM_IGNORE_SELECT(obj);
-
        MpList_t *list = data;
        MP_CHECK(list);
 
@@ -444,17 +430,22 @@ _mp_album_detail_list_shuffle_cb(void *data, Evas_Object * obj,
        MP_CHECK(ad);
 
        ad->isPlayBtn = true;
+
        if (_mp_is_current_focus_available(ad) != 0) {
-               ERROR_TRACE
-               ("Some other application has the focus currently... Returning...");
+               ERROR_TRACE("Some other application has the focus currently... Returning...");
                return;
        }
 
-       mp_list_item_data_t *item =
-               (mp_list_item_data_t *) elm_object_item_data_get(gli);
+       mp_list_item_data_t *item;
+       item = calloc(1, sizeof(mp_list_item_data_t));
        MP_CHECK(item);
+
+       item->item_type = MP_LIST_ITEM_TYPE_SHUFFLE;
+
+       item->it = NULL;
        mp_play_control_shuffle_set(NULL, true);
        mp_common_play_track_list_with_playlist_id(item, obj, 0);
+  SAFE_FREE(item);
 
        return;
 }
@@ -513,7 +504,7 @@ static void _mp_album_detail_list_append_album_item(MpAlbumDetailList_t *
 
        list->itc_album = elm_genlist_item_class_new();
        MP_CHECK(list->itc_album);
-       list->itc_album->item_style = "type1";  //"music/1text.2icon.3";//"music/3text.1icon.2"
+       list->itc_album->item_style = "2line";  //"music/1text.2icon.3";//"music/3text.1icon.2"
        list->itc_album->func.text_get = _mp_album_detail_list_album_text_get;
        list->itc_album->decorate_all_item_style = NULL;
        list->itc_album->func.content_get =
@@ -552,8 +543,7 @@ void mp_album_detail_list_show_shuffle(void *thiz, bool show)
                list->itc_shuffle = elm_genlist_item_class_new();
                MP_CHECK(list->itc_shuffle);
                list->itc_shuffle->item_style = "default";
-               list->itc_shuffle->func.text_get =
-                       _mp_album_detail_list_shuffle_text_get;
+               list->itc_shuffle->func.text_get = NULL;
                list->itc_shuffle->decorate_all_item_style = NULL;
                list->itc_shuffle->func.content_get =
                        _mp_album_detail_list_shuffle_icon_get;
@@ -586,6 +576,7 @@ void mp_album_detail_list_popup_delete_genlist_item(void *thiz)
 
        if (list->track_count > 0) {
                list->track_count--;
+               elm_object_text_set(list->tracks_count_label, _mp_album_detail_list_shuffle_text_get(list));
        }
 }
 
@@ -599,6 +590,7 @@ void mp_album_detail_list_update_genlist(void *thiz)
 
        if (list->track_count <= 0) {
                mp_list_update(thiz);
+               elm_object_text_set(list->tracks_count_label, _mp_album_detail_list_shuffle_text_get(list));
        } else {
                elm_genlist_realized_items_update(list->genlist);
        }
@@ -630,7 +622,6 @@ static void _mp_album_detail_list_load_list(void *thiz, int count)
                        count);
        PROFILE_OUT("mp_media_info_list_create");
 
-       mp_album_detail_list_show_shuffle(list, true);
 
        list->total_duration =
                        _mp_album_detail_list_get_total_duration(list, svc_handle,
@@ -729,6 +720,52 @@ static void _mp_album_detail_list_item_unhighlighted(void *data,
        }
 }
 
+static void
+_mp_player_play_all(void *data, Evas_Object * obj, Elm_Object_Item *gli)
+{
+       eventfunc;
+       MP_LIST_ITEM_IGNORE_SELECT(obj);
+
+       MpList_t *list = data;
+       MP_CHECK(list);
+
+       struct appdata *ad = mp_util_get_appdata();
+       MP_CHECK(ad);
+
+       ad->isPlayBtn = true;
+       if (_mp_is_current_focus_available(ad) != 0) {
+               ERROR_TRACE
+                       ("Some other application has the focus currently... Returning...");
+               return;
+       }
+
+       mp_list_item_data_t *item =
+               (mp_list_item_data_t *) elm_object_item_data_get(gli);
+       MP_CHECK(item);
+       mp_play_control_shuffle_set(NULL, false);
+       if (list->edit_mode) {
+               mp_list_edit_mode_sel(list, item);
+               MpViewMgr_t *view_mgr = mp_view_mgr_get_view_manager();
+               MpView_t *view = mp_view_mgr_get_top_view(view_mgr);
+               mp_view_update_options_edit(view);
+               return;
+       }
+
+       mp_common_play_track_list(item, obj);
+
+       return;
+}
+
+static void
+_mp_album_detail_list_play_all_cb(void *data, Evas_Object * obj, void *event_info)
+{
+       Evas_Object *genlist = ((MpAlbumDetailList_t *)data)->genlist;
+
+       Elm_Object_Item *genlist_first_item = elm_genlist_first_item_get(genlist);
+
+       _mp_player_play_all(data ,genlist, genlist_first_item);
+}
+
 static void _mp_album_detail_list_update(void *thiz)
 {
        startfunc;
@@ -741,9 +778,11 @@ static void _mp_album_detail_list_update(void *thiz)
                mp_media_info_list_count(list->track_type, list->type_str,
                                                                 list->type_str2, list->filter_str,
                                                                 list->playlist_id, &count);
+
        PROFILE_OUT("mp_media_info_list_count");
        MP_CHECK(res == 0);
        list->track_count = count;
+       elm_object_text_set(list->tracks_count_label, _mp_album_detail_list_shuffle_text_get(list));
 
        mp_list_free_checked_path_list(list->checked_path_list);
        list->checked_path_list =
@@ -755,6 +794,7 @@ static void _mp_album_detail_list_update(void *thiz)
        if (count) {
                /*create new genlist */
                PROFILE_IN("elm_genlist_add");
+
                list->genlist = mp_widget_genlist_create(list->box);
                elm_scroller_policy_set(list->genlist, ELM_SCROLLER_POLICY_OFF,
                                                                ELM_SCROLLER_POLICY_AUTO);
@@ -772,7 +812,7 @@ static void _mp_album_detail_list_update(void *thiz)
                if (!list->itc) {
                        list->itc = elm_genlist_item_class_new();
                        if (list->itc) {
-                               list->itc->item_style = "type1";
+                               list->itc->item_style = "2line";
                                list->itc->func.text_get = _mp_album_detail_list_label_get;
                                list->itc->func.content_get =
                                        _mp_album_detail_list_icon_get;
@@ -797,6 +837,9 @@ static void _mp_album_detail_list_update(void *thiz)
                _mp_album_detail_list_load_list(thiz, count);
                PROFILE_OUT("_mp_album_detail_list_load_list");
 
+               evas_object_smart_callback_add(list->shuffle_btn, "clicked", _mp_album_detail_list_shuffle_cb, list);
+               evas_object_smart_callback_add(list->playall_btn, "clicked", _mp_album_detail_list_play_all_cb, list);
+
                if (!mp_list_get_editable_count(thiz, mp_list_get_edit_type(thiz))) {
                        goto NoContents;
                }
@@ -840,8 +883,6 @@ static void _mp_album_detail_list_set_edit(void *thiz, bool edit)
        MpAlbumDetailList_t *list = thiz;
        MP_CHECK(list);
 
-       mp_album_detail_list_show_shuffle(list, false);
-
        /* check DRM FL */
        if (mp_list_get_edit_type((MpList_t *) list) ==
                MP_LIST_EDIT_TYPE_SHARE) {
@@ -884,7 +925,7 @@ _mp_album_detail_list_get_editable_count(void *thiz, MpListEditType_e type)
                --count;
        }
 
-       return count - 1;
+       return count;
 }
 
 static char *_mp_album_detail_list_bottom_counter_text_cb(void *thiz)
@@ -924,6 +965,10 @@ MpAlbumDetailList_t *mp_album_detail_list_create(Evas_Object * parent)
 
        mp_list_init((MpList_t *) list, parent, MP_LIST_TYPE_ALBUM_DETAIL);
 
+       list->album_detail_control_layout = mp_common_load_edj(((MpList_t *) list)->layout, MP_EDJ_NAME, "album_detail_list_control_layout");
+       elm_object_part_content_set(((MpList_t *) list)->layout, "control_part_swallow", list->album_detail_control_layout);
+       evas_object_show(list->album_detail_control_layout);
+
        list->update = _mp_album_detail_list_update;
        list->destory_cb = _mp_album_detail_list_destory_cb;
        list->get_track_type = _mp_album_detail_list_get_track_type;
@@ -937,6 +982,45 @@ MpAlbumDetailList_t *mp_album_detail_list_create(Evas_Object * parent)
        list->bottom_counter_text_get_cb =
                _mp_album_detail_list_bottom_counter_text_cb;
 
+       //label
+       list->tracks_count_label = elm_label_add(list->album_detail_control_layout);
+       elm_object_text_set(list->tracks_count_label, "");
+       elm_object_part_content_set(list->album_detail_control_layout, "label_part_swallow", list->tracks_count_label);
+       evas_object_show(list->tracks_count_label);
+
+       //shuffle btn
+       list->shuffle_btn = elm_button_add(list->album_detail_control_layout);
+       Evas_Object *img = elm_image_add(list->shuffle_btn);
+       evas_object_resize(img, 24, 24);
+       char buffer[1024] = {0,};
+       const char *path  = app_get_resource_path();
+       snprintf(buffer, 1024, "%s%s%s", path, "images/", "play_icon_shuffle.png");
+       elm_image_file_set(img, buffer, NULL);
+       elm_object_part_content_set(list->shuffle_btn, "icon", img);
+
+       elm_object_style_set(list->shuffle_btn, "focus");
+
+       elm_object_part_content_set(list->album_detail_control_layout, "shuffle_part_swallow", list->shuffle_btn);
+       evas_object_show(list->shuffle_btn);
+
+       //play all btn
+       list->playall_btn = elm_button_add(list->album_detail_control_layout);
+       Evas_Object *img_play_all = elm_image_add(list->playall_btn);
+       evas_object_resize(img_play_all, 26, 21);
+       char buffer2[1024] = {0,};
+       const char *path2  = app_get_resource_path();
+       snprintf(buffer2, 1024, "%s%s%s", path2, "images/", "playall.png");
+       elm_image_file_set(img_play_all, buffer2, NULL);
+       elm_object_part_content_set(list->playall_btn, "icon", img_play_all);
+
+       elm_object_style_set(list->playall_btn, "focus");
+
+       elm_object_part_content_set(list->album_detail_control_layout, "play_all_part_swallow", list->playall_btn);
+       evas_object_show(list->playall_btn);
+
+  SAFE_FREE(path);
+  SAFE_FREE(path2);
+
        return list;
 }
 
index a01e4b3674204a9d853239c7a5ec479ba25db54a..be8e48a05ea262083ef991c529e97a1f109079c2 100755 (executable)
 #define ALBUM_GRID_H 319
 #define ALBUM_GRID_LAND_W 252
 #define ALBUM_GRID_LAND_H 320
-#define ALBUM_ICON_SIZE 70
+#define ALBUM_ICON_SIZE 48
 
 static mp_list_item_data_t* g_item_data = NULL;
 
 static void
 _mp_album_select_cb(void *data, Evas_Object * obj, void *event_info);
 
+static bool mp_player_genlist_item_have_item_style1(Elm_Object_Item *item, const char *style)
+{
+       if (!item) return false;
+       const Elm_Genlist_Item_Class *itc = elm_genlist_item_item_class_get(item);
+
+       if (!itc || !itc->item_style || strcmp(itc->item_style, style))
+               return false;
+
+       return true;
+}
+
+bool mp_player_apply_substyle1(Elm_Object_Item *item)
+{
+       bool first_in_group = false, last_in_group = false;
+
+       Elm_Object_Item *previous = elm_genlist_item_prev_get(item);
+       Elm_Object_Item *next = elm_genlist_item_next_get(item);
+
+       if (previous) {
+               first_in_group = mp_player_genlist_item_have_item_style1(previous, "group_index");
+       } else
+               first_in_group = true;
+
+       if (next) {
+               last_in_group = mp_player_genlist_item_have_item_style1(next, "group_index");
+       } else
+               last_in_group = true;
+
+       if (first_in_group && last_in_group) {
+               elm_object_item_signal_emit(item, "elm,state,group,single", "elm");
+       } else if (first_in_group) {
+               elm_object_item_signal_emit(item, "elm,state,group,top", "elm");
+       } else if (last_in_group) {
+               elm_object_item_signal_emit(item, "elm,state,group,bottom", "elm");
+       } else {
+               elm_object_item_signal_emit(item, "elm,state,group,middle", "elm");
+       }
+
+       return true;
+}
+
+static void __gl_realized_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       //setting_retm_if(event_info == NULL,
+                       //"invalid parameter: event_info is NULL");
+       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+
+       elm_object_item_data_get(item);
+       mp_player_apply_substyle1(item);
+}
+
 static char *_mp_album_list_group_index_text_get(void *data,
                                                                                                 Evas_Object * obj,
                                                                                                 const char *part)
@@ -66,6 +117,27 @@ static char *_mp_album_list_group_index_text_get(void *data,
        return text;
 }
 
+static char *_mp_album_list_group_index_label_text_get(int count)
+{
+       char *text = NULL;
+       int font_size = 22;
+       static char result[DEF_STR_LEN + 1] = { 0, };
+
+       if (count == 1) {
+               text = g_strdup(GET_STR(STR_MP_1_ALBUM));
+       } else {
+               text = g_strdup_printf(GET_STR(STR_MP_PD_ALBUMS), count);
+       }
+
+       memset(result, 0x00, DEF_STR_LEN + 1);
+               snprintf(result, DEF_STR_LEN,
+                                "<align=left><font=BreezeSans:style=Regular font_size=%d><color=#000C2B>%s</color></font></align>",font_size ,
+                                text);
+       IF_FREE(text);
+
+       return g_strdup(result);
+}
+
 static char *_mp_album_list_label_get(void *data, Evas_Object * obj,
                                                                          const char *part)
 {
@@ -115,7 +187,7 @@ Evas_Object *_mp_album_list_icon_get(void *data, Evas_Object * obj,
        Evas_Object *content = NULL;
        content = elm_layout_add(obj);
 
-       if (!strcmp(part, "elm.swallow.icon")) {
+       if (!strcmp(part, "elm.icon")) {
                char *thumb_name = NULL;
                mp_media_info_group_get_thumbnail_path(svc_item, &thumb_name);
                int w, h;
@@ -352,8 +424,6 @@ static void _mp_album_list_load_list(void *thiz, int count)
 
        svc_handle = list->album_list;
 
-       mp_album_list_show_group_index(list, false);
-
        for (index = 0; index < count; index++) {
                mp_media_info_h item = NULL;
                Elm_Object_Item *list_item = NULL;
@@ -453,6 +523,7 @@ static void _mp_album_list_genlist_create(MpAlbumList_t * list)
        /*packet genlist to box */
        elm_box_pack_end(list->box, list->genlist);
        /*add long press callback */
+       evas_object_smart_callback_add(list->genlist, "realized", __gl_realized_cb, list);
        //evas_object_smart_callback_add(list->genlist, "longpressed", _mp_album_list_item_longpressed_cb, list);
        elm_genlist_mode_set(list->genlist, ELM_LIST_COMPRESS);
 
@@ -461,7 +532,7 @@ static void _mp_album_list_genlist_create(MpAlbumList_t * list)
        if (!list->itc) {
                list->itc = elm_genlist_item_class_new();
                MP_CHECK(list->itc);
-               list->itc->item_style = "type1";
+               list->itc->item_style = "2line";
                list->itc->func.text_get = _mp_album_list_label_get;
                list->itc->func.content_get = _mp_album_list_icon_get;
                list->itc->func.del = _mp_album_list_item_del_cb;
@@ -576,17 +647,14 @@ static void _mp_album_list_recently_added_play_icon_clicked_cb(void *data,
        startfunc;
        int count = 0, res = 0;
        mp_list_item_data_t *item_data = (mp_list_item_data_t *)data;
-       MP_CHECK(item_data);
 
+       MP_CHECK(item_data);
        struct appdata *ad = mp_util_get_appdata();
        MP_CHECK(ad);
-
        mp_media_info_h track = item_data->handle;
        MP_CHECK(track);
-
        MpAlbumDetailList_t *list = calloc(1, sizeof(MpAlbumDetailList_t));
        MP_CHECK(list);
-
        mp_media_list_h svc_handle;
        mp_plst_item *plst_item = NULL;
        char *title = NULL;
@@ -594,7 +662,9 @@ static void _mp_album_list_recently_added_play_icon_clicked_cb(void *data,
        char *thumbnail = NULL;
        mp_media_info_group_get_main_info(track, &title);
        mp_media_info_group_get_sub_info(track, &artist);
+
        mp_media_info_group_get_thumbnail_path(track, &thumbnail);
+
        DEBUG_TRACE("thumbnail = %s", thumbnail);
 
        list->list_type = MP_LIST_TYPE_ALBUM_DETAIL;
@@ -1101,6 +1171,7 @@ static void _mp_album_list_update(void *thiz)
        res =
                mp_media_info_group_list_count(MP_GROUP_BY_ALBUM, NULL, NULL,
                                                                           &count);
+
        MP_CHECK(res == 0);
 
        mp_list_free_checked_path_list(list->checked_path_list);
@@ -1110,12 +1181,9 @@ static void _mp_album_list_update(void *thiz)
        mp_evas_object_del(list->genlist);
        mp_evas_object_del(list->no_content);
 
-       if (count) {
-               // Place Recently Added Grid View only when there are some items in genlist
-               if (ad->recentlyAddedGridView) {
-                       mp_album_list_initialize_recently_added(list);
-               }
+  elm_object_text_set(list->album_count_label, _mp_album_list_group_index_label_text_get(count));
 
+       if (count) {
                /*create new genlist */
                if (list->display_mode == MP_LIST_DISPLAY_MODE_THUMBNAIL) {
                        _mp_album_list_gengrid_create(list);
@@ -1124,21 +1192,12 @@ static void _mp_album_list_update(void *thiz)
                }
 
                evas_object_data_set(list->genlist, "list_handle", list);
-
-               if (!list->edit_mode) {
-                       if (ad->recentlyAddedGridView) {
-                               mp_album_list_show_recently_added_tracks(list);
-                               ad->recentlyAddedGridView = false;
-                       }
-                       mp_list_bottom_counter_item_append((MpList_t *) list);
-               }
-
                /* load list */
                _mp_album_list_load_list(thiz, count);
                list->show_fastscroll(list);
        } else {
                DEBUG_TRACE("count is 0");
-
+               elm_object_signal_emit(mp_all_get_tabbar_layout(), "default_signal", "default_source");
                list->no_content =
                        mp_widget_create_no_contents(list->box, MP_NOCONTENT_ALBUMS,
                                                                                 NULL, NULL);
@@ -1196,8 +1255,6 @@ static void _mp_album_list_set_edit(void *thiz, bool edit)
        MpAlbumList_t *list = thiz;
        MP_CHECK(list);
 
-       mp_album_list_show_group_index(list, false);
-
        if (list->set_edit_default) {
                list->set_edit_default(list, edit);
        }
@@ -1237,6 +1294,10 @@ MpAlbumList_t *mp_album_list_create(Evas_Object * parent)
 
        mp_list_init((MpList_t *) list, parent, MP_LIST_TYPE_GROUP);
 
+       list->album_control_layout = mp_common_load_edj(((MpList_t *) list)->layout, MP_EDJ_NAME, "list_control_layout");
+       elm_object_part_content_set(((MpList_t *) list)->layout, "control_part", list->album_control_layout);
+       evas_object_show(list->album_control_layout);
+
        list->update = _mp_album_list_update;
        list->destory_cb = _mp_album_list_destory_cb;
        list->get_group_type = _mp_album_list_get_group_type;
@@ -1252,6 +1313,12 @@ MpAlbumList_t *mp_album_list_create(Evas_Object * parent)
        list->set_edit = _mp_album_list_set_edit;
        list->get_count = _mp_album_list_get_count;
 
+       list->album_count_label = elm_label_add(list->album_control_layout);
+
+       elm_object_text_set(list->album_count_label, "check");
+       elm_object_part_content_set(list->album_control_layout, "label_part_swallow", list->album_count_label);
+       evas_object_show(list->album_count_label);
+
        return list;
 }
 
index b53ff402825748fb6c621a8360da056eaf81e804..fafee8ecadc0d4fef54e062968c41eff8e0f3b95 100755 (executable)
 
 int selected_tracks_count;
 
+static bool mp_player_genlist_item_have_item_style3(Elm_Object_Item *item, const char *style)
+{
+       if (!item) return false;
+       const Elm_Genlist_Item_Class *itc = elm_genlist_item_item_class_get(item);
+
+       if (!itc || !itc->item_style || strcmp(itc->item_style, style))
+               return false;
+
+       return true;
+}
+
+bool mp_player_apply_substyle_artist(Elm_Object_Item *item)
+{
+       bool first_in_group = false, last_in_group = false;
+
+       Elm_Object_Item *previous = elm_genlist_item_prev_get(item);
+       Elm_Object_Item *next = elm_genlist_item_next_get(item);
+
+       if (previous) {
+               first_in_group = mp_player_genlist_item_have_item_style3(previous, "group_index");
+       } else
+               first_in_group = true;
+
+       if (next) {
+               last_in_group = mp_player_genlist_item_have_item_style3(next, "group_index");
+       } else
+               last_in_group = true;
+
+       if (first_in_group && last_in_group) {
+               elm_object_item_signal_emit(item, "elm,state,group,single", "elm");
+       } else if (first_in_group) {
+               elm_object_item_signal_emit(item, "elm,state,group,top", "elm"); 
+       } else if (last_in_group) {
+               elm_object_item_signal_emit(item, "elm,state,group,bottom", "elm");
+       } else {
+               elm_object_item_signal_emit(item, "elm,state,group,middle", "elm");
+       }
+
+       return true;
+}
+
+static void __gl_realized_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       //setting_retm_if(event_info == NULL,
+                       //"invalid parameter: event_info is NULL");
+       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+
+       elm_object_item_data_get(item);
+       mp_player_apply_substyle_artist(item);
+}
+
 static char *_mp_artist_detail_list_album_label_get(void *data,
                                                                                                        Evas_Object * obj,
                                                                                                        const char *part)
@@ -127,13 +178,14 @@ Evas_Object *_mp_artist_detail_list_album_icon_get(void *data,
        MP_CHECK_NULL(item);
        mp_media_info_h svc_item = (item->handle);
        mp_retv_if(svc_item == NULL, NULL);
-       Evas_Object *content = NULL;
        Evas_Object *icon = NULL;
 
        MpArtistDetailList_t *list = evas_object_data_get(obj, "list_data");
        MP_CHECK_NULL(list);
 
-       if (!strcmp(part, "elm.swallow.icon")) {
+       Evas_Object *content = NULL;
+
+       if (!strcmp(part, "elm.icon")) {
                content = elm_layout_add(obj);
 
                char *thumb_name = NULL;
@@ -232,14 +284,14 @@ static char *_mp_artist_detail_list_track_label_get(void *data,
                return markup;
        }
        if (!list->edit_mode) {
-               if (!strcmp(part, "elm.text.end")) {
+               if (!strcmp(part, "elm.text.sub")) {
                        int duration;
                        char time[16] = "";
                        bool match =
                                mp_common_track_is_current(track, (MpList_t *) list);
 
                        mp_media_info_get_duration(track, &duration);
-                       mp_util_format_duration(time, duration);
+                       mp_util_song_format_duration(time, duration);
                        time[15] = '\0';
                        if (match) {
                                int r = 21;
@@ -526,45 +578,35 @@ static void _free_track_lists(void *data)
 }
 
 
-static char *_mp_artist_detail_list_shuffle_text_get(void *data,
-                                                                                                        Evas_Object * obj,
-                                                                                                        const char *part)
+static char *_mp_artist_detail_list_shuffle_text_get(Evas_Object * obj)
 {
-       startfunc;
+       MpArtistDetailList_t *list = evas_object_data_get(obj, "list_data");
        int res = -1;
-       int count = 0;
-       char *markup = NULL;
+       int font_size = 22;
        static char result[DEF_STR_LEN + 1] = { 0, };
-
-       if (!strcmp(part, "elm.text")) {
-               MpArtistDetailList_t *list =
-                       evas_object_data_get(obj, "list_data");
-               MP_CHECK_NULL(list);
-
-               int r = 21;
-               int g = 108;
-               int b = 148;
-               int a = 255;
-
-               res =
-                       mp_media_info_list_count(MP_TRACK_BY_ARTIST, list->type_str,
-                                                                        NULL, NULL, 0, &count);
-               MP_CHECK_NULL(res == 0);
-
-               markup =
-                       (count ==
-                        1) ? g_strdup(GET_STR(STR_MP_SHUFFLE_1_TRACK)) :
-                       g_strdup_printf(GET_STR(STR_MP_SHUFFLE_PD_TRACKS), count);
-
-               memset(result, 0x00, DEF_STR_LEN + 1);
-               snprintf(result, DEF_STR_LEN,
-                                "<color=#%02x%02x%02x%02x>%s</color>", r, g, b, a,
-                                markup);
-               IF_FREE(markup);
-
-               return g_strdup(result);
+       char **album_thumbs = NULL;
+       int album_count = 0;
+       int song_count = 0;
+       res = mp_media_info_list_count(MP_TRACK_BY_ARTIST, list->type_str,
+                                                                        NULL, NULL, 0, &song_count);
+   
+       album_count = elm_genlist_items_count(obj) - song_count;
+       char *sub_text = NULL;
+       if (album_count == 1 && song_count == 1) {
+               sub_text = g_strdup(GET_STR(STR_MP_1_ALBUM_1_SONG));
+       } else if (album_count == 1 && song_count > 1) {
+               sub_text = g_strdup_printf(GET_STR(STR_MP_1_ALBUM_PD_SONGS),
+                                                       song_count);
+       } else {
+               sub_text = g_strdup_printf(GET_STR(STR_MP_PD_ALBUMS_PD_SONGS),
+                                                       album_count, song_count);
        }
-       return NULL;
+       memset(result, 0x00, DEF_STR_LEN + 1);
+       snprintf(result, DEF_STR_LEN,
+                        "<align=left><font=BreezeSans:style=Regular font_size=%d><color=#000C2B>%s</color></font></align>",font_size ,
+                                sub_text);
+       IF_FREE(sub_text);
+       return g_strdup(result);
 }
 
 Evas_Object *_mp_artist_detail_list_shuffle_icon_get(void *data,
@@ -600,16 +642,12 @@ Evas_Object *_mp_artist_detail_list_shuffle_icon_get(void *data,
 
 
 static void
-_mp_artist_detail_list_shuffle_cb(void *data, Evas_Object * obj,
+_mp_artist_detail_list_shuffle_cb(void *data, Evas_Object * o,
                                                                  void *event_info)
 {
        eventfunc;
-       Elm_Object_Item *gli = (Elm_Object_Item *) event_info;
-
+       Evas_Object *obj = ((MpArtistDetailList_t *)data)->genlist;
        MP_LIST_ITEM_IGNORE_SELECT(obj);
-
-       elm_genlist_item_selected_set(gli, FALSE);
-
        MpList_t *list = data;
        MP_CHECK(list);
 
@@ -617,19 +655,21 @@ _mp_artist_detail_list_shuffle_cb(void *data, Evas_Object * obj,
        MP_CHECK(ad);
 
        ad->isPlayBtn = true;
+
        if (_mp_is_current_focus_available(ad) != 0) {
-               ERROR_TRACE
-               ("Some other application has the focus currently... Returning...");
+               ERROR_TRACE("Some other application has the focus currently... Returning...");
                return;
        }
 
-       mp_list_item_data_t *item =
-               (mp_list_item_data_t *) elm_object_item_data_get(gli);
+       mp_list_item_data_t *item;
+       item = calloc(1, sizeof(mp_list_item_data_t));
        MP_CHECK(item);
+       item->item_type = MP_LIST_ITEM_TYPE_SHUFFLE;
+       item->it = NULL;
 
        mp_play_control_shuffle_set(NULL, true);
        mp_common_play_track_list(item, obj);
-
+  SAFE_FREE(item);
        return;
 }
 
@@ -671,10 +711,10 @@ static void _mp_artist_detail_list_append_shuffle_item(MpArtistDetailList_t
                ERROR_TRACE("Cannot create artist detail list");
                return;
        }
-       //list->itc_shuffle->item_style = "music/1line";//"music/1text.2icon.3";//"music/3text.1icon.2"
+       //list->itc_shuffle->item_style = "music/";//"music/1text.2icon.3";//"music/3text.1icon.2"
        list->itc_shuffle->item_style = "default";      //"music/1text.2icon.3";//"music/3text.1icon.2"
        list->itc_shuffle->func.text_get =
-               _mp_artist_detail_list_shuffle_text_get;
+               NULL;
        list->itc_shuffle->decorate_all_item_style = NULL;
        list->itc_shuffle->func.content_get =
                _mp_artist_detail_list_shuffle_icon_get;
@@ -736,8 +776,6 @@ static void _mp_artist_detail_list_load_list(void *thiz, int count)
 
        svc_handle = list->album_list;
 
-       _mp_artist_detail_list_append_shuffle_item(list);
-
        for (index = 0; index < count; index++) {
                mp_media_info_h item = NULL;
                Elm_Object_Item *list_item = NULL;
@@ -789,8 +827,9 @@ static void _mp_artist_detail_list_load_list(void *thiz, int count)
                                item_data->checked = false;
                        }
                }
+               _mp_artist_detail_list_shuffle_text_get(list->genlist);
        }
-
+       elm_object_text_set(list->album_track_count_label, _mp_artist_detail_list_shuffle_text_get(list->genlist));
   END:
        endfunc;
 }
@@ -916,6 +955,52 @@ static void _mp_artist_detail_list_set_edit(void *thiz, bool edit)
        elm_genlist_realized_items_update(list->genlist);
 }
 
+static void
+_mp_player_play_all(void *data, Evas_Object * obj, Elm_Object_Item *gli)
+{
+       eventfunc;
+       MP_LIST_ITEM_IGNORE_SELECT(obj);
+
+       MpList_t *list = data;
+       MP_CHECK(list);
+
+       struct appdata *ad = mp_util_get_appdata();
+       MP_CHECK(ad);
+
+       ad->isPlayBtn = true;
+       if (_mp_is_current_focus_available(ad) != 0) {
+               ERROR_TRACE
+                       ("Some other application has the focus currently... Returning...");
+               return;
+       }
+
+       mp_list_item_data_t *item =
+               (mp_list_item_data_t *) elm_object_item_data_get(gli);
+       MP_CHECK(item);
+       mp_play_control_shuffle_set(NULL, false);
+       if (list->edit_mode) {
+               mp_list_edit_mode_sel(list, item);
+               MpViewMgr_t *view_mgr = mp_view_mgr_get_view_manager();
+               MpView_t *view = mp_view_mgr_get_top_view(view_mgr);
+               mp_view_update_options_edit(view);
+               return;
+       }
+
+       mp_common_play_track_list(item, obj);
+
+       return;
+}
+
+static void
+_mp_artist_detail_list_play_all_cb(void *data, Evas_Object * obj, void *event_info)
+{
+       Evas_Object *genlist = ((MpArtistDetailList_t *)data)->genlist;
+
+       Elm_Object_Item *genlist_first_item = elm_genlist_first_item_get(genlist);
+
+       _mp_player_play_all(data ,genlist, genlist_first_item);
+}
+
 void _mp_artist_detail_list_update(void *thiz)
 {
        startfunc;
@@ -955,7 +1040,7 @@ void _mp_artist_detail_list_update(void *thiz)
                evas_object_data_set(list->genlist, "list_data", list);
                list->itc_album = elm_genlist_item_class_new();
                if (list->itc_album) {
-                       list->itc_album->item_style = "default";
+                       list->itc_album->item_style = "2line";
                        list->itc_album->func.text_get =
                                _mp_artist_detail_list_album_label_get;
                        list->itc_album->func.content_get =
@@ -964,7 +1049,7 @@ void _mp_artist_detail_list_update(void *thiz)
 
                        list->itc_track = elm_genlist_item_class_new();
                        if (list->itc_track) {
-                               list->itc_track->item_style = "type1";
+                               list->itc_track->item_style = "2line";
                                list->itc_track->func.text_get =
                                        _mp_artist_detail_list_track_label_get;
                                list->itc_track->func.content_get =
@@ -999,9 +1084,12 @@ void _mp_artist_detail_list_update(void *thiz)
                evas_object_smart_callback_add(list->genlist, "unhighlighted",
                                                                           _mp_artist_detail_list_item_unhighlighted,
                                                                           list);
+               evas_object_smart_callback_add(list->genlist, "realized", __gl_realized_cb, list);
 
                /* load list */
                _mp_artist_detail_list_load_list(thiz, count_album);
+               evas_object_smart_callback_add(list->shuffle_btn, "clicked", _mp_artist_detail_list_shuffle_cb, list);
+               evas_object_smart_callback_add(list->playall_btn, "clicked", _mp_artist_detail_list_play_all_cb, list);
 
        } else {
                DEBUG_TRACE("count is 0");
@@ -1140,6 +1228,10 @@ MpArtistDetailList_t *mp_artist_detail_list_create(Evas_Object * parent)
 
        mp_list_init((MpList_t *) list, parent, MP_LIST_TYPE_ARTIST_DETAIL);
 
+       list->artist_detail_control_layout = mp_common_load_edj(((MpList_t *) list)->layout, MP_EDJ_NAME, "list_control_layout");
+       elm_object_part_content_set(((MpList_t *) list)->layout, "control_part", list->artist_detail_control_layout);
+       evas_object_show(list->artist_detail_control_layout);
+
        list->update = _mp_artist_detail_list_update;
        list->destory_cb = _mp_artist_detail_list_destory_cb;
        list->get_track_type = _mp_artist_detail_list_get_track_type;
@@ -1154,6 +1246,44 @@ MpArtistDetailList_t *mp_artist_detail_list_create(Evas_Object * parent)
        list->bottom_counter_text_get_cb =
                _mp_artist_detail_list_bottom_counter_text_cb;
 
+       //label
+       list->album_track_count_label = elm_label_add(list->artist_detail_control_layout);
+       elm_object_text_set(list->album_track_count_label, "check");
+       elm_object_part_content_set(list->artist_detail_control_layout, "label_part_swallow", list->album_track_count_label);
+       evas_object_show(list->album_track_count_label);
+
+       //shuffle btn
+       list->shuffle_btn = elm_button_add(list->artist_detail_control_layout);
+       Evas_Object *img = elm_image_add(list->shuffle_btn);
+       evas_object_resize(img, 24, 24);
+       char buffer[1024] = {0,};
+       const char *path  = app_get_resource_path();
+       snprintf(buffer, 1024, "%s%s%s", path, "images/", "play_icon_shuffle.png");
+       elm_image_file_set(img, buffer, NULL);
+       elm_object_part_content_set(list->shuffle_btn, "icon", img);
+
+       elm_object_style_set(list->shuffle_btn, "focus");
+
+       elm_object_part_content_set(list->artist_detail_control_layout, "shuffle_part_swallow", list->shuffle_btn);
+       evas_object_show(list->shuffle_btn);
+
+       //play all btn
+       list->playall_btn = elm_button_add(list->artist_detail_control_layout);
+       Evas_Object *img_play_all = elm_image_add(list->playall_btn);
+       evas_object_resize(img_play_all, 26, 21);
+       char buffer2[1024] = {0,};
+       const char *path2  = app_get_resource_path();
+       snprintf(buffer2, 1024, "%s%s%s", path2, "images/", "playall.png");
+       elm_image_file_set(img_play_all, buffer2, NULL);
+       elm_object_part_content_set(list->playall_btn, "icon", img_play_all);
+
+       elm_object_style_set(list->playall_btn, "focus");
+       
+
+       elm_object_part_content_set(list->artist_detail_control_layout, "play_all_part_swallow", list->playall_btn);
+       evas_object_show(list->playall_btn);
+  SAFE_FREE(path);
+  SAFE_FREE(path2);
 
        return list;
 }
index 2629b9591aff6531dbba7b254126e4d3efdae339..01f81e196f3664a1a385d6b6a1f3d603f196771b 100755 (executable)
 
 static mp_list_item_data_t* g_item_data = NULL;
 
+static bool mp_player_genlist_item_have_item_style2(Elm_Object_Item *item, const char *style)
+{
+       if (!item) return false;
+       const Elm_Genlist_Item_Class *itc = elm_genlist_item_item_class_get(item);
+
+       if (!itc || !itc->item_style || strcmp(itc->item_style, style))
+               return false;
+
+       return true;
+}
+
+bool mp_player_apply_substyle_artist_list(Elm_Object_Item *item)
+{
+       bool first_in_group = false, last_in_group = false;
+
+       Elm_Object_Item *previous = elm_genlist_item_prev_get(item);
+       Elm_Object_Item *next = elm_genlist_item_next_get(item);
+
+       if (previous) {
+               first_in_group = mp_player_genlist_item_have_item_style2(previous, "group_index");
+       } else
+               first_in_group = true;
+
+       if (next) {
+               last_in_group = mp_player_genlist_item_have_item_style2(next, "group_index");
+       } else
+               last_in_group = true;
+
+       if (first_in_group && last_in_group) {
+               elm_object_item_signal_emit(item, "elm,state,group,single", "elm");
+       } else if (first_in_group) {
+               elm_object_item_signal_emit(item, "elm,state,group,top", "elm"); 
+       } else if (last_in_group) {
+               elm_object_item_signal_emit(item, "elm,state,group,bottom", "elm");
+       } else {
+               elm_object_item_signal_emit(item, "elm,state,group,middle", "elm");
+       }
+
+       return true;
+}
+
+static void __gl_realized_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+
+       elm_object_item_data_get(item);
+       mp_player_apply_substyle_artist_list(item);
+}
+
 static char *_mp_artist_list_group_index_text_get(void *data,
                Evas_Object * obj,
                const char *part)
@@ -60,6 +109,28 @@ static char *_mp_artist_list_group_index_text_get(void *data,
        return text;
 }
 
+static char *_mp_artist_list_group_index_label_text_get(int count)
+{
+
+       char *text = NULL;
+       int font_size = 22;
+       static char result[DEF_STR_LEN + 1] = { 0, };
+
+       if (count == 1) {
+               text = g_strdup(GET_STR(STR_MP_1_ARTIST));
+       } else {
+               text = g_strdup_printf(GET_STR(STR_MP_PD_ARTISTS), count);
+       }
+
+       memset(result, 0x00, DEF_STR_LEN + 1);
+       snprintf(result, DEF_STR_LEN,
+                       "<align=left><font=BreezeSans:style=Regular font_size=%d><color=#000C2B>%s</color></font></align>",font_size ,
+                       text);
+       IF_FREE(text);
+
+       return g_strdup(result);
+}
+
 static void
 _mp_artist_list_add_to_playlist_cb(void *data, Evas_Object * obj,
                void *event_info)
@@ -129,8 +200,8 @@ static Evas_Object *_mp_artist_list_album_icon_get(Evas_Object * obj,
        int album_count = 0;
        int song_count = 0;
        int i = 0;
-       int icon_area_w = 78;
-       int image_size = 68;
+       int icon_area_w = 48;
+       int image_size = 48;
        int thumnail_max = 8;
        char *path = NULL;
 
@@ -171,7 +242,7 @@ Evas_Object *_mp_artist_list_icon_get(void *data, Evas_Object * obj,
 
        if (item->display_mode == MP_LIST_DISPLAY_MODE_NORMAL) {
                if (!strcmp(part, "elm.icon.1")
-                               || !strcmp(part, "elm.swallow.icon")) {
+                               || !strcmp(part, "elm.icon")) {
                        content = elm_layout_add(obj);
                        Evas_Object *icon = _mp_artist_list_album_icon_get(obj, item);
                        elm_layout_theme_set(content, "layout", "list/B/music.type.1",
@@ -389,8 +460,6 @@ static void _mp_artist_list_load_list(void *thiz, int count)
        }
        list->artist_list = svc_handle;
 
-       mp_artist_list_show_group_index(list, false);
-
        for (index = 0; index < count; index++) {
                mp_media_info_h item = NULL;
                Elm_Object_Item *list_item = NULL;
@@ -545,7 +614,7 @@ static void _mp_artist_list_genlist_create(MpArtistList_t * list)
                        ERROR_TRACE("Unable to create artist list genlist");
                        return;
                }
-               list->itc->item_style = "type1";
+               list->itc->item_style = "2line";
                list->itc->func.text_get = _mp_artist_list_label_get;
                list->itc->func.content_get = _mp_artist_list_icon_get;
                list->itc->func.del = _mp_artist_list_item_del_cb;
@@ -573,6 +642,7 @@ static void _mp_artist_list_genlist_create(MpArtistList_t * list)
        evas_object_smart_callback_add(list->genlist, "unhighlighted",
                                                                   _mp_artist_list_item_unhighlighted_cb,
                                                                   list);
+       evas_object_smart_callback_add(list->genlist, "realized", __gl_realized_cb, list);
 
        endfunc;
 }
@@ -1115,12 +1185,9 @@ void _mp_artist_list_update(void *thiz)
        mp_evas_object_del(list->genlist);
        mp_evas_object_del(list->no_content);
 
-       if (count) {
-               // Place Recently Added Grid View only when there are some items in genlist
-               if (ad->recentlyAddedGridView) {
-                       mp_artist_list_initialize_recently_added(list);
-               }
+       elm_object_text_set(list->artist_count_label, _mp_artist_list_group_index_label_text_get(count));
 
+       if (count) {
                /*create new genlist */
                if (list->display_mode == MP_LIST_DISPLAY_MODE_THUMBNAIL) {
                        _mp_artist_list_gengrid_create(list);
@@ -1130,18 +1197,11 @@ void _mp_artist_list_update(void *thiz)
 
                evas_object_data_set(list->genlist, "list_handle", list);
 
-               if (!list->edit_mode) {
-                       if (ad->recentlyAddedGridView) {
-                               mp_artist_list_show_recently_added_tracks(list);
-                               ad->recentlyAddedGridView = false;
-                       }
-                       mp_list_bottom_counter_item_append((MpList_t *) list);
-               }
-
                /* load list */
                _mp_artist_list_load_list(thiz, count);
                list->show_fastscroll(list);
        } else {
+               elm_object_signal_emit(mp_all_get_tabbar_layout(), "default_signal", "default_source");
                list->no_content =
                                mp_widget_create_no_contents(list->box, MP_NOCONTENT_ARTISTS,
                                                NULL, list);
@@ -1203,8 +1263,6 @@ static void _mp_artist_list_set_edit(void *thiz, bool edit)
        MpArtistList_t *list = thiz;
        MP_CHECK(list);
 
-       mp_artist_list_show_group_index(list, false);
-
        if (list->set_edit_default) {
                list->set_edit_default(list, edit);
        }
@@ -1243,6 +1301,10 @@ MpArtistList_t *mp_artist_list_create(Evas_Object * parent)
 
        mp_list_init((MpList_t *) list, parent, MP_LIST_TYPE_GROUP);
 
+       list->artist_control_layout = mp_common_load_edj(((MpList_t *) list)->layout, MP_EDJ_NAME, "list_control_layout");
+       elm_object_part_content_set(((MpList_t *) list)->layout, "control_part", list->artist_control_layout);
+       evas_object_show(list->artist_control_layout);
+
        list->update = _mp_artist_list_update;
        list->destory_cb = _mp_artist_list_destory_cb;
        list->get_group_type = _mp_artist_list_get_group_type;
@@ -1258,6 +1320,11 @@ MpArtistList_t *mp_artist_list_create(Evas_Object * parent)
        list->set_edit = _mp_artist_list_set_edit;
        list->get_count = _mp_artist_list_get_count;
 
+       list->artist_count_label = elm_label_add(list->artist_control_layout);
+       elm_object_text_set(list->artist_count_label, "");
+       elm_object_part_content_set(list->artist_control_layout, "label_part_swallow", list->artist_count_label);
+       evas_object_show(list->artist_count_label);
+
        endfunc;
        return list;
 }
index e834bb1f01395d1e99687e52e0a59c8ccb5f259f..cb1a2d90431458cb24b2699e110480191d6123a2 100755 (executable)
@@ -496,7 +496,11 @@ void mp_list_init(MpList_t * list, Evas_Object * parent,
        //initialize attribute
        list->list_type = list_type;
 
-       list->layout = mp_common_load_edj(parent, MP_EDJ_NAME, "list_layout");
+       if (list_type == MP_LIST_TYPE_ALBUM_DETAIL) {
+               list->layout = mp_common_load_edj(parent, MP_EDJ_NAME, "album_detail_list_layout");
+       } else {
+               list->layout = mp_common_load_edj(parent, MP_EDJ_NAME, "list_layout");
+       }
        MP_CHECK(list->layout);
 
        list->box = _mp_list_view_create_box(list);
@@ -505,7 +509,13 @@ void mp_list_init(MpList_t * list, Evas_Object * parent,
                                                                         EVAS_HINT_FILL);
        evas_object_size_hint_align_set(list->box, EVAS_HINT_FILL,
                                                                        EVAS_HINT_FILL);
-       elm_object_part_content_set(list->layout, "list_content", list->box);
+
+       if (list_type == MP_LIST_TYPE_TRACK || list_type == MP_LIST_TYPE_GROUP || list_type == MP_LIST_TYPE_ARTIST_DETAIL) {
+          elm_object_part_content_set(list->layout, "track_list_content", list->box);
+       } else {
+               elm_object_part_content_set(list->layout, "list_content", list->box);
+       }
+
        evas_object_show(list->box);
 
        //initialize method
index be44e92153d3a69969ae6257750c0a126a173525..756fd43d965cfbd5dc8f6a7dd0e65e62944784af 100755 (executable)
@@ -453,6 +453,7 @@ static void _mp_now_playing_list_update(void *thiz)
                _mp_now_playing_list_load_list(thiz, count);
 
        } else {
+               elm_object_signal_emit(mp_all_get_tabbar_layout(), "default_signal", "default_source");
                DEBUG_TRACE("count is 0");
                list->no_content =
                        mp_widget_create_no_contents(list->box, MP_NOCONTENT_NORMAL,
@@ -485,7 +486,7 @@ MpNowPlayingList_t *mp_now_playing_list_create(Evas_Object * parent)
        MpNowPlayingList_t *list = calloc(1, sizeof(MpNowPlayingList_t));
        MP_CHECK_NULL(list);
 
-       mp_list_init((MpList_t *) list, parent, MP_LIST_TYPE_TRACK);
+       mp_list_init((MpList_t *) list, parent, MP_LIST_TYPE_ALL);
 
        list->update = _mp_now_playing_list_update;
        list->destory_cb = _mp_now_playing_list_destory_cb;
index 342337209ff3a5487fb322f1b18ab2718b150827..162cda7290ee87254eea702d04677446df44c620 100755 (executable)
@@ -30,7 +30,7 @@
 #include <media_content.h>
 #include <player.h>
 
-#define INITIAL_LOAD_COUNT 8
+#define INITIAL_LOAD_COUNT 200
 #define ALBUMART_INDEX_SIZE            (720  * elm_config_scale_get())
 
 static mp_list_item_data_t* g_item_data = NULL;
@@ -116,6 +116,55 @@ static char *_mp_track_list_label_get(void *data, Evas_Object * obj,
        return NULL;
 }
 
+static bool mp_player_genlist_item_have_item_style(Elm_Object_Item *item, const char *style)
+{
+       if (!item) return false;
+       const Elm_Genlist_Item_Class *itc = elm_genlist_item_item_class_get(item);
+
+       if (!itc || !itc->item_style || strcmp(itc->item_style, style))
+               return false;
+
+       return true;
+}
+
+bool mp_player_apply_substyle(Elm_Object_Item *item)
+{
+       bool first_in_group = false, last_in_group = false;
+
+       Elm_Object_Item *previous = elm_genlist_item_prev_get(item);
+       Elm_Object_Item *next = elm_genlist_item_next_get(item);
+
+       if (previous) {
+               first_in_group = mp_player_genlist_item_have_item_style(previous, "group_index");
+       } else
+               first_in_group = true;
+       if (next) {
+               last_in_group = mp_player_genlist_item_have_item_style(next, "group_index");
+       } else{
+               last_in_group = true;
+}
+       if (first_in_group && last_in_group) {
+               elm_object_item_signal_emit(item, "elm,state,group,single", "elm");
+       } else if (first_in_group) {
+               elm_object_item_signal_emit(item, "elm,state,group,top", "elm");
+       } else if (last_in_group) {
+               elm_object_item_signal_emit(item, "elm,state,group,bottom", "elm");
+       } else {
+               elm_object_item_signal_emit(item, "elm,state,group,middle", "elm");
+       }
+
+       return true;
+}
+
+static void __gl_realized_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+
+       elm_object_item_data_get(item);
+       mp_player_apply_substyle(item);
+}
+
+
 Evas_Object *_mp_track_list_icon_get(void *data, Evas_Object * obj,
                                                                         const char *part)
 {
@@ -138,7 +187,7 @@ Evas_Object *_mp_track_list_icon_get(void *data, Evas_Object * obj,
        mp_media_info_get_file_path(track, &uri);
 
        Evas_Object *part_content =
-               elm_object_item_part_content_get(item->it, "elm.swallow.icon");
+               elm_object_item_part_content_get(item->it, "elm.icon");
        if (part_content) {
                elm_object_signal_emit(part_content, "show_default", "*");
        }
@@ -157,20 +206,7 @@ Evas_Object *_mp_track_list_icon_get(void *data, Evas_Object * obj,
                }
        }
 
-       if (match && part_content) {
-               if (((int) mp_player_mgr_get_state() ==
-                        (int) PLAYER_STATE_PLAYING)) {
-                       elm_object_signal_emit(part_content, "show_play", "*");
-               } else
-                       if (((int) mp_player_mgr_get_state() ==
-                                (int) PLAYER_STATE_PAUSED)
-                               || ((int) mp_player_mgr_get_state() ==
-                                       (int) PLAYER_STATE_READY)) {
-                       elm_object_signal_emit(part_content, "show_pause", "*");
-               }
-       }
-
-       if (!strcmp(part, "elm.swallow.icon")) {
+       if (!strcmp(part, "elm.icon")) {
                char *thumbpath = NULL;
                Evas_Object *icon;
 
@@ -215,7 +251,7 @@ Evas_Object *_mp_track_list_icon_get(void *data, Evas_Object * obj,
 
        if (list->edit_mode) {
                // if edit mode
-               if (!strcmp(part, "elm.swallow.end")) {
+               if (!strcmp(part, "elm.end")) {
                        // swallow checkbox or radio button
                        Evas_Object *check = NULL;
                        check = elm_check_add(obj);
@@ -231,7 +267,7 @@ Evas_Object *_mp_track_list_icon_get(void *data, Evas_Object * obj,
        }
 
        if (list->reorderable) {
-               if (!strcmp(part, "elm.swallow.end")) {
+               if (!strcmp(part, "elm.end")) {
                        Evas_Object *reorder_btn = elm_button_add(obj);
                        elm_object_style_set(reorder_btn, "music/reorder_button");
                        evas_object_repeat_events_set(reorder_btn, EINA_TRUE);
@@ -622,8 +658,8 @@ static void _mp_track_list_append_item(MpTrackList_t * list,
                                                _mp_track_genlist_sel_cb, list);
                elm_object_item_data_set(item_data->it, item_data);
        }
-       endfunc;
 
+       endfunc;
 }
 
 static Eina_Bool _mp_track_list_lazy_load(void *thiz)
@@ -648,8 +684,6 @@ static Eina_Bool _mp_track_list_lazy_load(void *thiz)
                                                          INITIAL_LOAD_COUNT, count);
        _mp_track_list_append_item(list, svc_handle, count);
 
-//  mp_list_bottom_counter_item_append((MpList_t *)list);
-
        if (list->track_list[1]) {
                mp_media_info_list_destroy(list->track_list[1]);
        }
@@ -697,36 +731,41 @@ static char *_mp_track_list_shuffle_text_get(void *data, Evas_Object * obj,
        return NULL;
 }
 
-Evas_Object *_mp_track_list_shuffle_icon_get(void *data, Evas_Object * obj,
-                                                                                        const char *part)
+
+static char *_mp_track_list_shuffle_label_text_get(MpTrackList_t * obj)
 {
-       Evas_Object *content = NULL;
-       content = elm_layout_add(obj);
+       char *markup = NULL;
+       static char result[DEF_STR_LEN + 1] = { 0, };
+       MpTrackList_t *list = obj;
+       MP_CHECK_NULL(list);
 
-       if (!strcmp(part, "elm.swallow.icon")) {
-               Evas_Object *icon;
-               icon =
-                       mp_util_create_image(obj, IMAGE_EDJ_NAME, MP_LITE_SHUFFLE_ICON,
-                                                                MP_LIST_SHUFFLE_ICON_SIZE,
-                                                                MP_LIST_SHUFFLE_ICON_SIZE);
-               evas_object_color_set(icon, 21, 108, 148, 255);
+       int r = 21;
+       int g = 108;
+       int b = 148;
+       int a = 255;
+       int font_size = 22;
+       markup =
+               (list->track_count ==
+               1) ? g_strdup(GET_STR(STR_MP_SHUFFLE_1_TRACK)) :
+               g_strdup_printf(GET_STR(STR_MP_SHUFFLE_PD_TRACKS),
+                                                       list->track_count);
 
-               elm_layout_theme_set(content, "layout", "list/B/music.type.3",
-                                                        "default");
-               elm_layout_content_set(content, "elm.swallow.content", icon);
+       memset(result, 0x00, DEF_STR_LEN + 1);
+       snprintf(result, DEF_STR_LEN,
+                       "<align=left><font=BreezeSans:style=Regular font_size=%d><color=#000C2B>%s</color></font></align>",font_size ,
+                       markup);
+       IF_FREE(markup);
 
-               return content;
-       }
-       return NULL;
+       return g_strdup(result);
 }
 
-
 static void
-_mp_track_list_shuffle_cb(void *data, Evas_Object * obj, void *event_info)
+_mp_track_list_shuffle_cb(void *data, Evas_Object * o, void *event_info)
 {
+
        eventfunc;
-       Elm_Object_Item *gli = (Elm_Object_Item *) event_info;
-       elm_genlist_item_selected_set(gli, FALSE);
+       Evas_Object *obj = ((MpTrackList_t *)data)->genlist;
 
        MP_LIST_ITEM_IGNORE_SELECT(obj);
 
@@ -737,22 +776,36 @@ _mp_track_list_shuffle_cb(void *data, Evas_Object * obj, void *event_info)
        MP_CHECK(ad);
 
        ad->isPlayBtn = true;
        if (_mp_is_current_focus_available(ad) != 0) {
-               ERROR_TRACE
-               ("Some other application has the focus currently... Returning...");
+               ERROR_TRACE("Some other application has the focus currently... Returning...");
                return;
        }
 
-       mp_list_item_data_t *item =
-                       (mp_list_item_data_t *) elm_object_item_data_get(gli);
+       mp_list_item_data_t *item;
+       item = calloc(1, sizeof(mp_list_item_data_t));
        MP_CHECK(item);
+       item->item_type = MP_LIST_ITEM_TYPE_SHUFFLE;
+       item->it = NULL;
        mp_play_control_shuffle_set(NULL, true);
        mp_common_play_track_list_with_playlist_id(item, obj,
                        list->playlist_id);
-
+  SAFE_FREE(item);
        return;
 }
 
+
+
+Evas_Object *_mp_track_list_shuffle_icon_get(void *data, Evas_Object * obj,
+                                                                                        const char *part)
+{
+       return NULL;
+}
+
+
+
+
 static void
 _mp_track_list_shuffle_item_del_cb(void *data, Evas_Object * obj)
 {
@@ -762,17 +815,17 @@ _mp_track_list_shuffle_item_del_cb(void *data, Evas_Object * obj)
 
 static void _mp_track_list_append_shuffle_item(MpTrackList_t * list)
 {
+
        startfunc;
        MP_CHECK(list);
 
        if (list->itc_shuffle == NULL) {
                list->itc_shuffle = elm_genlist_item_class_new();
                MP_CHECK(list->itc_shuffle);
-               list->itc_shuffle->item_style = "default";
-               list->itc_shuffle->func.text_get = _mp_track_list_shuffle_text_get;
+               list->itc_shuffle->item_style = "full";
+               list->itc_shuffle->func.text_get = NULL;//_mp_track_list_shuffle_text_get;
                list->itc_shuffle->decorate_all_item_style = NULL;
-               list->itc_shuffle->func.content_get =
-                       _mp_track_list_shuffle_icon_get;
+               list->itc_shuffle->func.content_get = _mp_track_list_shuffle_icon_get;
                list->itc_shuffle->func.del = _mp_track_list_shuffle_item_del_cb;
        }
 
@@ -818,6 +871,7 @@ void mp_track_list_popup_delete_genlist_item(void *thiz)
 
        if (list->track_count > 0) {
                list->track_count--;
+               elm_object_text_set(list->tracks_count_label, _mp_track_list_shuffle_label_text_get(list));
        }
 }
 
@@ -831,6 +885,7 @@ void mp_track_list_update_genlist(void *thiz)
 
        if (list->track_count <= 0) {
                mp_list_update(thiz);
+               elm_object_text_set(list->tracks_count_label, _mp_track_list_shuffle_label_text_get(list));
        } else {
                elm_genlist_realized_items_update(list->genlist);
        }
@@ -1206,14 +1261,6 @@ static void _mp_track_list_load_list(void *thiz, int count)
                        count);
        PROFILE_OUT("mp_media_info_list_create");
 
-       if (!list->edit_mode) {
-               if (ad->recentlyAddedGridView) {
-                       mp_track_list_show_recently_added_tracks(list);
-                       ad->recentlyAddedGridView = false;
-               }
-               mp_track_list_show_shuffle(list, true);
-       }
-
        PROFILE_IN("_mp_track_list_append_item");
        _mp_track_list_append_item(list, svc_handle, count);
        PROFILE_OUT("_mp_track_list_append_item");
@@ -1310,6 +1357,86 @@ static void _mp_track_list_item_unhighlighted(void *data,
        }
 }
 
+static void set_button_image(Evas_Object *obj, char *image_name, int w, int h)
+{
+       Evas_Object *img = elm_image_add(obj);
+       evas_object_resize(img, w, h);
+       char buffer[1024] = {0,};
+       const char *path  = app_get_resource_path();
+       snprintf(buffer, 1024, "%s%s%s", path, "images/", image_name);
+       elm_image_file_set(img, buffer, NULL);
+       elm_object_part_content_set(obj, "icon", img);
+  SAFE_FREE(path);
+}
+
+static Evas_Object * mp_track_list_shuffle_button(MpTrackList_t *list, Evas_Object * obj)
+{
+
+       Evas_Object *shuffle_btn = elm_button_add(obj);
+       Evas_Object *img = elm_image_add(shuffle_btn);
+       evas_object_resize(img, 32, 32);
+       char buffer[1024] = {0,};
+       const char *path  = app_get_resource_path();
+       snprintf(buffer, 1024, "%s%s%s", path, "images/", "play_icon_shuffle.png");
+       elm_image_file_set(img, buffer, NULL);
+       elm_object_part_content_set(shuffle_btn, "icon", img);
+
+       elm_object_style_set(shuffle_btn, "focus");
+       
+       evas_object_show(shuffle_btn);
+  SAFE_FREE(path);
+       return shuffle_btn;
+}
+
+static void
+_mp_player_play_all(void *data, Evas_Object * obj, Elm_Object_Item *gli)
+{
+       eventfunc;
+       MP_LIST_ITEM_IGNORE_SELECT(obj);
+
+       MpList_t *list = data;
+       MP_CHECK(list);
+
+       struct appdata *ad = mp_util_get_appdata();
+       MP_CHECK(ad);
+
+       ad->isPlayBtn = true;
+       if (_mp_is_current_focus_available(ad) != 0) {
+               ERROR_TRACE
+                       ("Some other application has the focus currently... Returning...");
+               return;
+       }
+
+       mp_list_item_data_t *item =
+               (mp_list_item_data_t *) elm_object_item_data_get(gli);
+       MP_CHECK(item);
+       mp_play_control_shuffle_set(NULL, false);
+       if (list->edit_mode) {
+               mp_list_edit_mode_sel(list, item);
+               MpViewMgr_t *view_mgr = mp_view_mgr_get_view_manager();
+               MpView_t *view = mp_view_mgr_get_top_view(view_mgr);
+               mp_view_update_options_edit(view);
+               return;
+       }
+
+       if (!list->reorderable) {
+               mp_common_play_track_list_with_playlist_id(item, obj,
+                               list->playlist_id);
+       }
+
+       return;
+}
+
+static void
+_mp_track_list_play_all_cb(void *data, Evas_Object * obj, void *event_info)
+{
+       Evas_Object *genlist = ((MpTrackList_t *)data)->genlist;
+
+       Elm_Object_Item *genlist_first_item = elm_genlist_first_item_get(genlist);
+
+       _mp_player_play_all(data ,genlist, genlist_first_item);
+}
+
 static void _mp_track_list_update(void *thiz)
 {
        startfunc;
@@ -1329,6 +1456,7 @@ static void _mp_track_list_update(void *thiz)
        PROFILE_OUT("mp_media_info_list_count");
        MP_CHECK(res == 0);
        list->track_count = count;
+       elm_object_text_set(list->tracks_count_label, _mp_track_list_shuffle_label_text_get(list));
 
        if (list->get_by_view == false) {
                mp_list_free_checked_path_list(list->checked_path_list);
@@ -1337,14 +1465,10 @@ static void _mp_track_list_update(void *thiz)
        }
        mp_evas_object_del(list->no_content);
        mp_evas_object_del(list->genlist);
 
 
        if (count) {
-               // Place Recently Added Grid View only when there are some items in genlist
-               if (ad->recentlyAddedGridView) {
-                       mp_track_list_initialize_recently_added(list);
-               }
-
                /*create new genlist */
                PROFILE_IN("elm_genlist_add");
                list->genlist = mp_widget_genlist_create(list->box);
@@ -1365,7 +1489,7 @@ static void _mp_track_list_update(void *thiz)
                if (!list->itc) {
                        list->itc = elm_genlist_item_class_new();
                        if (list->itc) {
-                               list->itc->item_style = "type1";
+                               list->itc->item_style = "2line";
                                list->itc->func.text_get = _mp_track_list_label_get;
                                list->itc->func.content_get = _mp_track_list_icon_get;
                                list->itc->func.del = _mp_track_list_item_del_cb;
@@ -1378,6 +1502,7 @@ static void _mp_track_list_update(void *thiz)
                                        list);
                }
 
+               evas_object_smart_callback_add(list->genlist, "realized", __gl_realized_cb, list);
                evas_object_smart_callback_add(list->genlist, "scroll,drag,start",
                                list->drag_start_cb, list);
                evas_object_smart_callback_add(list->genlist, "scroll,drag,stop",
@@ -1396,14 +1521,20 @@ static void _mp_track_list_update(void *thiz)
                list->show_fastscroll(list);
                PROFILE_OUT("_mp_track_list_load_list");
 
+               elm_object_part_content_set(list->track_control_layout, "shuffle_part_swallow", list->shuffle_btn);
+               elm_object_part_content_set(list->track_control_layout, "play_all_part_swallow", list->playall_btn);
+               evas_object_smart_callback_add(list->shuffle_btn, "clicked", _mp_track_list_shuffle_cb, list);
+               evas_object_smart_callback_add(list->playall_btn, "clicked", _mp_track_list_play_all_cb, list);
+  
+
                if (!mp_list_get_editable_count(thiz, mp_list_get_edit_type(thiz))) {
                        goto NoContents;
                }
-
                return;
        }
 
   NoContents:
+       elm_object_signal_emit(mp_all_get_tabbar_layout(), "default_signal", "default_source");
        list->hide_fastscroll(list);
        mp_evas_object_del(list->genlist);
        if (!list->no_content) {
@@ -1482,8 +1613,6 @@ static void _mp_track_list_set_edit(void *thiz, bool edit)
        MpTrackList_t *list = thiz;
        MP_CHECK(list);
 
-       mp_track_list_show_shuffle(list, false);
-
        /* check DRM FL */
        if (mp_list_get_edit_type((MpList_t *) list) ==
                MP_LIST_EDIT_TYPE_SHARE) {
@@ -1565,7 +1694,6 @@ static mp_group_type_e _mp_track_list_get_group_type(void *thiz)
        return MP_GROUP_NONE;
 }
 
-
 MpTrackList_t *mp_track_list_create(Evas_Object * parent)
 {
        eventfunc;
@@ -1575,7 +1703,11 @@ MpTrackList_t *mp_track_list_create(Evas_Object * parent)
        MP_CHECK_NULL(list);
 
        mp_list_init((MpList_t *) list, parent, MP_LIST_TYPE_TRACK);
-
+       list->track_control_layout = mp_common_load_edj(((MpList_t *) list)->layout, MP_EDJ_NAME, "list_control_layout");
+       elm_object_part_content_set(((MpList_t *) list)->layout, "control_part", list->track_control_layout);
+       evas_object_show(list->track_control_layout);
+  
        list->update = _mp_track_list_update;
        list->destory_cb = _mp_track_list_destory_cb;
        list->get_track_type = _mp_track_list_get_track_type;
@@ -1590,6 +1722,42 @@ MpTrackList_t *mp_track_list_create(Evas_Object * parent)
        list->bottom_counter_text_get_cb =
                _mp_track_list_bottom_counter_text_cb;
 
+       list->tracks_count_label = elm_label_add(list->track_control_layout);
+       elm_object_text_set(list->tracks_count_label, "");
+       elm_object_part_content_set(list->track_control_layout, "label_part_swallow", list->tracks_count_label);
+       evas_object_show(list->tracks_count_label);
+
+       list->shuffle_btn = elm_button_add(list->track_control_layout);
+       Evas_Object *img = elm_image_add(list->shuffle_btn);
+       evas_object_resize(img, 32, 32);
+       char buffer[1024] = {0,};
+       const char *path  = app_get_resource_path();
+       snprintf(buffer, 1024, "%s%s%s", path, "images/", "play_icon_shuffle.png");
+       elm_image_file_set(img, buffer, NULL);
+       elm_object_part_content_set(list->shuffle_btn, "icon", img);
+
+       elm_object_style_set(list->shuffle_btn, "focus");
+
+       evas_object_show(list->shuffle_btn);
+       evas_object_show(list->track_control_layout);
+   
+
+       list->playall_btn = elm_button_add(list->track_control_layout);
+       Evas_Object *img_play_all = elm_image_add(list->playall_btn);
+       evas_object_resize(img_play_all, 26, 21);
+       char buffer_play_all[1024] = {0,};
+       const char *path_play_all  = app_get_resource_path();
+       snprintf(buffer_play_all, 1024, "%s%s%s", path_play_all, "images/", "playall.png");
+       elm_image_file_set(img_play_all, buffer_play_all, NULL);
+       elm_object_part_content_set(list->playall_btn, "icon", img_play_all);
+
+       elm_object_style_set(list->playall_btn, "focus");
+
+       evas_object_show(list->playall_btn);
+       evas_object_show(list->track_control_layout);
+  SAFE_FREE(path);
+  SAFE_FREE(path_play_all);
+
        return list;
 }