#define SYS_DOMAIN_NAME "sys_string"
#define MC_EDJ_FILE "music-chooser.edj"
-#define _EDJ(o) elm_layout_edje_get(o)
+#define _EDJ(o) elm_layout_edje_get(o)
+
+#ifdef GET_STR
+#undef GET_STR
+#endif
+
+#ifdef GET_SYS_STR
+#undef GET_SYS_STR
+#endif
+
#define GET_STR(s) dgettext(DOMAIN_NAME, s)
#define dgettext_noop(s) (s)
-#define N_(s) dgettext_noop(s)
-#define GET_SYS_STR(str) dgettext(DOMAIN_NAME, str)
-
-#define IF_FREE(p) ({if(p){free(p);p=NULL;}})
+#define N_(s) dgettext_noop(s)
+#define GET_SYS_STR(str) dgettext(DOMAIN_NAME, str)
#define MC_SELECT_MODE_KEY "http://tizen.org/appcontrol/data/selection_mode"
#define MC_SELECT_MULTIPLE "multiple"
#define MC_FILE_PREFIX "file://"
bool detail_view = false;
-static external_mmc_id = -1;
+static int external_mmc_id = -1;
static Eina_Bool
_back_cb(void *data, Elm_Object_Item *it)
free(ld);
}
-static void _mc_group_list_gl_del(void *data, Evas_Object *obj)
-{
- list_item_data_t *it_data = data;
- IF_FREE(it_data);
-}
-
-
static void
_mc_itc_init(int type, group_list_data_t *ld)
{
MP_CHECK(ld);
ld->itc.func.content_get = mc_group_content_get;
- //ld->itc.func.del = _mc_group_list_gl_del;
switch (type) {
case MP_GROUP_BY_ALBUM:
ld->itc.item_style = "type1";
char *cur_uri = NULL;
Evas_Object *content = NULL;
Evas_Object *icon = NULL;
- Evas_Object *check = NULL;
Evas_Object *prev_part_content;
Evas_Object *part_content;
int mp_media_filter_set_order(mp_filter_h filter, bool descending, const char *order_keyword, mp_media_content_collation_e collation)
{
//startfunc;
- int res = media_filter_set_order(filter, descending, order_keyword, collation);
+ int res = media_filter_set_order(filter, descending, order_keyword, (media_content_collation_e)collation);
if (res != MEDIA_CONTENT_ERROR_NONE) {
ERROR_TRACE("Error code 0x%x", res);
}
int mp_media_filter_set_condition(mp_filter_h filter, const char *condition, mp_media_content_collation_e collation)
{
//startfunc;
- int res = media_filter_set_condition(filter, condition, collation);
+ int res = media_filter_set_condition(filter, condition, (media_content_collation_e)collation);
if (res != MEDIA_CONTENT_ERROR_NONE) {
ERROR_TRACE("Error code 0x%x", res);
}
return result;
}
-
-static bool
-_mp_ug_launch_as_appcontrol(const char *ug_name)
-{
- MP_CHECK_FALSE(ug_name);
-
- bool result = false;
-
- app_control_h service = NULL;
- int ret = app_control_create(&service);
- if (ret != APP_CONTROL_ERROR_NONE) {
- mp_error("app_control_create()... [0x%x]", ret);
- goto END;
- }
-
- ret = app_control_set_app_id(service, ug_name);
- if (ret != APP_CONTROL_ERROR_NONE) {
- mp_error("app_control_set_app_id()... [0x%x]", ret);
- goto END;
- }
-
- ret = app_control_send_launch_request(service, NULL, NULL);
- if (ret != APP_CONTROL_ERROR_NONE) {
- mp_error("app_control_send_launch_request()... [0x%x]", ret);
- goto END;
- }
- result = true;
-END:
- if (service) {
- app_control_destroy(service);
- service = NULL;
- }
- return result;
-}
#define ERROR_TRACE(fmt, arg...) dlog_print(DLOG_ERROR, LOG_TAG, "[%s : %05d %lu]" fmt "\n", __func__, __LINE__, gettid(), ##arg)
#define mp_debug_temp(fmt, arg...)
#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)
+
+#ifdef PARAM_CHECK
+#undef PARAM_CHECK
+#endif
+
#define PARAM_CHECK(fmt, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, "[%s : %05d %lu]" fmt "\n", __func__, __LINE__, gettid(), ##arg)
//#define PROFILE_IN(func) LOG(LOG_DEBUG, "LAUNCH","[music-player:Application:"func":IN]"); TA(1, func);
return MP_GROUP_BY_ALBUM;
}
-/*static void
-_mp_album_list_item_longpressed_cb(void *data, Evas_Object *obj, void *event_info)
-{
- startfunc;
-
- MpAlbumList_t *list = (MpAlbumList_t *)data;
- MP_CHECK(list);
-
- if (list->edit_mode)
- {
- return ;
- }
-
- struct appdata *ad = mp_util_get_appdata();
- MP_CHECK(ad);
-
- Elm_Object_Item *item = event_info;
- MP_CHECK(item);
-
- int pop_item_count = 5;
- char *title = NULL;
- Evas_Object *popup = NULL;
- mp_list_item_data_t *item_data = NULL;
-
- if (list->scroll_drag_status)
- return;
-
- Elm_Object_Item *temp = NULL;
- if (MP_LIST_OBJ_IS_GENGRID(list->genlist))
- {
- temp = elm_gengrid_first_item_get(list->genlist);
- while (temp) {
- item_data = elm_object_item_data_get(temp);
- item_data->checked = false;
- temp = elm_gengrid_item_next_get(temp);
- }
- }
- else
- {
- temp = elm_genlist_first_item_get(list->genlist);
- while (temp) {
- item_data = elm_object_item_data_get(temp);
- item_data->checked = false;
- temp = elm_genlist_item_next_get(temp);
- }
- }
-
- item_data = elm_object_item_data_get(item);
- MP_CHECK(item_data);
- item_data->checked = true;
-
- pop_item_count = 4;
- mp_media_info_group_get_main_info(item_data->handle, &title);
-
- popup = mp_genlist_popup_create(obj, MP_POPUP_LIST_LONGPRESSED, &pop_item_count, ad);
- MP_CHECK(popup);
-
- char *up_title = g_strdup(title);
-
- elm_object_part_text_set(popup, "title,text", up_title);
- IF_FREE(up_title);
-
- mp_genlist_popup_item_append(popup, STR_MP_PLAY_ALL, NULL, NULL, NULL,
- mp_common_playall_cb, list);
-
- mp_genlist_popup_item_append(popup, STR_MP_ADD_TO_PLAYLIST, NULL, NULL, NULL,
- mp_common_list_add_to_playlist_cb, list);
-
- mp_genlist_popup_item_append(popup, STR_MP_DELETE, NULL, NULL, NULL,
- mp_common_list_delete_cb, list);
-
- if (MP_LIST_OBJ_IS_GENGRID(list->genlist))
- {
- MP_GENGRID_ITEM_LONG_PRESSED(obj, popup, event_info);
- }
- else
- {
- MP_GENLIST_ITEM_LONG_PRESSED(obj, popup, event_info);
- }
-}*/
-
static void
_mp_album_list_genlist_create(MpAlbumList_t *list)
{
}
}
-/*static void
-_mp_artist_list_item_longpressed_cb(void *data, Evas_Object *obj, void *event_info)
-{
- startfunc;
-
- MpArtistList_t *list = (MpArtistList_t *)data;
- MP_CHECK(list);
-
- if (list->edit_mode) {
- return ;
- }
-
- struct appdata *ad = mp_util_get_appdata();
- MP_CHECK(ad);
-
- Elm_Object_Item *item = event_info;
- MP_CHECK(item);
-
- int pop_item_count = 5;
- char *title = NULL;
- Evas_Object *popup = NULL;
- mp_list_item_data_t *item_data = NULL;
-
- if (list->scroll_drag_status)
- return;
-
- Elm_Object_Item *temp = NULL;
- temp = elm_genlist_first_item_get(list->genlist);
- if (MP_LIST_OBJ_IS_GENGRID(list->genlist)) {
- temp = elm_gengrid_first_item_get(list->genlist);
- while (temp) {
- item_data = elm_object_item_data_get(temp);
- item_data->checked = false;
- temp = elm_gengrid_item_next_get(temp);
- }
- } else {
- temp = elm_genlist_first_item_get(list->genlist);
- while (temp) {
- item_data = elm_object_item_data_get(temp);
- item_data->checked = false;
- temp = elm_genlist_item_next_get(temp);
- }
- }
-
- item_data = elm_object_item_data_get(item);
- MP_CHECK(item_data);
- item_data->checked = true;
-
- pop_item_count = 3;
- mp_media_info_group_get_main_info(item_data->handle, &title);
-
- popup = mp_genlist_popup_create(obj, MP_POPUP_LIST_LONGPRESSED, &pop_item_count, ad);
- MP_CHECK(popup);
-
- char *up_title = g_strdup(title);
-
- elm_object_part_text_set(popup, "title,text", up_title);
- IF_FREE(up_title);
-
- mp_genlist_popup_item_append(popup, STR_MP_PLAY_ALL, NULL, NULL, NULL,
- mp_common_playall_cb, list);
- mp_genlist_popup_item_append(popup, STR_MP_ADD_TO_PLAYLIST, NULL, NULL, NULL,
- mp_common_list_add_to_playlist_cb, list);
-
- mp_genlist_popup_item_append(popup, STR_MP_DELETE, NULL, NULL, NULL,
- mp_common_list_delete_cb, list);
-
- if (MP_LIST_OBJ_IS_GENGRID(list->genlist)) {
- MP_GENGRID_ITEM_LONG_PRESSED(obj, popup, event_info);
- } else {
- MP_GENLIST_ITEM_LONG_PRESSED(obj, popup, event_info);
- }
-
-}*/
-
static void
_mp_artist_list_genlist_create(MpArtistList_t *list)
{
list->gengrid_itc->func.del = _mp_genre_list_item_del_cb;
}
_mp_genre_list_set_grid_style(list);
- /*evas_object_smart_callback_add(list->genlist, "longpressed", _mp_genre_list_item_longpressed_cb, list);*/
elm_gengrid_align_set(list->genlist, 0.5, 0.0);
endfunc;