#define DEFAULT_PLAYER_THUMBNAIL "/usr/apps/org.tizen.music-player/shared/res/shared_images/default_album_art_480.png"
#define BROKEN_ALBUMART_IMAGE_PATH "/opt/usr/share/media/.thumb/thumb_default.png"
-#define PLAYLIST_CREATE_THUMBNAIL "/usr/apps/org.tizen.music-player/res/images/music_player/T02_playlist_thumbnail_created.png"
+#define PLAYLIST_CREATE_THUMBNAIL "T02_playlist_thumbnail_created.png"
//for shortcut
typedef enum {
MP_ADD_TO_HOME_SHORTCUT_TYPE_NONE,
pop_layout = elm_layout_add(popup);
MP_CHECK(pop_layout);
+ char edje_path[1024] ={0};
+ char * path = app_get_resource_path();
- elm_layout_file_set(pop_layout, MP_EDJ_NAME, "popup_detail");
+ MP_CHECK(path);
+ snprintf(edje_path, 1024, "%s%s/%s", path, "edje", MP_EDJ_NAME);
+ elm_layout_file_set(pop_layout, edje_path, "popup_detail");
+ free(path);
pBox = elm_box_add(popup);
elm_box_horizontal_set(pBox, EINA_FALSE);
eo = elm_layout_add(parent);
if (eo) {
- r = elm_layout_file_set(eo, file, group);
+ char edje_path[1024] ={0};
+ char * path = app_get_resource_path();
+
+ MP_CHECK_NULL(path);
+ snprintf(edje_path, 1024, "%s%s/%s", path, "edje", file);
+ r = elm_layout_file_set(eo, edje_path, group);
+ free(path);
if (!r) {
evas_object_del(eo);
return NULL;
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
#include <sys/times.h>
+#include <app.h>
#ifndef EXPORT_API
#define EXPORT_API __attribute__((__visibility__("default")))
#define PKGNAME_FOR_SHORTCUT PKG_NAME
#define EDJ_PATH EDJDIR
-#define EDJ_NAME EDJ_PATH"/mp-library.edj"
-#define MP_EDJ_NAME EDJ_PATH"/music.edj"
-#define MINICON_EDJ_NAME EDJ_PATH"/mp-minicontroller.edj"
-#define LOCKSCREENMINI_EDJ_NAME EDJ_PATH"/mp-lockscreenmini.edj"
-#define IMAGE_EDJ_NAME EDJ_PATH"/mp-images.edj"
+#define EDJ_NAME "mp-library.edj"
+#define MP_EDJ_NAME "music.edj"
+#define MINICON_EDJ_NAME "mp-minicontroller.edj"
+#define LOCKSCREENMINI_EDJ_NAME "mp-lockscreenmini.edj"
+#define IMAGE_EDJ_NAME "mp-images.edj"
#define GRP_MAIN "main"
-#define THEME_NAME EDJ_PATH"/mp-custom-winset-style.edj"
+#define THEME_NAME "mp-custom-winset-style.edj"
#define TITLE_H 90
#define START_Y_POSITION 94
#define MAX_URL_LEN MAX_NAM_LEN
#define DEF_STR_LEN 512
-#define PLAY_VIEW_EDJ_NAME EDJ_PATH"/music.edj"
+#define PLAY_VIEW_EDJ_NAME "music.edj"
//2 EVAS_OBJECT_TYPE define
#define MP_FAST_SCROLLER_TYPE "mp_data_fast_scroller_type"
PROFILE_IN("elm_theme_extension_add");
/* do extension add before add elm object.*/
- elm_theme_extension_add(NULL, THEME_NAME);
+ char edje_path[1024] ={0};
+ char * path = app_get_resource_path();
+ MP_CHECK_VAL(path, EINA_FALSE);
+ snprintf(edje_path, 1024, "%s%s/%s", path, "edje", THEME_NAME);
+
+ Elm_Theme *th = elm_theme_new();
+ elm_theme_extension_add(NULL, edje_path);
+ free(path);
PROFILE_OUT("elm_theme_extension_add");
PROFILE_IN("bindtextdomain");
return ui_app_main(argc, argv, &event_callbacks, &ad);
}
+
view->create_plst_layout = elm_layout_add(view->layout);
MP_CHECK_NULL(view->create_plst_layout);
- elm_layout_file_set(view->create_plst_layout, EDJ_NAME, "create_playlist");
+
+ char edje_path[1024] ={0};
+ char * path = app_get_resource_path();
+
+ MP_CHECK_NULL(path);
+ snprintf(edje_path, 1024, "%s%s/%s", path, "edje", EDJ_NAME);
+ elm_layout_file_set(view->create_plst_layout, edje_path, "create_playlist");
+ free(path);
genlist = mp_widget_genlist_create(view->create_plst_layout);
elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
content = elm_layout_add(obj);
Evas_Object *icon;
+ char edje_path[1024] ={0};
+ char * path = app_get_resource_path();
- icon = mp_util_create_image(obj, IMAGE_EDJ_NAME, MP_LITE_SHUFFLE_ICON, MP_LIST_SHUFFLE_ICON_SIZE, MP_LIST_SHUFFLE_ICON_SIZE);
+ MP_CHECK_NULL(path);
+ snprintf(edje_path, 1024, "%s%s/%s", path, "edje", IMAGE_EDJ_NAME);
+
+ icon = mp_util_create_image(obj, edje_path, MP_LITE_SHUFFLE_ICON, MP_LIST_SHUFFLE_ICON_SIZE, MP_LIST_SHUFFLE_ICON_SIZE);
evas_object_color_set(icon, 21, 108, 148, 255);
+ free(path);
elm_layout_theme_set(content, "layout", "list/B/type.3", "default");
elm_layout_content_set(content, "elm.swallow.content", icon);
content = elm_layout_add(obj);
Evas_Object *icon = NULL;
+ char edje_path[1024] ={0};
+ char * path = app_get_resource_path();
- icon = mp_util_create_image(obj, IMAGE_EDJ_NAME, MP_LITE_SHUFFLE_ICON, MP_LIST_SHUFFLE_ICON_SIZE, MP_LIST_SHUFFLE_ICON_SIZE);
+ MP_CHECK_NULL(path);
+ snprintf(edje_path, 1024, "%s%s/%s", path, "edje", IMAGE_EDJ_NAME);
+
+ icon = mp_util_create_image(obj, edje_path, MP_LITE_SHUFFLE_ICON, MP_LIST_SHUFFLE_ICON_SIZE, MP_LIST_SHUFFLE_ICON_SIZE);
evas_object_color_set(icon, 21, 108, 148, 255);
+ free(path);
elm_layout_theme_set(content, "layout", "list/B/type.3", "default");
elm_layout_content_set(content, "elm.swallow.content", icon);
mp_playlist_data->add_to_selected = true;
layout = elm_layout_add(mp_playlist_data->popup);
- elm_layout_file_set(layout, PLAY_VIEW_EDJ_NAME, "popup_entryview");
+ char edje_path[1024] ={0};
+ char * path = app_get_resource_path();
+
+ MP_CHECK(path);
+ snprintf(edje_path, 1024, "%s%s/%s", path, "edje", PLAY_VIEW_EDJ_NAME);
+
+ elm_layout_file_set(layout, edje_path, "popup_entryview");
+ free(path);
evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_object_focus_set(layout, EINA_FALSE);
eo = elm_layout_add(parent);
if (eo) {
- r = elm_layout_file_set(eo, file, group);
+ char edje_path[1024] ={0};
+ char * path = app_get_resource_path();
+
+ MP_CHECK_NULL(path);
+ snprintf(edje_path, 1024, "%s%s/%s", path, "edje", file);
+
+ r = elm_layout_file_set(eo, edje_path, group);
+ free(path);
+
if (!r) {
evas_object_del(eo);
return NULL;
eo = elm_layout_add(parent);
if (eo) {
- r = elm_layout_file_set(eo, file, group);
+ char edje_path[1024] ={0};
+ char * path = app_get_resource_path();
+
+ MP_CHECK_NULL(path);
+ snprintf(edje_path, 1024, "%s%s/%s", path, "edje", file);
+
+ r = elm_layout_file_set(eo, edje_path, group);
+ free(path);
if (!r) {
evas_object_del(eo);
return NULL;
#endif
playing_pannel = elm_layout_add(parent);
if (playing_pannel) {
- r = elm_layout_file_set(playing_pannel, PLAY_VIEW_EDJ_NAME, "mp_now_playing");
+ char edje_path[1024] ={0};
+ char * path = app_get_resource_path();
+
+ MP_CHECK_NULL(path);
+ snprintf(edje_path, 1024, "%s%s/%s", path, "edje", PLAY_VIEW_EDJ_NAME);
+
+ r = elm_layout_file_set(playing_pannel, edje_path, "mp_now_playing");
+ free(path);
if (!r) {
ERROR_TRACE("Error: elm_layout_file_set");
Evas_Object *eo = NULL;
Evas_Object *content = NULL;
content = elm_layout_add(obj);
- eo = mp_util_create_thumb_icon(obj, PLAYLIST_CREATE_THUMBNAIL, MP_LIST_ICON_SIZE,
+
+ char image_path[1024] ={0};
+ char * path = app_get_resource_path();
+
+ MP_CHECK_NULL(path);
+ snprintf(image_path, 1024, "%s%s/%s", path, "images/music_player", PLAYLIST_CREATE_THUMBNAIL);
+
+ eo = mp_util_create_thumb_icon(obj, image_path, MP_LIST_ICON_SIZE,
MP_LIST_ICON_SIZE);
elm_layout_theme_set(content, "layout", "list/B/music.type.1", "default");
Evas_Object *layout = NULL;
layout = elm_layout_add(popup);
- elm_layout_file_set(layout, PLAY_VIEW_EDJ_NAME, "popup_processingview_string");
+ char edje_path[1024] ={0};
+ char * path = app_get_resource_path();
+
+ MP_CHECK_NULL(path);
+ snprintf(edje_path, 1024, "%s%s/%s", path, "edje", PLAY_VIEW_EDJ_NAME);
+
+ elm_layout_file_set(layout, edje_path, "popup_processingview_string");
+ free(path);
evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
progressbar = mp_widget_loading_icon_add(popup, MP_LOADING_ICON_SIZE_SMALL);
elm_object_part_content_set(layout, "elm.swallow.content", progressbar);
Evas_Object *layout = NULL;
layout = elm_layout_add(popup);
- elm_layout_file_set(layout, PLAY_VIEW_EDJ_NAME, "popup_processingview_string");
+ char edje_path[1024] ={0};
+ char * path = app_get_resource_path();
+
+ MP_CHECK_NULL(path);
+ snprintf(edje_path, 1024, "%s%s/%s", path, "edje", PLAY_VIEW_EDJ_NAME);
+
+ elm_layout_file_set(layout, edje_path, "popup_processingview_string");
+ free(path);
evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
progressbar = mp_widget_loading_icon_add(popup, MP_LOADING_ICON_SIZE_SMALL);
elm_object_part_content_set(layout, "elm.swallow.content", progressbar);
Evas_Object *btn1;
layout = elm_layout_add(popup);
- elm_layout_file_set(layout, PLAY_VIEW_EDJ_NAME, "popup_processingview_1button");
+ char edje_path[1024] ={0};
+ char * path = app_get_resource_path();
+
+ MP_CHECK_NULL(path);
+ snprintf(edje_path, 1024,"%s%s/%s",path, "edje", PLAY_VIEW_EDJ_NAME);
+
+ elm_layout_file_set(layout, edje_path, "popup_processingview_1button");
+ free(path);
progressbar = mp_widget_loading_icon_add(popup, MP_LOADING_ICON_SIZE_LARGE);
Evas_Object *layout;
layout = elm_layout_add(popup);
- elm_layout_file_set(layout, PLAY_VIEW_EDJ_NAME, "popup_processingview_1button");
+ char edje_path[1024] ={0};
+ char * path = app_get_resource_path();
+
+ MP_CHECK_NULL(path);
+ snprintf(edje_path, 1024, "%s%s/%s", path, "edje", PLAY_VIEW_EDJ_NAME);
+
+ elm_layout_file_set(layout, edje_path, "popup_processingview_1button");
+ free(path);
progressbar = mp_widget_loading_icon_add(popup, MP_LOADING_ICON_SIZE_LARGE);
elm_object_part_content_set(layout, "elm.swallow.content", progressbar);
elm_object_part_text_set(layout, "elm.text", title);
Evas_Object *btn1;
layout = elm_layout_add(popup);
- elm_layout_file_set(layout, MP_EDJ_NAME, "popup_center_progressview");
+ char edje_path[1024] ={0};
+ char * path = app_get_resource_path();
+
+ MP_CHECK_NULL(path);
+ snprintf(edje_path, 1024,"%s%s/%s",path, "edje", MP_EDJ_NAME);
+
+ elm_layout_file_set(layout, edje_path, "popup_center_progressview");
+ free(path);
progressbar = elm_progressbar_add(popup);
elm_object_style_set(progressbar, "list_progress");
Evas_Object *label;
layout = elm_layout_add(popup);
- int ret = elm_layout_file_set(layout, MP_EDJ_NAME, "popup_checkview_personal");
+ char edje_path[1024] ={0};
+ char * path = app_get_resource_path();
+
+ MP_CHECK_NULL(path);
+ snprintf(edje_path, 1024, "%s%s/%s", path, "edje", MP_EDJ_NAME);
+
+ int ret = elm_layout_file_set(layout, edje_path, "popup_checkview_personal");
+ free(path);
if (!ret) {
ERROR_TRACE("Set layout style failed");
}
Evas_Object *p_window = elm_popup_win_get(popup);
if (p_window) {
- elm_theme_extension_add(NULL, THEME_NAME);
+ char edje_path[1024] ={0};
+ char * path = app_get_resource_path();
+
+ MP_CHECK_NULL(path);
+ snprintf(edje_path, 1024, "%s%s/%s", path, "edje", THEME_NAME);
+ elm_theme_extension_add(NULL, edje_path);
+ free(path);
}
return popup;
}
+
searchfield = elm_layout_add(parent);
Elm_Theme *th = elm_theme_new();
- elm_theme_extension_add(th, THEME_NAME);
+ char edje_path[1024] ={0};
+ char * path = app_get_resource_path();
+
+ MP_CHECK_NULL(path);
+ snprintf(edje_path, 1024, "%s%s/%s", path, "edje", THEME_NAME);
+
+ elm_theme_extension_add(th, edje_path);
+ free(path);
elm_layout_theme_set(searchfield, "layout", "searchbar", "cancel_button_case");
- //elm_layout_theme_set(searchfield, "layout", "searchfield", "singleline");
const char *style = "DEFAULT='font=tizen; font_size=45'";
en = elm_entry_add(searchfield);