}
void mp_common_play_track_list_with_playlist_id(mp_list_item_data_t * item,
- Evas_Object * genlist,
- int playlist_id)
+ Evas_Object * genlist,
+ int playlist_id)
{
startfunc;
MP_CHECK(item);
void
_mp_edit_delete_track_popup_response_cb(void *data, Evas_Object * obj,
- void *event_info)
+ void *event_info)
{
startfunc;
DEBUG_TRACE("");
title_txt =
g_strconcat("<align=center>", GET_STR(title), "</align>", NULL);
Evas_Object *popup =
- mp_popup_create(ad->win_main, MP_POPUP_NORMAL, title_txt, data,
- _mp_edit_delete_track_popup_response_cb, ad);
+ mp_popup_create(ad->win_main, MP_POPUP_NORMAL, title_txt, data,
+ _mp_edit_delete_track_popup_response_cb, ad);
ad->popup_delete = popup;
//making help_txt
char *markup = NULL;
mp_view_mgr_post_event(GET_VIEW_MGR, MP_DELETE_DONE);
ad->edit_in_progress = false;
+ if (_mp_is_current_focus_available(ad) != 0) {
+ ad->paused_by_user = TRUE;
+ }
mp_play_new_file(ad, true);
_mp_edit_cb_check_playlist();
MP_CHECK_FALSE(ad->player_state == PLAY_STATE_READY);
mp_plst_item *current_item =
- mp_playlist_mgr_get_current(ad->playlist_mgr);
+ mp_playlist_mgr_get_current(ad->playlist_mgr);
MP_CHECK_FALSE(current_item);
if (!ad->paused_by_user) {
struct appdata *ad = data;
mp_retvm_if(ad == NULL, -1, "appdata is NULL");
PROFILE_IN("mp_playlist_mgr_get_current");
- mp_plst_item *current_item =
- mp_playlist_mgr_get_current(ad->playlist_mgr);
+ mp_plst_item *current_item = mp_playlist_mgr_get_current(ad->playlist_mgr);
PROFILE_OUT("mp_playlist_mgr_get_current");
MP_CHECK_VAL(current_item, -1);
int res = 0;
char *title = NULL, *album = NULL, *artist = NULL, *genre = NULL;
mp_player_mgr_get_content_info(&title, &album, &artist, NULL,
- &genre, NULL);
+ &genre, NULL);
if (ad->current_track_info) {
if (ad->current_track_info->title == 0
- || strlen(ad->current_track_info->title) == 0) {
+ || strlen(ad->current_track_info->title) == 0) {
if (title == NULL || strlen(title) == 0) {
title = mp_util_get_title_from_path(item->uri);
DEBUG_TRACE("title from path: %s", title);
}
if (ad->current_track_info->artist == NULL
- || strlen(ad->current_track_info->artist) == 0) {
+ || strlen(ad->current_track_info->artist) == 0) {
IF_FREE(ad->current_track_info->artist);
ad->current_track_info->artist = artist;
} else {
if (ad->current_track_info) {
if (mp_setting_read_playing_status
- (ad->current_track_info->uri, "playing") != 1) {
+ (ad->current_track_info->uri, "playing") != 1) {
mp_setting_write_playing_status(ad->current_track_info->uri,
- "playing");
+ "playing");
}
}
mp_setting_set_player_state(MP_PLAY_STATE_PLAYING);
endfunc;
}
-/*static Eina_Bool
-_mp_play_start_lazy_idler(void *data)
-{
- eventfunc;
- struct appdata *ad = data;
- MP_CHECK_FALSE(ad);
-
- MpView_t *player_view = GET_PLAYER_VIEW;
- if (player_view)
- {
- bool is_transit = false;
- mp_view_is_now_push_transit(player_view, &is_transit);
- if (is_transit)
- {
- WARN_TRACE("now transition.. wait next idle");
- return ECORE_CALLBACK_RENEW;
- }
- }
-
- ad->create_on_play_lay_idler = NULL;
- _mp_play_start_lazy(ad);
-
- return ECORE_CALLBACK_DONE;
-}*/
-
-
void mp_play_start(void *data)
{
startfunc;
}
ad->music_length = mp_player_mgr_get_duration() / 1000.0;
- ad->player_state = PLAY_STATE_PLAYING;
+ if (ad->paused_by_user == FALSE) {
+ ad->player_state = PLAY_STATE_PLAYING;
+ } else {
+ ad->player_state = PLAY_STATE_PAUSED;
+ }
if (!ad->noti) {
DEBUG_TRACE("notification create");
int applist = NOTIFICATION_DISPLAY_APP_INDICATOR;
notification_type_e noti_type = NOTIFICATION_TYPE_NOTI;
notification_image_type_e img_type =
- NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR;
+ NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR;
int ret = NOTIFICATION_ERROR_NONE;
char *shared_path = app_get_shared_resource_path();
char icon_path[1024] = { 0 };
snprintf(icon_path, 1024,
- "%sshared_images/T02_control_circle_icon_play.png",
- shared_path);
+ "%sshared_images/T02_control_circle_icon_play.png",
+ shared_path);
free(shared_path);
#ifdef MP_SOUND_PLAYER
notification_delete_all_by_type("org.tizen.music-player",
- NOTIFICATION_TYPE_NOTI);
+ NOTIFICATION_TYPE_NOTI);
#else
notification_delete_all_by_type("org.tizen.sound-player",
- NOTIFICATION_TYPE_NOTI);
+ NOTIFICATION_TYPE_NOTI);
#endif
ad->noti = notification_create(noti_type);
#ifdef MP_SOUND_PLAYER
DEBUG_TRACE("Unable to set tag [%d]", ret);
}
ret =
- notification_set_property(ad->noti,
- NOTIFICATION_PROP_VOLATILE_DISPLAY);
+ notification_set_property(ad->noti,
+ NOTIFICATION_PROP_VOLATILE_DISPLAY);
if (ret != NOTIFICATION_ERROR_NONE) {
DEBUG_TRACE("Cannot set the notification property [%d]", ret);
}
ERROR_TRACE("unable to get data path");
}
snprintf(playing_status, 1024, "%s%s", data_path,
- "NowPlayingStatus");
+ "NowPlayingStatus");
free(data_path);
if (ad->monitor == NULL) {
ad->monitor =
- ecore_file_monitor_add(playing_status,
- mp_noti_read_ini_file, NULL);
+ ecore_file_monitor_add(playing_status,
+ mp_noti_read_ini_file, NULL);
}
}
if (ad->create_view_on_play) {
mp_view_mgr_push_view_with_effect(GET_VIEW_MGR,
- (MpView_t *) ad->
- preload_player_view, NULL,
- false);
+ (MpView_t *) ad->
+ preload_player_view, NULL,
+ false);
mp_view_update((MpView_t *) ad->preload_player_view);
ad->create_view_on_play = false;
ad->preload_player_view = NULL;
_mp_play_start_lazy(ad);
-
endfunc;
}
if (!mp_check_file_exist(uri)) {
ERROR_TRACE("There is no such file\n");
_mp_play_error_handler(ad,
- GET_SYS_STR("IDS_COM_POP_FILE_NOT_EXIST"));
+ GET_SYS_STR("IDS_COM_POP_FILE_NOT_EXIST"));
return -1;
}
/* lock wake up */
mp_util_sleep_lock_set(TRUE, FALSE);
PROFILE_IN("mp_player_mgr_create");
- {
- error = mp_player_mgr_create(ad, uri, player_type, extra_data);
- }
+ error = mp_player_mgr_create(ad, uri, player_type, extra_data);
PROFILE_OUT("mp_player_mgr_create");
if (ad->b_minicontroller_show) {
#endif
if (error) {
_mp_play_error_handler(ad,
- GET_STR
- ("IDS_MUSIC_POP_UNABLE_TO_PLAY_ERROR_OCCURRED"));
+ GET_STR
+ ("IDS_MUSIC_POP_UNABLE_TO_PLAY_ERROR_OCCURRED"));
return error;
}
mp_player_mgr_set_buffering_cb(_mp_play_control_buffering_cb, ad);
mp_player_mgr_set_prepare_cb(_mp_play_control_prepare_cb, ad);
mp_player_mgr_set_paused_cb(mp_play_pause, ad);
- mp_player_mgr_set_duration_changed_cb
- (_mp_play_control_duration_changed_cb, ad);
+ mp_player_mgr_set_duration_changed_cb(_mp_play_control_duration_changed_cb, ad);
ad->prepare_by_init = false;
PROFILE_IN("mp_player_mgr_realize");
PROFILE_OUT("mp_player_mgr_realize");
if (error) {
_mp_play_error_handler(ad,
- GET_STR
- ("IDS_MUSIC_POP_UNABLE_TO_PLAY_ERROR_OCCURRED"));
+ GET_STR
+ ("IDS_MUSIC_POP_UNABLE_TO_PLAY_ERROR_OCCURRED"));
return error;
}
if (ad->player_state == PLAY_STATE_PLAYING) {
elm_object_signal_emit(ad->minicontroller_layout, "set_pause",
- "c_source");
+ "c_source");
} else {
elm_object_signal_emit(ad->minicontroller_layout, "set_play",
- "c_source");
+ "c_source");
}
}
if (landscape) {
DEBUG_TRACE("angle: 90 or 270");
ad->minicontroller_layout =
- _load_edj(ad->win_minicon, MINICON_EDJ_NAME,
- "music-minicontroller-ld");
+ _load_edj(ad->win_minicon, MINICON_EDJ_NAME,
+ "music-minicontroller-ld");
} else {
DEBUG_TRACE("angle: 0");
ad->minicontroller_layout =
- _load_edj(ad->win_minicon, MINICON_EDJ_NAME,
- "music-minicontroller");
+ _load_edj(ad->win_minicon, MINICON_EDJ_NAME,
+ "music-minicontroller");
}
if (!ad->minicontroller_layout) {
/*add focused UI related */
ad->minicon_icon = elm_image_add(ad->minicontroller_layout);
evas_object_size_hint_align_set(ad->minicon_icon, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
evas_object_size_hint_weight_set(ad->minicon_icon, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
elm_image_fill_outside_set(ad->minicon_icon, true);
elm_object_part_content_set(ad->minicontroller_layout,
- "albumart_image", ad->minicon_icon);
+ "albumart_image", ad->minicon_icon);
elm_object_focus_custom_chain_append(ad->minicontroller_layout,
- ad->minicon_icon, NULL);
+ ad->minicon_icon, NULL);
elm_object_focus_allow_set(ad->minicon_icon, EINA_TRUE);
/*-------> REW button ------->*/
Evas_Object *rew_focus_btn = elm_button_add(ad->minicontroller_layout);
elm_object_style_set(rew_focus_btn, "focus");
elm_object_part_content_set(ad->minicontroller_layout, "rew_btn_focus",
- rew_focus_btn);
+ rew_focus_btn);
elm_object_focus_custom_chain_append(ad->minicontroller_layout,
- rew_focus_btn, NULL);
+ rew_focus_btn, NULL);
evas_object_smart_callback_add(rew_focus_btn, "clicked",
- _mp_minicontroller_ff_rew_btn_clicked_cb,
- CONTROLLER_REW_SOURCE);
+ _mp_minicontroller_ff_rew_btn_clicked_cb,
+ CONTROLLER_REW_SOURCE);
evas_object_smart_callback_add(rew_focus_btn, "pressed",
- _mp_minicontroller_ff_rew_btn_pressed_cb,
- CONTROLLER_REW_SOURCE);
+ _mp_minicontroller_ff_rew_btn_pressed_cb,
+ CONTROLLER_REW_SOURCE);
evas_object_smart_callback_add(rew_focus_btn, "unpressed",
- _mp_minicontroller_ff_rew_btn_unpressed_cb,
- CONTROLLER_REW_SOURCE);
+ _mp_minicontroller_ff_rew_btn_unpressed_cb,
+ CONTROLLER_REW_SOURCE);
evas_object_event_callback_add(rew_focus_btn, EVAS_CALLBACK_DEL,
- _mp_minicontroller_ff_rew_btn_del_cb,
- NULL);
+ _mp_minicontroller_ff_rew_btn_del_cb,
+ NULL);
/*-------> play/pause button ------->*/
Evas_Object *play_pause_focus_btn =
- elm_button_add(ad->minicontroller_layout);
+ elm_button_add(ad->minicontroller_layout);
elm_object_style_set(play_pause_focus_btn, "focus");
elm_object_part_content_set(ad->minicontroller_layout,
- "play_pause_focus", play_pause_focus_btn);
+ "play_pause_focus", play_pause_focus_btn);
elm_object_focus_custom_chain_append(ad->minicontroller_layout,
- play_pause_focus_btn, NULL);
+ play_pause_focus_btn, NULL);
evas_object_smart_callback_add(play_pause_focus_btn, "clicked",
- _mp_minicontroller_play_pause_btn_clicked_cb,
- NULL);
+ _mp_minicontroller_play_pause_btn_clicked_cb,
+ NULL);
/*------->FF button ------->*/
Evas_Object *ff_focus_btn = elm_button_add(ad->minicontroller_layout);
elm_object_style_set(ff_focus_btn, "focus");
elm_object_part_content_set(ad->minicontroller_layout, "ff_btn_focus",
- ff_focus_btn);
+ ff_focus_btn);
elm_object_focus_custom_chain_append(ad->minicontroller_layout,
- ff_focus_btn, NULL);
+ ff_focus_btn, NULL);
evas_object_smart_callback_add(ff_focus_btn, "clicked",
- _mp_minicontroller_ff_rew_btn_clicked_cb,
- CONTROLLER_FF_SOURCE);
+ _mp_minicontroller_ff_rew_btn_clicked_cb,
+ CONTROLLER_FF_SOURCE);
evas_object_smart_callback_add(ff_focus_btn, "pressed",
- _mp_minicontroller_ff_rew_btn_pressed_cb,
- CONTROLLER_FF_SOURCE);
+ _mp_minicontroller_ff_rew_btn_pressed_cb,
+ CONTROLLER_FF_SOURCE);
evas_object_smart_callback_add(ff_focus_btn, "unpressed",
- _mp_minicontroller_ff_rew_btn_unpressed_cb,
- CONTROLLER_FF_SOURCE);
+ _mp_minicontroller_ff_rew_btn_unpressed_cb,
+ CONTROLLER_FF_SOURCE);
evas_object_event_callback_add(ff_focus_btn, EVAS_CALLBACK_DEL,
- _mp_minicontroller_ff_rew_btn_del_cb,
- NULL);
+ _mp_minicontroller_ff_rew_btn_del_cb,
+ NULL);
/*-------> close button ------->*/
edje_object_signal_callback_add(_EDJ(ad->minicontroller_layout), "*",
"<align=left><font_size=%d><color=#%02x%02x%02x%02x>%s - </color></font_size><font_size=%d><color=#%02x%02x%02x%02x>%s</color></font_size></align>";
char *title = NULL;
if ((markup_title == NULL || strlen(markup_title) == 0)
- && (markup_artist == NULL || strlen(markup_artist) == 0)) {
+ && (markup_artist == NULL || strlen(markup_artist) == 0)) {
title = NULL;
} else {
title =
- g_strdup_printf(title_format, 24, r, g, b, a, markup_title, 24,
- r, g, b, a, markup_artist);
+ g_strdup_printf(title_format, 24, r, g, b, a, markup_title, 24,
+ r, g, b, a, markup_artist);
}
if (!label) {
label =
- mp_widget_slide_title_create(ad->minicontroller_layout,
- "slide_roll", title);
+ mp_widget_slide_title_create(ad->minicontroller_layout,
+ "slide_roll", title);
elm_object_part_content_set(ad->minicontroller_layout, "elm.text",
- label);
+ label);
} else {
elm_object_text_set(label, title);
}