#include "ms-key-ctrl.h"
static void _mp_all_view_playlist_list_create_playlist_cb(void *data,
- Evas_Object *
- obj,
- void
- *event_info);
+ Evas_Object *
+ obj,
+ void
+ *event_info);
static void _mp_all_view_edit_cb(void *data, Evas_Object * obj,
void *event_info);
static void _mp_all_view_content_load(void *thiz, MpTab_e tab);
mp_list_update(view->content_to_show);
if (_mp_all_view_tab_index_get(view) == MP_TAB_SONGS
- && mp_list_get_editable_count(view->content_to_show,
- mp_list_get_edit_type(view->
- content_to_show))) {
+ && mp_list_get_editable_count(view->content_to_show,
+ mp_list_get_edit_type(view->
+ content_to_show))) {
mp_list_show_fast_scroll(view->content_to_show);
}
if (_mp_all_view_tab_index_get(view) == MP_TAB_SONGS
- && mp_list_get_editable_count(view->content_to_show,
- mp_list_get_edit_type(view->
- content_to_show))
- == 0) {
+ && mp_list_get_editable_count(view->content_to_show,
+ mp_list_get_edit_type(view->
+ content_to_show))
+ == 0) {
mp_list_hide_fast_scroll(view->content_to_show);
}
return 0;
}
static void _mp_all_view_add_to_playlist_cb(void *data, Evas_Object * obj,
- void *event_info)
+ void *event_info)
{
eventfunc;
MpAllView_t *view = (MpAllView_t *) data;
}
static void _mp_all_view_normal_more_btn_cb(void *data, Evas_Object * obj,
- void *event_info)
+ void *event_info)
{
eventfunc;
MpAllView_t *view = (MpAllView_t *) data;
if (index == MP_TAB_PLAYLISTS) {
if (playlistcount < 100) {
mp_util_ctxpopup_item_append(view->more_btn_ctxpopup,
- STR_MP_CREATE_PLAYLIST,
- MP_PLAYER_MORE_BTN_CREATE_PLAYLIST_IMAGE,
- _mp_all_view_playlist_list_create_playlist_cb,
- view);
+ STR_MP_CREATE_PLAYLIST,
+ MP_PLAYER_MORE_BTN_CREATE_PLAYLIST_IMAGE,
+ _mp_all_view_playlist_list_create_playlist_cb,
+ view);
mp_util_more_btn_move_ctxpopup(view->more_btn_ctxpopup, obj);
evas_object_show(view->more_btn_ctxpopup);
}
/*edit button */
if (mp_list_get_editable_count
- (view->content_to_show, MP_LIST_EDIT_TYPE_NORMAL)) {
+ (view->content_to_show, MP_LIST_EDIT_TYPE_NORMAL)) {
if (index != MP_TAB_PLAYLISTS) {
mp_util_ctxpopup_item_append(view->more_btn_ctxpopup,
- STR_MP_ADD_TO_PLAYLIST,
- MP_PLAYER_MORE_BTN_ADD_TO_PLAYLSIT_IMAGE,
- _mp_all_view_add_to_playlist_cb,
- view);
+ STR_MP_ADD_TO_PLAYLIST,
+ MP_PLAYER_MORE_BTN_ADD_TO_PLAYLSIT_IMAGE,
+ _mp_all_view_add_to_playlist_cb,
+ view);
}
mp_util_ctxpopup_item_append(view->more_btn_ctxpopup,
- STR_MP_DELETE,
- MP_PLAYER_MORE_BTN_DELETE_IMAGE,
- _mp_all_view_edit_cb, view);
+ STR_MP_DELETE,
+ MP_PLAYER_MORE_BTN_DELETE_IMAGE,
+ _mp_all_view_edit_cb, view);
/*search */
if (count > 0) {
mp_util_ctxpopup_item_append(view->more_btn_ctxpopup,
- STR_MP_SEARCH, NULL,
- mp_common_create_search_view_cb,
- view);
+ STR_MP_SEARCH, NULL,
+ mp_common_create_search_view_cb,
+ view);
}
#ifdef MP_FEATURE_PERSONAL_PAGE
if (index == MP_TAB_SONGS) {
if (mp_util_is_personal_page_on()) {
all_in_personal_e status =
- mp_common_is_all_in_personal_page(((MpList_t *) view->
- content_to_show)->
- genlist);
+ mp_common_is_all_in_personal_page(((MpList_t *) view->
+ content_to_show)->
+ genlist);
/*add */
if (status != MP_COMMON_ALL_IN
- && status != MP_COMMON_ALL_ERROR)
+ && status != MP_COMMON_ALL_ERROR)
mp_util_ctxpopup_item_append(view->more_btn_ctxpopup,
- STR_MP_ADD_TO_PERSONAL_PAGE,
- MP_PLAYER_MORE_BTN_ADD_TO_PERSONAL_PAGE,
- mp_common_add_to_personal_page_cb,
- view);
+ STR_MP_ADD_TO_PERSONAL_PAGE,
+ MP_PLAYER_MORE_BTN_ADD_TO_PERSONAL_PAGE,
+ mp_common_add_to_personal_page_cb,
+ view);
/*remove */
if (status != MP_COMMON_ALL_OUT
- && status != MP_COMMON_ALL_ERROR)
+ && status != MP_COMMON_ALL_ERROR)
mp_util_ctxpopup_item_append(view->more_btn_ctxpopup,
- STR_MP_REMOVE_FROM_PERSONAL_PAGE,
- MP_PLAYER_MORE_BTN_REMOVE_FROM_PERSONAL_PAGE,
- mp_common_remove_from_personal_page_cb,
- view);
+ STR_MP_REMOVE_FROM_PERSONAL_PAGE,
+ MP_PLAYER_MORE_BTN_REMOVE_FROM_PERSONAL_PAGE,
+ mp_common_remove_from_personal_page_cb,
+ view);
}
}
#endif
#ifndef MP_FEATURE_NO_END
/*End */
mp_util_ctxpopup_item_append(view->more_btn_ctxpopup,
- STR_MP_END,
- MP_PLAYER_MORE_BTN_VIEW_END,
- mp_common_ctxpopup_end_cb, view);
+ STR_MP_END,
+ MP_PLAYER_MORE_BTN_VIEW_END,
+ mp_common_ctxpopup_end_cb, view);
#endif
mp_util_more_btn_move_ctxpopup(view->more_btn_ctxpopup, obj);
evas_object_show(view->more_btn_ctxpopup);
Evas_Object *btn = NULL;
btn =
- mp_widget_create_toolbar_btn(view->all_view_layout,
- MP_TOOLBAR_BTN_MORE, NULL,
- _mp_all_view_normal_more_btn_cb,
- view);
+ mp_widget_create_toolbar_btn(view->all_view_layout,
+ MP_TOOLBAR_BTN_MORE, NULL,
+ _mp_all_view_normal_more_btn_cb,
+ view);
elm_object_item_part_content_set(view->navi_it, "toolbar_more_btn",
- btn);
+ btn);
elm_naviframe_item_pop_cb_set(view->navi_it, _mp_all_view_pop_cb,
- view);
+ view);
endfunc;
return;
/*************** functions for playlist list update *******************/
static void _mp_all_view_playlist_list_create_playlist_cb(void *data,
- Evas_Object *
- obj,
- void *event_info)
+ Evas_Object *
+ obj,
+ void *event_info)
{
eventfunc;
MpAllView_t *view = (MpAllView_t *) data;
mp_evas_object_del(view->more_btn_ctxpopup);
Mp_Playlist_Data *mp_playlist_data =
- mp_edit_playlist_create(MP_PLST_CREATE_TO_ADD_TRACK);
+ mp_edit_playlist_create(MP_PLST_CREATE_TO_ADD_TRACK);
mp_edit_playlist_content_create(mp_playlist_data);
}
mp_view_set_title_visible((MpView_t *) view, true);
- /*PROFILE_IN("elm_naviframe_item_title_enabled_set");
- elm_naviframe_item_title_enabled_set(view->navi_it, EINA_TRUE, EINA_FALSE);
- PROFILE_OUT("elm_naviframe_item_title_enabled_set"); */
-
PROFILE_IN("_mp_all_view_update_toolbar_option");
_mp_all_view_update_toolbar_option(thiz);
PROFILE_OUT("_mp_all_view_update_toolbar_option");
- /*edje_object_signal_emit(_EDJ(view->all_view_layout), "show,tabbar", "*"); */
return 0;
}
list = (void *) mp_playlist_list_create(view->all_view_layout);
if (view->tab_status < MP_TAB_MAX) {
mp_playlist_list_set_data((MpPlaylistList_t *) list,
- MP_PLAYLIST_LIST_DISPLAY_MODE,
- view->display_mode[view->tab_status],
- -1);
+ MP_PLAYLIST_LIST_DISPLAY_MODE,
+ view->display_mode[view->tab_status],
+ -1);
}
mp_list_update(list);
break;
case MP_TAB_ARTISTS:
list = (void *) mp_artist_list_create(view->all_view_layout);
mp_artist_list_set_data((MpArtistList_t *) list,
- MP_ARTIST_LIST_DISPLAY_MODE,
- view->display_mode[view->tab_status], -1);
+ MP_ARTIST_LIST_DISPLAY_MODE,
+ view->display_mode[view->tab_status], -1);
mp_list_update(list);
if (view->display_mode[view->tab_status] ==
- MP_LIST_DISPLAY_MODE_NORMAL) {
+ MP_LIST_DISPLAY_MODE_NORMAL) {
mp_list_show_fast_scroll(list);
}
break;
content = mp_list_get_layout(list);
if (content != NULL) {
elm_object_part_content_set(view->all_view_layout, "list-content",
- content);
+ content);
}
/*reset the flag */
}
static Evas_Object *_all_view_create_tabbar(Evas_Object * parent,
- MpAllView_t * view)
+ MpAllView_t * view)
{
MP_CHECK_NULL(parent);
MP_CHECK_NULL(view);
PROFILE_OUT("_all_view_create_tabbar");
elm_object_part_content_set(view->all_view_layout, "tabbar", tabbar);
- /*elm_naviframe_item_style_set(view->navi_it, "tabbar/notitle");
- elm_object_item_part_content_set(view->navi_it, "tabbar", tabbar); */
view->all_view_tabbar = tabbar;
endfunc;
}
Mp_Playlist_Data *mp_playlist_data =
(Mp_Playlist_Data *) ad->popup_data;
mp_evas_object_del(mp_playlist_data->popup);
- free(ad->popup_data);
- ad->popup_data = NULL;
+ IF_FREE(ad->popup_data);
}
break;
case MP_PLAYLIST_CREATED:
_mp_all_view_playlist_update(view);
break;
case MP_SIP_STATE_CHANGED:
- /*
- if (view->navi_it) {
- const char *signal = mp_util_get_sip_state() ? "elm,state,toolbar,instant_close" : "elm,state,toolbar,instant_open";
- elm_object_item_signal_emit(view->navi_it, signal, "");
-
- bool title_visible = (mp_util_get_sip_state() && mp_util_is_landscape()) ? false : true;
- mp_view_set_title_visible(thiz, title_visible);
- }
- */
break;
#ifndef MP_SOUND_PLAYER
case MP_UPDATE_PLAYING_LIST:
case MP_PAUSE_PLAYBACK:
case MP_PLAYING_TRACK_CHANGED:
case MP_STOP_PLAYBACK:{
- if (index == MP_TAB_SONGS) {
- mp_list_realized_item_part_update(list, "elm.icon.left",
- ELM_GENLIST_ITEM_FIELD_CONTENT);
- }
+ if (index == MP_TAB_SONGS) {
+ mp_list_realized_item_part_update(list, "elm.icon.left",
+ ELM_GENLIST_ITEM_FIELD_CONTENT);
+ }
break;
}
default:
view->on_event = _mp_all_view_on_event;
view->all_view_layout =
- mp_common_load_edj(view->layout, MP_EDJ_NAME,
- "common_view_layout");
+ mp_common_load_edj(view->layout, MP_EDJ_NAME,
+ "common_view_layout");
MP_CHECK_VAL(view->all_view_layout, -1);
elm_object_part_content_set(view->layout, "list_content",
- view->all_view_layout);
+ view->all_view_layout);
return ret;
}
MP_CHECK_VAL(view, -1);
elm_toolbar_item_selected_set(mp_util_toolbar_nth_item
- (view->all_view_tabbar, tab), EINA_TRUE);
+ (view->all_view_tabbar, tab), EINA_TRUE);
mp_view_update_options((MpView_t *) view);
return 0;
}