From: bhutani.92 Date: Tue, 29 Nov 2016 08:39:51 +0000 (+0530) Subject: Removed Unused Code [MP_DEBUG_MODE] [MP_FEATURE_SHORTCUT] [TEST_PLAYER_ONLY] [MP_FEAT... X-Git-Tag: submit/tizen_3.0/20161129.124714~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2a15205e36fa0b8676d3c062667e5c2b88fc4e41;p=profile%2Fmobile%2Fapps%2Fnative%2Fmusic-player.git Removed Unused Code [MP_DEBUG_MODE] [MP_FEATURE_SHORTCUT] [TEST_PLAYER_ONLY] [MP_FEATURE_STORE] [MC_ENABLE_PLAYLIST [MP_FEATURE_ADD_TO_HOME] [MP_FEATURE_SHARE] [MP_FEATURE_EDIT_PLAYLIST_IMAGE] [MP_IMAGE_EFFECT] Change-Id: I4c5814912f2f91d5150221753fdefa5c9af4807b Signed-off-by: bhutani.92 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index cb606f5..58e450c 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,7 +46,6 @@ ENDIF (CMAKE_ENABLE_FEATURE_DROPBOX) #ENDIF (CMAKE_ENABLE_MULTIWINDOW) IF (CMAKE_DEBUG_MODE) - ADD_DEFINITIONS("-DMP_DEBUG_MODE") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") ENDIF (CMAKE_DEBUG_MODE) diff --git a/music-chooser/src/include/mc-debug.h b/music-chooser/src/include/mc-debug.h index b6b0c1e..a47c990 100644 --- a/music-chooser/src/include/mc-debug.h +++ b/music-chooser/src/include/mc-debug.h @@ -25,10 +25,6 @@ #include "assert.h" #include -#ifdef MP_DEBUG_MODE -#define ENABLE_CHECK_START_END_FUNCTION // support enter leave debug message -#endif - #define ENABLE_LOG_SYSTEM #ifdef ENABLE_LOG_SYSTEM diff --git a/music-chooser/src/mc-library-view.c b/music-chooser/src/mc-library-view.c index 926dc67..8fa495c 100644 --- a/music-chooser/src/mc-library-view.c +++ b/music-chooser/src/mc-library-view.c @@ -34,9 +34,6 @@ typedef struct { enum { TAB_ALL, -#ifdef MC_ENABLE_PLAYLIST - TAB_PLAYLIST, -#endif TAB_ALBUM, TAB_ARTIST, TAB_MAX, @@ -79,36 +76,6 @@ static void _all_cb(void *data, Evas_Object *obj, void *event_info) eext_object_event_callback_add(sub_view, EEXT_CALLBACK_BACK, mc_eext_quit_cb, ad); endfunc; } -#ifdef MC_ENABLE_PLAYLIST -static void _playlist_cb(void *data, Evas_Object *obj, void *event_info) -{ - startfunc; - struct app_data *ad = data; - MP_CHECK(ad); - mc_common_obj_domain_text_translate(ad->navi_bar, mc_create_selectioninfo_text_with_count(0)); - Evas_Object *sub_view; - if (detail_view) { - elm_naviframe_item_pop(ad->navi_bar); - ad->track_type = MP_TRACK_BY_PLAYLIST; - detail_view = false; - mc_library_view_create(ad); - return; - } - - - sub_view = elm_object_part_content_unset(g_ly, "list-content"); - evas_object_del(sub_view); - - sub_view = mc_group_list_create(g_ly, ad, g_navi_it); - mc_group_list_set_data(sub_view, MP_GROUP_BY_PLAYLIST, NULL); - mc_group_list_update(sub_view); - - elm_object_part_content_set(g_ly, "list-content", sub_view); - evas_object_show(sub_view); - eext_object_event_callback_add(ad->navi_bar, EEXT_CALLBACK_BACK, mc_eext_quit_cb, ad); - endfunc; -} -#endif #ifdef MC_ENABLE_TAB static void _artist_cb(void *data, Evas_Object *obj, void *event_info) @@ -204,9 +171,6 @@ Evas_Object *_create_tabbar(Evas_Object *parent, struct app_data *ad) } g_tab_item[TAB_ALL] = mc_common_toolbar_item_append(obj, NULL, MC_TEXT_ALL, _all_cb, ad); -#ifdef MC_ENABLE_PLAYLIST - g_tab_item[TAB_PLAYLIST] = mc_common_toolbar_item_append(obj, NULL, MC_TEXT_PLAYLISTS, _playlist_cb, ad); -#endif g_tab_item[TAB_ALBUM] = mc_common_toolbar_item_append(obj, NULL, MC_TEXT_ALBUMS, _album_cb, ad); #ifdef MC_ENABLE_TAB g_tab_item[TAB_ARTIST] = mc_common_toolbar_item_append(obj, NULL, MC_TEXT_ARTISTS, _artist_cb, ad); diff --git a/src/common/include/mp-common.h b/src/common/include/mp-common.h index 613efe5..0ccc896 100644 --- a/src/common/include/mp-common.h +++ b/src/common/include/mp-common.h @@ -27,10 +27,6 @@ #include "mp-player-control.h" #include "mp-all-view.h" -#ifdef MP_FEATURE_STORE -#include "mh-common.h" -#endif - struct text_part { char *part; @@ -90,10 +86,6 @@ void mp_common_view_check_changed_cb(void *data, Evas_Object *obj, void *event_i bool mp_common_track_is_current(mp_media_info_h media,MpList_t *list); void mp_common_track_delete_cb(void *data, Evas_Object * obj, void *event_info); -#ifdef MP_FEATURE_STORE -MpView_t *mp_common_get_scroll_view(MpViewMgr_t *view_mgr); -void mp_common_go_to_store_cb(void *data, Evas_Object *obj, void *event_info); -#endif #ifndef MP_SOUND_PLAYER bool _mp_common_parse_open_shortcut(app_control_h app_control, MpTab_e *tab, char **shortcut_main_info); #endif diff --git a/src/common/include/mp-menu.h b/src/common/include/mp-menu.h index 2a48d6b..b068bc3 100644 --- a/src/common/include/mp-menu.h +++ b/src/common/include/mp-menu.h @@ -33,9 +33,6 @@ void mp_menu_genlist_set_as_select_cb(void *data, Evas_Object * obj, void *event void mp_menu_genlist_popup_share_select_cb(void *data, Evas_Object * obj, void *event_info); void mp_menu_genlist_popup_list_share_select_cb(void *data, Evas_Object * obj, void *event_info); -#ifdef MP_FEATURE_ADD_TO_HOME -void mp_menu_add_to_home(int type, void *main_info, void *extra_info1, void *extra_info2); -#endif void mp_menu_share_cb(void *data, Evas_Object * obj, void *event_info); void mp_menu_set_cb(void *data, Evas_Object * obj, void *event_info); #ifndef MP_SOUND_PLAYER diff --git a/src/common/include/mp-ta.h b/src/common/include/mp-ta.h index 56ab122..7a9cc4f 100644 --- a/src/common/include/mp-ta.h +++ b/src/common/include/mp-ta.h @@ -19,11 +19,6 @@ #define _MP_TA_H_ #include "mp-define.h" -#ifdef MP_DEBUG_MODE -#ifndef MP_SOUND_PLAYER -#define ENABLE_MP_TA -#endif -#endif #ifdef ENABLE_MP_TA diff --git a/src/common/include/mp-util.h b/src/common/include/mp-util.h index 82dc0ec..6e7c957 100755 --- a/src/common/include/mp-util.h +++ b/src/common/include/mp-util.h @@ -129,9 +129,6 @@ bool mp_util_sleep_lock_set(bool lock, bool force_unlock); bool mp_util_is_nfc_feature_on(void); void mp_util_strncpy_safe(char *x_dst, const char *x_src, int max_len); -#ifdef MP_IMAGE_EFFECT -bool mp_util_edit_image(Evas *evas, Evas_Object *src_image, const char *path, int mode); -#endif void mp_util_free_track_info(mp_track_info_t *track_info); void mp_util_load_track_info(struct appdata *ad, mp_plst_item *cur_item, mp_track_info_t **info); void mp_util_append_media_list_item_to_playlist(mp_plst_mgr *playlist_mgr, mp_media_list_h media_list, int count, int current_index, const char *uri); diff --git a/src/common/mp-common.c b/src/common/mp-common.c index e1c1ae0..f1f986c 100755 --- a/src/common/mp-common.c +++ b/src/common/mp-common.c @@ -955,99 +955,6 @@ mp_common_show_player_view(int launch_type, bool disable_effect, bool start_play endfunc; } - -#ifdef MP_DEBUG_MODE -static void -_mp_common_window_flush_pre(void *data, Evas * e, void *event_info) -{ - DEBUG_TRACE(""); - TA_E_L(0, "EVAS_CALLBACK_RENDER_FLUSH_PRE"); - evas_event_callback_del(e, EVAS_CALLBACK_RENDER_FLUSH_PRE, _mp_common_window_flush_pre); -} -#endif - -#ifdef MP_DEBUG_MODE -//#define TEST_PLAYER_ONLY -#endif - -#ifdef TEST_PLAYER_ONLY -#include - -#define RICH_AUDIO "/tmp/RA" -#define ALH "/tmp/ALH" - -void _player_prepared_cb(void *user_data); -void _player_complete_cb(void *user_data); - -static player_h g_tmp_player; - -void _play_uri(char *path) -{ - player_create(&g_tmp_player); - player_set_sound_type(g_tmp_player, SOUND_TYPE_MEDIA); - - if (mp_check_file_exist(ALH)) { - player_set_audio_latency_mode(g_tmp_player, AUDIO_LATENCY_MODE_HIGH); - } - player_set_uri(g_tmp_player, path); - - player_set_completed_cb(g_tmp_player, _player_complete_cb, NULL); - player_prepare_async(g_tmp_player, _player_prepared_cb, NULL); -} - -Eina_Bool _prepared(void *data) -{ - startfunc; - player_start(g_tmp_player); - mp_util_sleep_lock_set(TRUE, FALSE); - return false; -} - -Eina_Bool _complete(void *data) -{ - startfunc; - player_stop(g_tmp_player); - player_unprepare(g_tmp_player); - player_destroy(g_tmp_player); - - struct appdata *ad = mp_util_get_appdata(); - MP_CHECK_FALSE(ad); - - mp_util_sleep_lock_set(FALSE, FALSE); - - mp_plst_item *item = mp_playlist_mgr_get_next(ad->playlist_mgr, true, false); - mp_playlist_mgr_set_current(ad->playlist_mgr, item); - - _play_uri(item->uri); - - return false; -} - -void _player_prepared_cb(void *user_data) -{ - startfunc; - ecore_idler_add(_prepared, NULL); -} - -void _player_complete_cb(void *user_data) -{ - startfunc; - ecore_idler_add(_complete, NULL); -} - -static void -_test_player(void) -{ - struct appdata *ad = mp_util_get_appdata(); - MP_CHECK(ad); - - mp_plst_item *item = mp_playlist_mgr_get_current(ad->playlist_mgr); - - _play_uri(item->uri); - -} -#endif - void mp_common_show_player_view_after_play() { @@ -1141,11 +1048,6 @@ void mp_common_play_track_list_with_playlist_id(mp_list_item_data_t *item, Evas_ mp_storage_type_e storage; mp_media_info_get_storage_type(item_data->handle, &storage); -#ifdef MP_FEATURE_STORE - if (storage == MP_STORAGE_MUSICHUB) { - track_type = MP_TRACK_STORE; - } -#endif plst_item = mp_playlist_mgr_item_append(ad->playlist_mgr, uri, uid, title, artist, track_type); if (playlist_id) { @@ -1200,24 +1102,13 @@ void mp_common_play_track_list_with_playlist_id(mp_list_item_data_t *item, Evas_ PROFILE_OUT("mp_play_destory"); mp_play_new_file(ad, TRUE); - -#ifdef TEST_PLAYER_ONLY - _test_player(); - return; -#endif } else { mp_player_mgr_play(ad); mp_common_show_player_view(MP_PLAYER_NORMAL, false, false, false); } -#ifdef MP_DEBUG_MODE - TA_S_L(0, "EVAS_CALLBACK_RENDER_FLUSH_PRE"); - evas_event_callback_add(evas_object_evas_get(ad->win_main), EVAS_CALLBACK_RENDER_FLUSH_PRE, _mp_common_window_flush_pre, NULL); -#endif mp_view_mgr_post_event(GET_VIEW_MGR, MP_PLAYLIST_MGR_ITEM_CHANGED); - return; - } void mp_common_play_track_list(mp_list_item_data_t *item, Evas_Object *genlist) @@ -2310,114 +2201,6 @@ int mp_common_get_playlist_totaltime(mp_track_type_e track_type, int playlist_id return total; } -#ifdef MP_FEATURE_ADD_TO_HOME -static char *_mp_media_info_get_live_auto_playlist_thumbnail_by_name(const char *name) -{ - MP_CHECK_VAL(name, NULL); - - char thumb_path[1024] = {0}; - char *shared_path = app_get_shared_resource_path(); - - if (!g_strcmp0(name, STR_MP_FAVOURITES)) { - snprintf(thumb_path, 1024, "%s%s/%s", shared_path, "shared_images", LIVE_THUMBNAIL_QUICK_LIST); - } else if (!g_strcmp0(name, STR_MP_RECENTLY_PLAYED)) { - snprintf(thumb_path, 1024, "%s%s/%s", shared_path, "shared_images", LIVE_THUMBNAIL_RECENTLY_PLAYED); - } else if (!g_strcmp0(name, STR_MP_RECENTLY_ADDED)) { - snprintf(thumb_path, 1024, "%s%s/%s", shared_path, "shared_images", LIVE_THUMBNAIL_RECENTLY_ADDED); - } else if (!g_strcmp0(name, STR_MP_MOST_PLAYED)) { - snprintf(thumb_path, 1024, "%s%s/%s", shared_path, "shared_images", LIVE_THUMBNAIL_MOST_PLAYED); - } - free(shared_path); - - return thumb_path; -} - -static char *_mp_media_info_get_live_auto_playlist_icon_by_name(const char *name) -{ - MP_CHECK_VAL(name, NULL); - - char icon_path[1024] = {0}; - char *shared_path = app_get_shared_resource_path(); - - if (!g_strcmp0(name, STR_MP_FAVOURITES)) { - snprintf(icon_path, 1024, "%s%s/%s", shared_path, "shared_images", LIVE_ICON_QUICK_LIST); - } else if (!g_strcmp0(name, STR_MP_RECENTLY_PLAYED)) { - snprintf(icon_path, 1024, "%s%s/%s", shared_path, "shared_images", LIVE_ICON_RECENTLY_PLAYED); - } else if (!g_strcmp0(name, STR_MP_RECENTLY_ADDED)) { - snprintf(icon_path, 1024, "%s%s/%s", shared_path, "shared_images", LIVE_ICON_RECENTLY_ADDED); - } else if (!g_strcmp0(name, STR_MP_MOST_PLAYED)) { - snprintf(icon_path, 1024, "%s%s/%s", shared_path, "shared_images", LIVE_ICON_MOST_PLAYED); - } - - free(shared_path); - - return icon_path; -} - -void mp_common_add_to_home_cb(void *data, Evas_Object * obj, void *event_info) -{ - eventfunc; - - struct appdata *ad = mp_util_get_appdata(); - - MpList_t *list = data; - MP_CHECK(list); - - GList *sel_list = NULL; - char *name = NULL; - char *thumbnail = NULL; - int ret = 0; - int p_id = -1; - mp_list_item_data_t *item_data = NULL; - - mp_popup_destroy(ad); - - mp_list_selected_item_data_get((MpList_t *)list, &sel_list); - - if (g_list_length(sel_list) == 0) { - mp_widget_text_popup(ad, GET_STR("IDS_MUSIC_POP_NOTHING_SELECTED")); - return; - } - - GList *node = g_list_first(sel_list); - while (node) { - item_data = node->data; - node = g_list_next(node); - } - - ret = mp_media_info_group_get_main_info(item_data->handle, &name); - mp_retm_if(ret != 0, "Fail to get value"); - mp_retm_if(name == NULL, "Fail to get value"); - mp_media_info_group_get_thumbnail_path(item_data->handle, &thumbnail); - - int type = 0; - const char *extra1 = NULL; - const char *extra2 = NULL; - mp_group_type_e group_type = mp_list_get_group_type((MpList_t*)list); - if (group_type == MP_GROUP_BY_PLAYLIST) { - ret = mp_media_info_group_get_playlist_id(item_data->handle, &p_id); - mp_retm_if(ret != 0, "Fail to get value"); - DEBUG_TRACE("p_id: %d", p_id); - if (p_id < 0) { - type = MP_ADD_TO_HOME_SHORTCUT_TYPE_SYS_PLAYLIST; - extra1 = _mp_media_info_get_live_auto_playlist_thumbnail_by_name(name); - extra2 = _mp_media_info_get_live_auto_playlist_icon_by_name(name); - } else { - type = MP_ADD_TO_HOME_SHORTCUT_TYPE_USER_PLAYLIST; - name = (void *)p_id; - } - mp_menu_add_to_home(type, name, (void *)extra1, (void *)extra2); - } else if (group_type == MP_GROUP_BY_ALBUM) { - mp_menu_add_to_home(MP_ADD_TO_HOME_SHORTCUT_TYPE_ALBUM, name, thumbnail, NULL); - } - - if (sel_list) { - g_list_free(sel_list); - sel_list = NULL; - } -} -#endif - #ifndef MP_SOUND_PLAYER #ifdef MP_FEATURE_PERSONAL_PAGE all_in_personal_e mp_common_is_all_in_personal_page(Evas_Object *genlist) diff --git a/src/common/mp-menu.c b/src/common/mp-menu.c index d6df566..acb15d6 100755 --- a/src/common/mp-menu.c +++ b/src/common/mp-menu.c @@ -32,9 +32,6 @@ #include "mp-ctxpopup.h" #include "mp-setting-ctrl.h" -#ifdef MP_FEATURE_ADD_TO_HOME -//#include "shortcut.h" -#endif #ifndef MP_SOUND_PLAYER #include "mp-common.h" @@ -192,62 +189,3 @@ mp_menu_genlist_popup_list_share_select_cb(void *data, Evas_Object * obj, void * mp_popup_destroy(mp_util_get_appdata()); g_list_free(list); } - -#ifdef MP_FEATURE_ADD_TO_HOME -static int -_mp_menu_shortcut_res_cb(int ret, int pid, void *data) -{ - startfunc; - struct appdata *ad = NULL; - char *msg = NULL; - - ad = data; - MP_CHECK_VAL(ad, -1); - - if (ret == 0) { - msg = GET_STR("IDS_MUSIC_POP_ADDED"); - } else { - msg = GET_STR("IDS_MUSIC_POP_UNABLE_TO_ADD"); - } - mp_util_post_status_message(ad, msg); - - IF_FREE(ad->shortcut_descrition); - - return 0; -} -#endif - -#ifdef MP_FEATURE_ADD_TO_HOME -void -mp_menu_add_to_home(int type, void *main_info, void *extra_info1, void *extra_info2) -{ - startfunc; - - if (type >= MP_ADD_TO_HOME_SHORTCUT_TYPE_NUM) { - mp_assert(1); - } - - struct appdata *ad = mp_util_get_appdata(); - MP_CHECK(ad); - - char *shortcut_descrition = NULL; - if (type == MP_ADD_TO_HOME_SHORTCUT_TYPE_USER_PLAYLIST) { - shortcut_descrition = g_strdup_printf("%s%d|%d|%d", MP_ADD_TO_HOME_SHORTCUT_PREFIX, type, (int)main_info, 0); - } else { - shortcut_descrition = g_strdup_printf("%s%d|%s|%s|%s", MP_ADD_TO_HOME_SHORTCUT_PREFIX, type, (char *)main_info, (char *)extra_info1, (char *)extra_info2); - } - - mp_debug("description = %s", shortcut_descrition); - int ret = add_to_home_livebox(PKGNAME_FOR_SHORTCUT, NULL, LIVEBOX_TYPE_1x1, shortcut_descrition, NULL, -1.0f, true, _mp_menu_shortcut_res_cb, ad); - if (ret < 0) { - char *msg = NULL; - ERROR_TRACE("ret: %d", ret); - msg = GET_STR("IDS_MUSIC_POP_UNABLE_TO_ADD"); - mp_util_post_status_message(ad, msg); - } - IF_FREE(shortcut_descrition); - - endfunc; -} -#endif - diff --git a/src/common/mp-util.c b/src/common/mp-util.c index 98d6b6f..544d055 100755 --- a/src/common/mp-util.c +++ b/src/common/mp-util.c @@ -1382,172 +1382,6 @@ mp_util_strncpy_safe(char *x_dst, const char *x_src, int max_len) strncpy(x_dst, x_src, max_len - 1); x_dst[max_len - 1] = '\0'; } -#ifdef MP_IMAGE_EFFECT -static const double gaussian_template[7][7] = { - {0.00000067, 0.00002292, 0.00019117, 0.00038771, 0.00019117, 0.00002292, 0.00000067}, - {0.00002292, 0.00078633, 0.00655965, 0.01330373, 0.00655965, 0.00078633, 0.00002292}, - {0.00019117, 0.00655965, 0.05472157, 0.11098164, 0.05472157, 0.00655965, 0.00019117}, - {0.00038771, 0.01330373, 0.11098164, 0.22508352, 0.11098164, 0.01330373, 0.00038771}, - {0.00019117, 0.00655965, 0.05472157, 0.11098164, 0.05472157, 0.00655965, 0.00019117}, - {0.00002292, 0.00078633, 0.00655965, 0.01330373, 0.00655965, 0.00078633, 0.00002292}, - {0.00000067, 0.00002292, 0.00019117, 0.00038771, 0.00019117, 0.00002292, 0.00000067} -}; - -#define DARK_SCALE 0.6 - -static void __mp_util_gaussian_blur(unsigned char *src, unsigned char *dest, int w, int h) -{ - MP_CHECK(src); - MP_CHECK(dest); - - int x, y, i, j, idx, idx2, xx, yy; - for (y = 0; y < h; y++) { - for (x = 0; x < w; x++) { - idx = (y * w + x) * 4; - double v1 = 0, v2 = 0, v3 = 0; - - for (i = 0; i < 7; i++) { - for (j = 0; j < 7; j++) { - yy = y + j; - xx = x + i; - if (xx >= w) { - xx = w - 1; - } - if (yy >= h) { - yy = h - 1; - } - idx2 = (yy * w + xx) * 4; - v1 += (*(src + idx2)) * gaussian_template[i][j]; - v2 += (*(src + idx2 + 1)) * gaussian_template[i][j]; - v3 += (*(src + idx2 + 2)) * gaussian_template[i][j]; - } - } - *(dest + idx) = v1 * DARK_SCALE; - *(dest + idx + 1) = v2 * DARK_SCALE; - *(dest + idx + 2) = v3 * DARK_SCALE; - *(dest + idx + 3) = (*(src + idx + 3)); - } - } -} - - -bool mp_util_edit_image(Evas *evas, Evas_Object *src_image, const char *path, int mode) -{ - startfunc; - MP_CHECK_FALSE(evas); - MP_CHECK_FALSE(src_image); - MP_CHECK_FALSE(path); - MP_CHECK_FALSE(mode >= MP_PLAYING_VIEW_TOP_LEFT); - MP_CHECK_FALSE(mode <= MP_PLAYING_VIEW_BOTTOM_RIGHT); - - float rate_w = 720.0 / 1500.0; - float rate_h = 1280.0 / 1500.0; - - DEBUG_TRACE("rate_w=%f, rate_h=%f", rate_w, rate_h); - - Evas_Object *image = evas_object_image_add(evas); - evas_object_image_file_set(image, path, NULL); - - int w, h, dest_w, dest_h, x, y; - evas_object_image_size_get(image, &w, &h); - unsigned char *src = NULL; - src = (unsigned char *)evas_object_image_data_get(image, EINA_FALSE); - - MP_CHECK_FALSE(src); - DEBUG_TRACE("path=%s, w=%d, h=%d", path, w, h); - dest_w = (int)(rate_w * w); - dest_h = (int)(rate_h * h); - DEBUG_TRACE("rate_w=%f, rate_h=%f, dest_w=%d, dest_h=%d", rate_w, rate_h, dest_w, dest_h); - - int start_x, start_y, end_x, end_y; - - switch (mode) { - case MP_PLAYING_VIEW_TOP_LEFT: - start_x = 0; - start_y = 0; - break; - - case MP_PLAYING_VIEW_TOP_CENTER: - start_x = (w - dest_w) / 2; - start_y = 0; - break; - - case MP_PLAYING_VIEW_TOP_RIGHT: - start_x = w - dest_w; - start_y = 0; - break; - - case MP_PLAYING_VIEW_BOTTOM_LEFT: - start_x = 0; - start_y = h - dest_h; - break; - - case MP_PLAYING_VIEW_BOTTOM_CENTER: - start_x = (w - dest_w) / 2; - start_y = h - dest_h; - break; - - case MP_PLAYING_VIEW_BOTTOM_RIGHT: - start_x = w - dest_w; - start_y = h - dest_h; - break; - - default: - return false; - } - - unsigned char *dest = NULL; - dest = (unsigned char *)malloc(dest_w * dest_h * 4); - MP_CHECK_EXCEP(dest); - memset(dest, 0, dest_w * dest_h * 4); - - end_x = start_x + dest_w; - end_y = start_y + dest_h; - DEBUG_TRACE("(%d, %d), (%d, %d)", start_x, start_y, end_x, end_y); - - int dest_idx = 0; - int src_idx = 0; - unsigned char gray = 0; - for (y = start_y; y < end_y; y++) { - for (x = start_x; x < end_x; x++) { - dest_idx = ((y - start_y) * dest_w + (x - start_x)) * 4; - src_idx = (y * w + x) * 4; - - gray = (*(src + src_idx)) * 0.3 + (*(src + src_idx + 1)) * 0.59 + (*(src + src_idx + 2)) * 0.11; - *(dest + dest_idx) = gray; - *(dest + dest_idx + 1) = gray; - *(dest + dest_idx + 2) = gray; - *(dest + dest_idx + 3) = 0; - //*(dest+dest_idx+3) = (*(src+src_idx+3)); - } - } - - unsigned char *dest_data = NULL; - dest_data = (unsigned char *)malloc(dest_w * dest_h * 4); - MP_CHECK_EXCEP(dest_data); - memset(dest_data, 0, dest_w * dest_h * 4); - __mp_util_gaussian_blur(dest, dest_data, dest_w, dest_h); - IF_FREE(dest); - - evas_object_image_data_set(src_image, NULL); - evas_object_image_size_set(src_image, dest_w, dest_h); - evas_object_image_smooth_scale_set(src_image, EINA_TRUE); - evas_object_image_data_copy_set(src_image, dest_data); - evas_object_image_data_update_add(src_image, 0, 0, dest_w, dest_h); - IF_FREE(dest_data); - - mp_evas_object_del(image); - - endfunc; - return true; - -mp_exception: - mp_evas_object_del(image); - IF_FREE(dest); - IF_FREE(dest_data); - return false; -} -#endif void mp_util_free_track_info(mp_track_info_t *track_info) diff --git a/src/include/mp-define.h b/src/include/mp-define.h index b5d054b..2a7f30b 100755 --- a/src/include/mp-define.h +++ b/src/include/mp-define.h @@ -182,8 +182,6 @@ #define MP_FEATURE_EXIT_ON_BACK #define MP_FEATURE_USB_OTG #endif -#ifdef MP_DEBUG_MODE -#endif #define MP_POPUP_YES 1 #define MP_POPUP_NO 0 diff --git a/src/include/mp-player-debug.h b/src/include/mp-player-debug.h index 0a1b51f..dd2360c 100644 --- a/src/include/mp-player-debug.h +++ b/src/include/mp-player-debug.h @@ -56,11 +56,7 @@ #define WARN_TRACE(fmt, arg...) dlog_print(DLOG_WARN, LOG_TAG, "[%s : %05d %lu]" fmt "\n", __func__, __LINE__, gettid(), ##arg) #define EVENT_TRACE(fmt, arg...) dlog_print(DLOG_INFO, LOG_TAG, "[%s : %05d %lu]" fmt "\n", __func__, __LINE__, gettid(), ##arg) #define ERROR_TRACE(fmt, arg...) dlog_print(DLOG_ERROR, LOG_TAG, "[%s : %05d %lu]" fmt "\n", __func__, __LINE__, gettid(), ##arg) -#ifdef MP_DEBUG_MODE -#define mp_debug_temp(fmt, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, "[%s : %05d %lu]" fmt "\n", __func__, __LINE__, gettid(), ##arg) -#else #define mp_debug_temp(fmt, arg...) -#endif #define TIMER_TRACE(fmt, arg...) do { if (mp_file_exists("/tmp/mp_show_timer_log")) dlog_print(DLOG_DEBUG, LOG_TAG, "[%s : %05d %lu]" fmt "\n", __func__, __LINE__, gettid(), ##arg); } while (0) #define PARAM_CHECK(fmt, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, "[%s : %05d %lu]" fmt "\n", __func__, __LINE__, gettid(), ##arg) diff --git a/src/mp-main.c b/src/mp-main.c index 523fe84..29c3fd6 100755 --- a/src/mp-main.c +++ b/src/mp-main.c @@ -1039,22 +1039,6 @@ _mp_atexit_cb(void) ERROR_TRACE("#exit() invoked. music-player is exiting"); } -#ifdef MP_DEBUG_MODE -static void -_mp_main_window_flush_pre(void *data, Evas * e, void *event_info) -{ - DEBUG_TRACE(""); - - static int first; - if (!first) { - TA_E_L(0, "RENDER_FLUSH_POST(service to render)"); - TA_E_L(0, "RENDER_FLUSH_POST(main to render)"); - first = true; - } - evas_event_callback_del(e, EVAS_CALLBACK_RENDER_FLUSH_POST, _mp_main_window_flush_pre); -} -#endif - static void _mp_csc_feature_init(struct appdata *ad) { @@ -1489,11 +1473,6 @@ app_control(app_control_h app_control, void *data) } PROFILE_OUT("mp_service"); -#ifdef MP_DEBUG_MODE - TA_S_L(0, "RENDER_FLUSH_POST(service to render)"); - evas_event_callback_add(evas_object_evas_get(ad->win_main), EVAS_CALLBACK_RENDER_FLUSH_POST, _mp_main_window_flush_pre, NULL); -#endif - END: if (!g_normal_launched) { if (!_mp_main_is_launching_available(ad)) { diff --git a/src/view/include/mp-create-playlist-view.h b/src/view/include/mp-create-playlist-view.h index eb4edef..0440452 100644 --- a/src/view/include/mp-create-playlist-view.h +++ b/src/view/include/mp-create-playlist-view.h @@ -23,9 +23,6 @@ typedef enum { MP_PLST_CREATION_TYPE_NORMAL, -#ifdef MP_FEATURE_STORE - MP_PLST_CREATION_TYPE_WITH_STORE, -#endif } mp_plst_creation_type_e; typedef enum { @@ -50,9 +47,6 @@ typedef struct mp_media_info_h playlist_handle; char *name; MpList_t *adding_list; -#ifdef MP_FEATURE_STORE - GList *adding_song_list; -#endif char *adding_media_id; mp_plst_creation_type_e creation_type; }MpCreatePlstView_t; @@ -62,8 +56,4 @@ int mp_create_plst_view_set_edit_list(MpCreatePlstView_t *view, MpList_t *adding int mp_create_plst_view_set_media_id(MpCreatePlstView_t *view, const char *adding_media_id); int mp_create_plst_view_set_creation_type(MpCreatePlstView_t *view, mp_plst_creation_type_e type); int mp_create_plst_view_destory(MpCreatePlstView_t *view); -#ifdef MP_FEATURE_STORE -int mp_create_plst_view_set_adding_song_list(MpCreatePlstView_t *view, GList *list); -#endif - #endif diff --git a/src/view/mp-album-detail-view.c b/src/view/mp-album-detail-view.c index bf06fac..57305b2 100755 --- a/src/view/mp-album-detail-view.c +++ b/src/view/mp-album-detail-view.c @@ -73,21 +73,6 @@ int _mp_album_detail_view_update(void *thiz) return 0; } -#ifdef MP_FEATURE_ADD_TO_HOME -static void -_mp_album_detail_view_add_to_home_cb(void *data, Evas_Object *obj, void *event_info) -{ - eventfunc; - - MpAlbumDetailView_t *view = (MpAlbumDetailView_t *)data; - MP_CHECK(view); - - mp_evas_object_del(view->more_btn_ctxpopup); - - mp_menu_add_to_home(MP_ADD_TO_HOME_SHORTCUT_TYPE_ALBUM, view->name, view->thumbnail, NULL); -} -#endif - static void _mp_album_detail_view_add_to_playlist_cb(void *data, Evas_Object *obj, void *event_info) { eventfunc; @@ -110,12 +95,6 @@ static void _mp_album_detail_view_normal_more_btn_cb(void *data, Evas_Object *ob view->more_btn_ctxpopup = mp_common_create_more_ctxpopup(view); MP_CHECK(view->more_btn_ctxpopup); -#ifdef MP_FEATURE_SHARE - if (mp_list_get_editable_count(view->content_to_show, MP_LIST_EDIT_TYPE_SHARE)) { - mp_util_ctxpopup_item_append(view->more_btn_ctxpopup, - STR_MP_SHARE, MP_PLAYER_MORE_BTN_SHARE, mp_common_share_cb, view); - } -#endif if (mp_list_get_editable_count(view->content_to_show, MP_LIST_EDIT_TYPE_NORMAL)) { mp_util_ctxpopup_item_append(view->more_btn_ctxpopup, STR_MP_ADD_TO_PLAYLIST, MP_PLAYER_MORE_BTN_ADD_TO_PLAYLSIT_IMAGE, _mp_album_detail_view_add_to_playlist_cb, view); diff --git a/src/view/mp-all-view.c b/src/view/mp-all-view.c index 41c8770..033306b 100755 --- a/src/view/mp-all-view.c +++ b/src/view/mp-all-view.c @@ -31,12 +31,6 @@ static void _mp_all_view_playlist_list_create_playlist_cb(void *data, Evas_Object *obj, void *event_info); static void _mp_all_view_edit_cb(void *data, Evas_Object *obj, void *event_info); -#ifdef MP_FEATURE_SHORTCUT -#ifndef MP_DEBUG_MODE -static void _mp_all_view_update_favourite(MpAllView_t *view); -#endif -static void _mp_all_view_update_shortcut(MpAllView_t *view); -#endif static void _mp_all_view_content_load(void *thiz, MpTab_e tab); #define TAB_COUNT 4 @@ -193,15 +187,6 @@ static void _mp_all_view_normal_more_btn_cb(void *data, Evas_Object *obj, void * } } -#ifdef MP_FEATURE_SHARE - /* share via */ - if (index == MP_TAB_SONGS) { - if (mp_list_get_editable_count(view->content_to_show, MP_LIST_EDIT_TYPE_SHARE)) - mp_util_ctxpopup_item_append(view->more_btn_ctxpopup, - STR_MP_SHARE, MP_PLAYER_MORE_BTN_SHARE, mp_common_share_cb, view); - } -#endif - /*edit button*/ if (mp_list_get_editable_count(view->content_to_show, MP_LIST_EDIT_TYPE_NORMAL)) { if (index != MP_TAB_PLAYLISTS) { @@ -606,9 +591,6 @@ _mp_all_view_on_event(void *thiz, MpViewEvent_e event) break; /*case MP_PLAY_TIME_COUNT_UPDATED:*/ case MP_ADD_TO_PLAYLIST_DONE: -#ifdef MP_FEATURE_SHORTCUT - /*_mp_all_view_update_shortcut(view);*/ -#endif if (index == MP_TAB_PLAYLISTS) { mp_view_update(thiz); } @@ -725,33 +707,6 @@ _mp_all_view_on_event(void *thiz, MpViewEvent_e event) } } -#ifdef MP_FEATURE_SHORTCUT -#ifndef MP_DEBUG_MODE -static void -_mp_all_view_update_favourite(MpAllView_t *view) -{ - startfunc; - /*mp_all_list_update_favourite((MpAllList_t *)view->content_to_show);*/ -} -#endif -static void -_mp_all_view_update_shortcut(MpAllView_t *view) -{ - startfunc; - - /*mp_all_list_update_shortcut((MpAllList_t *)view->content_to_show);*/ -} - - -/*#define SHORCUT_W 720*elm_config_scale_get()*/ -#define LARGE_BOX_SIZE 480*elm_config_scale_get() -#define SMALL_BOX_SIZE 240*elm_config_scale_get() -#define LANDSCAPE_BOX_SIZE 377*elm_config_scale_get() -#define BOX_COUNT 3 - -#endif - - static int _mp_all_view_init(Evas_Object *parent, MpAllView_t *view) { diff --git a/src/view/mp-artist-detail-view.c b/src/view/mp-artist-detail-view.c index 5adcba5..5c33e78 100755 --- a/src/view/mp-artist-detail-view.c +++ b/src/view/mp-artist-detail-view.c @@ -86,12 +86,6 @@ static void _mp_artist_detail_view_normal_more_btn_cb(void *data, Evas_Object *o view->more_btn_ctxpopup = mp_common_create_more_ctxpopup(view); MP_CHECK(view->more_btn_ctxpopup); -#ifdef MP_FEATURE_SHARE - if (mp_list_get_editable_count(view->content_to_show, MP_LIST_EDIT_TYPE_SHARE)) { - mp_util_ctxpopup_item_append(view->more_btn_ctxpopup, - STR_MP_SHARE, MP_PLAYER_MORE_BTN_SHARE, mp_common_share_cb, view); - } -#endif if (mp_list_get_editable_count(view->content_to_show, MP_LIST_EDIT_TYPE_NORMAL)) { mp_util_ctxpopup_item_append(view->more_btn_ctxpopup, STR_MP_ADD_TO_PLAYLIST, MP_PLAYER_MORE_BTN_ADD_TO_PLAYLSIT_IMAGE, _mp_artist_detail_view_add_to_playlist_cb, view); diff --git a/src/view/mp-folder-detail-view.c b/src/view/mp-folder-detail-view.c index afbadc1..f30118a 100755 --- a/src/view/mp-folder-detail-view.c +++ b/src/view/mp-folder-detail-view.c @@ -77,12 +77,6 @@ static void _mp_folder_detail_view_normal_more_btn_cb(void *data, Evas_Object *o view->more_btn_ctxpopup = mp_common_create_more_ctxpopup(view); MP_CHECK(view->more_btn_ctxpopup); -#ifdef MP_FEATURE_SHARE - if (mp_list_get_editable_count(view->content_to_show, MP_LIST_EDIT_TYPE_SHARE)) { - mp_util_ctxpopup_item_append(view->more_btn_ctxpopup, - STR_MP_SHARE, MP_PLAYER_MORE_BTN_SHARE, mp_common_share_cb, view); - } -#endif if (mp_list_get_editable_count(view->content_to_show, MP_LIST_EDIT_TYPE_NORMAL)) { mp_util_ctxpopup_item_append(view->more_btn_ctxpopup, STR_MP_ADD_TO_PLAYLIST, MP_PLAYER_MORE_BTN_ADD_TO_PLAYLSIT_IMAGE, _mp_folder_detail_view_add_to_playlist_cb, view); diff --git a/src/view/mp-now-playing-list-view.c b/src/view/mp-now-playing-list-view.c index ffe75c0..8feb1c8 100755 --- a/src/view/mp-now-playing-list-view.c +++ b/src/view/mp-now-playing-list-view.c @@ -46,18 +46,7 @@ _mp_now_playing_list_view_normal_more_btn_cb(void *data, Evas_Object *obj, void view->more_btn_ctxpopup = mp_common_create_more_ctxpopup(view); MP_CHECK(view->more_btn_ctxpopup); - /* - mp_util_ctxpopup_item_append(view->more_btn_ctxpopup, - GET_SYS_STR("IDS_COM_SK_REFRESH"), NULL, NULL, view); - mp_util_ctxpopup_item_append(view->more_btn_ctxpopup, - GET_SYS_STR("IDS_COM_BODY_SETTINGS"), NULL, NULL, view); - */ - -#ifdef MP_FEATURE_SHARE - /* share via */ - mp_util_ctxpopup_item_append(view->more_btn_ctxpopup, - STR_MP_SHARE, MP_PLAYER_MORE_BTN_SHARE, mp_common_share_cb, view); -#endif + mp_util_ctxpopup_item_append(view->more_btn_ctxpopup, STR_MP_EDIT, MP_PLAYER_MORE_BTN_EDIT, _mp_now_playing_view_open_playlist_btn_edit_cb, view); diff --git a/src/view/mp-player-view.c b/src/view/mp-player-view.c index b880493..6552136 100755 --- a/src/view/mp-player-view.c +++ b/src/view/mp-player-view.c @@ -569,52 +569,12 @@ void mp_player_view_set_snd_path_sensitivity(void *data) mp_snd_path snd_path; mp_util_get_sound_path(&snd_path); DEBUG_TRACE("snd_path=%d", snd_path); - /* - const char *icon = NULL; - if (snd_path == MP_SND_PATH_BT) - icon = MP_ICON_BT_HEADSET_PATH; - else if (snd_path == MP_SND_PATH_EARPHONE) - icon = MP_ICON_HEADSET_PATH; - else if (snd_path == MP_SND_PATH_HDMI) - icon = MP_ICON_HDMI; - else if (snd_path == MP_SND_PATH_MIRRORING) - icon = MP_ICON_MIRRORING; - else if (snd_path == MP_SND_PATH_USB_AUDIO) - icon = MP_ICON_USB_AUDIOE; - else - icon = MP_ICON_SPEAKER_PATH; - */ MP_CHECK(view->snd_button); evas_object_show(view->snd_button); elm_object_item_part_content_set(view->inner_navi_it, "title_right_btn", view->snd_button); _mp_player_view_update_snd_button_state(view); - - /*if (ad->snd_path_changable && !view->dmr_button) { // if DMR btn exist show snd btn at more - view->snd_button = mp_widget_create_title_icon_btn_second(view->layout, IMAGE_EDJ_NAME, MP_ICON_HEADSET_PATH, - _mp_player_view_set_snd_path_cb, view); - mp_screen_reader_set_obj_info(view->snd_button, "Audio device"); - elm_object_item_part_content_set(view->navi_it, "title_left_btn", view->snd_button); - }*/ } /*Replaced for _prod dependency end*/ -#ifdef MP_FEATURE_SHARE -static void _ctxpopup_share_cb(void *data, Evas_Object *obj, void *event_info) -{ - startfunc; - MpPlayerView_t *view = (MpPlayerView_t *)data; - MP_CHECK(view); - CHECK_VIEW(view); - mp_evas_object_del(view->more_btn_ctxpopup); - - struct appdata *ad = mp_util_get_appdata(); - MP_CHECK(ad); - - mp_plst_item *item = mp_playlist_mgr_get_current(ad->playlist_mgr); - MP_CHECK(item); - - mp_genlist_popup_create(view->layout, MP_POPUP_PV_SHARE, item->uri, ad); -} -#endif #ifndef MP_SOUND_PLAYER static char * diff --git a/src/view/mp-playlist-detail-view.c b/src/view/mp-playlist-detail-view.c index 35bf18e..1308095 100755 --- a/src/view/mp-playlist-detail-view.c +++ b/src/view/mp-playlist-detail-view.c @@ -85,145 +85,6 @@ _mp_playlist_detail_rename_cb(void *data, Evas_Object *obj, void *event_info) mp_edit_playlist_content_create(mp_playlist_data); } - -#ifdef MP_FEATURE_ADD_TO_HOME -static char *_mp_media_info_get_live_auto_playlist_icon_by_name(const char *name) -{ - MP_CHECK_VAL(name, NULL); - - char icon_path[1024] = {0}; - char *shared_path = app_get_shared_resource_path(); - - if (!g_strcmp0(name, STR_MP_FAVOURITES)) { - snprintf(icon_path, 1024, "%s%s/%s", shared_path, "shared_images", LIVE_ICON_QUICK_LIST); - } else if (!g_strcmp0(name, STR_MP_RECENTLY_PLAYED)) { - snprintf(icon_path, 1024, "%s%s/%s", shared_path, "shared_images", LIVE_ICON_RECENTLY_PLAYED); - } else if (!g_strcmp0(name, STR_MP_RECENTLY_ADDED)) { - snprintf(icon_path, 1024, "%s%s/%s", shared_path, "shared_images", LIVE_ICON_RECENTLY_ADDED); - } else if (!g_strcmp0(name, STR_MP_MOST_PLAYED)) { - snprintf(icon_path, 1024, "%s%s/%s", shared_path, "shared_images", LIVE_ICON_MOST_PLAYED); - } - - free(shared_path); - - return icon_path; -} - -static char *_mp_media_info_get_live_auto_playlist_thumbnail_by_name(const char *name) -{ - MP_CHECK_VAL(name, NULL); - - char thumb_path[1024] = {0}; - char *shared_path = app_get_shared_resource_path(); - - if (!g_strcmp0(name, STR_MP_FAVOURITES)) { - snprintf(thumb_path, 1024, "%s%s/%s", shared_path, "shared_images", LIVE_THUMBNAIL_QUICK_LIST); - } else if (!g_strcmp0(name, STR_MP_RECENTLY_PLAYED)) { - snprintf(thumb_path, 1024, "%s%s/%s", shared_path, "shared_images", LIVE_THUMBNAIL_RECENTLY_PLAYED); - } else if (!g_strcmp0(name, STR_MP_RECENTLY_ADDED)) { - snprintf(thumb_path, 1024, "%s%s/%s", shared_path, "shared_images", LIVE_THUMBNAIL_RECENTLY_ADDED); - } else if (!g_strcmp0(name, STR_MP_MOST_PLAYED)) { - snprintf(thumb_path, 1024, "%s%s/%s", shared_path, "shared_images", LIVE_THUMBNAIL_MOST_PLAYED); - } - free(shared_path); - - return thumb_path; -} - -static void -_mp_playlist_detail_add_to_home_cb(void *data, Evas_Object *obj, void *event_info) -{ - eventfunc; - - MpPlaylistDetailView_t *view = (MpPlaylistDetailView_t *)data; - MP_CHECK(view); - - mp_evas_object_del(view->more_btn_ctxpopup); - - int type = 0; - void *name = NULL; - const char *extra1 = NULL; - const char *extra2 = NULL; - - if (view->p_id < 0) { - type = MP_ADD_TO_HOME_SHORTCUT_TYPE_SYS_PLAYLIST; - name = (void *)view->name; - extra1 = _mp_media_info_get_live_auto_playlist_thumbnail_by_name(view->name); - extra2 = _mp_media_info_get_live_auto_playlist_icon_by_name(view->name); - } else { - type = MP_ADD_TO_HOME_SHORTCUT_TYPE_USER_PLAYLIST; - name = (void *)view->p_id; - } - mp_menu_add_to_home(type, name, (void *)extra1, (void *)extra2); -} -#endif - -#ifdef MP_FEATURE_EDIT_PLAYLIST_IMAGE -static void -_mp_playlist_list_take_picture_button_cb(void *data, Evas_Object * obj, void *event_info) -{ - eventfunc; - MpPlaylistDetailView_t *view = (MpPlaylistDetailView_t *)data; - MP_CHECK(view); - - struct appdata *ad = mp_util_get_appdata(); - MP_CHECK(ad); - - mp_popup_destroy(ad); - - int ret = mp_ug_camera_take_picture(mp_list_get_playlist_handle(view->content_to_show)); - if (ret != 0) { - ERROR_TRACE("taken picture failed"); - } -} - -static void -_mp_playlist_list_change_image_button_cb(void *data, Evas_Object * obj, void *event_info) -{ - eventfunc; - MpPlaylistDetailView_t *view = (MpPlaylistDetailView_t *)data; - MP_CHECK(view); - - struct appdata *ad = mp_util_get_appdata(); - MP_CHECK(ad); - - mp_popup_destroy(ad); - - int ret = mp_ug_gallery_get_picture(mp_list_get_playlist_handle(view->content_to_show)); - if (ret != 0) { - ERROR_TRACE("taken picture failed"); - } - -} - -static void -_mp_playlist_detail_edit_image_cb(void *data, Evas_Object *obj, void *event_info) -{ - eventfunc; - MpPlaylistDetailView_t *view = (MpPlaylistDetailView_t *)data; - MP_CHECK(view); - Evas_Object *popup = NULL; - - mp_evas_object_del(view->more_btn_ctxpopup); - - struct appdata *ad = mp_util_get_appdata(); - popup = mp_genlist_popup_create(obj, MP_POPUP_EDIT_IMAGE, ad, ad); - MP_CHECK(popup); - - Evas_Object *genlist = evas_object_data_get(popup, "genlist"); - MP_CHECK(genlist); - - mp_genlist_popup_item_append(popup, GET_STR(STR_MP_TAKE_PICTURE), NULL, NULL, NULL, - _mp_playlist_list_take_picture_button_cb, data); - mp_genlist_popup_item_append(popup, GET_STR(STR_MP_CHANGE_IMAGE), NULL, NULL, NULL, - _mp_playlist_list_change_image_button_cb, data); - - evas_object_show(popup); - - return; -} -#endif - static void _mp_playlist_detail_view_normal_more_btn_cb(void *data, Evas_Object *obj, void *event_info) { eventfunc; @@ -236,14 +97,6 @@ static void _mp_playlist_detail_view_normal_more_btn_cb(void *data, Evas_Object view->more_btn_ctxpopup = mp_common_create_more_ctxpopup(view); MP_CHECK(view->more_btn_ctxpopup); -#ifdef MP_FEATURE_SHARE - if (mp_list_get_editable_count(view->content_to_show, MP_LIST_EDIT_TYPE_SHARE)) { - /*share*/ - mp_util_ctxpopup_item_append(view->more_btn_ctxpopup, - STR_MP_SHARE, MP_PLAYER_MORE_BTN_SHARE, mp_common_share_cb, view); - } -#endif - int count = 0; mp_media_info_list_count(MP_TRACK_ALL, NULL, NULL, NULL, 0, &count); if (count > 0) { @@ -270,14 +123,6 @@ static void _mp_playlist_detail_view_normal_more_btn_cb(void *data, Evas_Object view); } -#ifdef MP_FEATURE_EDIT_PLAYLIST_IMAGE - /*edit image*/ - if (view->p_id >= 0) { - mp_util_ctxpopup_item_append(view->more_btn_ctxpopup, - STR_MP_EDIT_IMAGE, MP_PLAYER_MORE_BTN_EDIT_IMAGE, _mp_playlist_detail_edit_image_cb, view); - } -#endif - if (mp_list_get_editable_count(view->content_to_show, MP_LIST_EDIT_TYPE_NORMAL)) { /*remove*/ mp_util_ctxpopup_item_append(view->more_btn_ctxpopup, diff --git a/src/widget/mp-album-list.c b/src/widget/mp-album-list.c index b427d6c..aeb8d98 100755 --- a/src/widget/mp-album-list.c +++ b/src/widget/mp-album-list.c @@ -139,32 +139,6 @@ _mp_album_list_icon_get(void *data, Evas_Object * obj, const char *part) MpAlbumList_t *list = evas_object_data_get(obj, "list_handle"); MP_CHECK_NULL(list); - /* - Evas_Object *button = NULL; - if (!strcmp(part, "elm.slide.swallow.1")) - { - button = elm_button_add(obj); - elm_object_style_set(button, "sweep"); - //elm_object_text_set(button, GET_STR(STR_MP_ADD_TO)); - //mp_language_mgr_register_object(button, OBJ_TYPE_ELM_OBJECT, NULL, STR_MP_ADD_TO); - mp_util_domain_translatable_text_set(button, STR_MP_ADD_TO); - evas_object_smart_callback_add(button, "clicked", _mp_album_list_add_to_playlist_cb, list); - return button; - } - #ifdef MP_FEATURE_ADD_TO_HOME - else if (!strcmp(part, "elm.slide.swallow.2")) - { - button = elm_button_add(obj); - elm_object_style_set(button, "sweep"); - //elm_object_text_set(button, GET_STR("IDS_MUSIC_SK2_ADD_TO_HOME")); - //mp_language_mgr_register_object(button, OBJ_TYPE_ELM_OBJECT, NULL, "IDS_MUSIC_SK2_ADD_TO_HOME"); - mp_util_domain_translatable_text_set(button, "IDS_MUSIC_SK2_ADD_TO_HOME"); - evas_object_smart_callback_add(button, "clicked", _mp_album_list_add_to_home_cb, item->handle); - //evas_object_data_set(button, "layout_data", layout_data); - return button; - } - #endif - */ Evas_Object *check = NULL; DEBUG_TRACE("list->edit_mode = %d", list->edit_mode); @@ -529,9 +503,6 @@ _mp_album_list_genlist_create(MpAlbumList_t *list) evas_object_data_set(list->genlist, "list_data", list); -#ifdef MP_FEATURE_ADD_TO_HOME - const char *group_slide_style = "mode/slide2"; -#endif if (!list->itc) { list->itc = elm_genlist_item_class_new(); MP_CHECK(list->itc); diff --git a/src/widget/mp-all-list.c b/src/widget/mp-all-list.c index e868036..00b7983 100755 --- a/src/widget/mp-all-list.c +++ b/src/widget/mp-all-list.c @@ -1741,71 +1741,6 @@ END: endfunc; } -#ifdef MP_FEATURE_ADD_TO_HOME -static void mp_all_add_to_home_cb(void *data, Evas_Object * obj, void *event_info) -{ - eventfunc; - - struct appdata *ad = mp_util_get_appdata(); - MP_CHECK(ad); - - MpAllList_t *list = data; - MP_CHECK(list); - - GList *sel_list = NULL; - char *name = NULL; - char *thumbnail = NULL; - int ret = 0; - int p_id = -1; - mp_list_item_data_t *item_data = NULL; - - mp_popup_destroy(ad); - - mp_list_selected_item_data_get((MpList_t *)list, &sel_list); - - if (g_list_length(sel_list) == 0) { - mp_widget_text_popup(ad, GET_STR("IDS_MUSIC_POP_NOTHING_SELECTED")); - return; - } - - GList *node = g_list_first(sel_list); - while (node) { - item_data = node->data; - node = g_list_next(node); - } - - ret = mp_media_info_group_get_main_info(item_data->handle, &name); - mp_retm_if(ret != 0, "Fail to get value"); - mp_retm_if(name == NULL, "Fail to get value"); - mp_media_info_group_get_thumbnail_path(item_data->handle, &thumbnail); - - int type = 0; - const char *extra1 = NULL; - const char *extra2 = NULL; - if (list->tab_status == MP_TAB_PLAYLISTS) { - ret = mp_media_info_group_get_playlist_id(item_data->handle, &p_id); - mp_retm_if(ret != 0, "Fail to get value"); - DEBUG_TRACE("p_id: %d", p_id); - if (p_id < 0) { - type = MP_ADD_TO_HOME_SHORTCUT_TYPE_SYS_PLAYLIST; - extra1 = _mp_media_info_get_live_auto_playlist_thumbnail_by_name(name); - extra2 = _mp_media_info_get_live_auto_playlist_icon_by_name(name); - } else { - type = MP_ADD_TO_HOME_SHORTCUT_TYPE_USER_PLAYLIST; - name = (void *)p_id; - } - mp_menu_add_to_home(type, name, (void *)extra1, (void *)extra2); - } else if (list->tab_status == MP_TAB_ALBUMS) { - mp_menu_add_to_home(MP_ADD_TO_HOME_SHORTCUT_TYPE_ALBUM, name, thumbnail, NULL); - } - - if (sel_list) { - g_list_free(sel_list); - sel_list = NULL; - } -} -#endif - static void _mp_all_list_item_longpressed_cb(void *data, Evas_Object *obj, void *event_info) { diff --git a/src/widget/mp-artist-detail-list.c b/src/widget/mp-artist-detail-list.c index 725a261..09c43d7 100755 --- a/src/widget/mp-artist-detail-list.c +++ b/src/widget/mp-artist-detail-list.c @@ -822,10 +822,6 @@ void _mp_artist_detail_list_update(void *thiz) elm_box_pack_end(list->box, list->genlist); evas_object_data_set(list->genlist, "list_data", list); -#ifdef MP_FEATURE_ADD_TO_HOME - const char *group_slide_style = "mode/slide4"; - //group_slide_style = "mode/slide4"; -#endif list->itc_album = elm_genlist_item_class_new(); if (list->itc_album) { list->itc_album->item_style = "default"; diff --git a/src/widget/mp-folder-list.c b/src/widget/mp-folder-list.c index 88ec915..29c690f 100755 --- a/src/widget/mp-folder-list.c +++ b/src/widget/mp-folder-list.c @@ -644,10 +644,6 @@ void _mp_folder_list_update(void *thiz) evas_object_data_set(list->genlist, "list_data", list); -#ifdef MP_FEATURE_ADD_TO_HOME - const char *group_slide_style = "mode/slide"; - group_slide_style = "mode/slide2"; -#endif if (!list->itc) { list->itc = elm_genlist_item_class_new(); if (list->itc) { diff --git a/src/widget/mp-genre-list.c b/src/widget/mp-genre-list.c index 9cca20f..8a5c539 100755 --- a/src/widget/mp-genre-list.c +++ b/src/widget/mp-genre-list.c @@ -424,9 +424,6 @@ _mp_genre_list_genlist_create(MpGenreList_t *list) evas_object_smart_callback_add(list->genlist, "longpressed", _mp_genre_list_item_longpressed_cb, list); const char *group_slide_style = "mode/slide"; -#ifdef MP_FEATURE_ADD_TO_HOME - group_slide_style = "mode/slide2"; -#endif if (!list->itc) { list->itc = elm_genlist_item_class_new(); MP_CHECK(list->itc); @@ -438,16 +435,6 @@ _mp_genre_list_genlist_create(MpGenreList_t *list) list->itc->func.del = _mp_genre_list_item_del_cb; } - /* - evas_object_smart_callback_add(list->genlist, "drag,start,left", list->flick_left_cb, NULL); - evas_object_smart_callback_add(list->genlist, "drag,start,right", list->flick_right_cb, NULL); - evas_object_smart_callback_add(list->genlist, "drag,stop", list->flick_stop_cb, NULL); - - evas_object_smart_callback_add(list->genlist, "drag,start,right", list->mode_right_cb, NULL); - evas_object_smart_callback_add(list->genlist, "drag,start,left", list->mode_left_cb, NULL); - evas_object_smart_callback_add(list->genlist, "drag,start,up", list->mode_cancel_cb, NULL); - evas_object_smart_callback_add(list->genlist, "drag,start,down", list->mode_cancel_cb, NULL); - */ endfunc; }