#include <efl_extension.h>
#include "gl-data.h"
+#include "gl-util.h"
#ifndef EXPORT_API
#define EXPORT_API __attribute__ ((visibility("default")))
/******** EDJ File path ********/
-#define GL_EDJ_FILE EDJDIR "/" PACKAGE ".edj"
+#define GL_EDJ_FILE PACKAGE".edj"
/******** Groups name ********/
int _gl_free_selected_list(void *data);
int _gl_dlopen_imageviewer(void *data);
int _gl_dlclose_imageviewer(void *data);
+char *_gl_get_edje_path(void);
#ifdef __cplusplus
}
GL_CHECK_NULL(parent);
Evas_Object *ly = NULL;
+ char *path = _gl_get_edje_path();
+ GL_CHECK_NULL(path);
char *group = NULL;
if (it_d->h > it_d->w) {
group = g_strdup_printf("gallery/timeline_%d", it_d->count);
group = g_strdup_printf("gallery/timeline_%dl", it_d->count);
}
- ly = gl_ui_load_edj(parent, GL_EDJ_FILE, group);
+ ly = gl_ui_load_edj(parent, path, group);
+ free(path);
GL_GFREE(group);
GL_CHECK_NULL(ly);
{
Evas_Object *layout = NULL;
layout = elm_layout_add(parent);
- elm_layout_file_set(layout, GL_EDJ_FILE, "timeline_gridview");
+ char *path = _gl_get_edje_path();
+ GL_CHECK_NULL(path);
+ elm_layout_file_set(layout, path, "timeline_gridview");
+ free(path);
evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(layout);
layout = elm_layout_add(timeline_d->parent);
GL_CHECK_NULL(layout);
- elm_layout_file_set(layout, GL_EDJ_FILE, "timeline_gridview_date_toast");
+ char *path = _gl_get_edje_path();
+ GL_CHECK_NULL(path);
+ elm_layout_file_set(layout, path, "timeline_gridview_date_toast");
+ free(path);
timeline_d->date_layout = layout;
if (_gl_timeline_create_grid_view(timeline_d, genlist, update) < 0) {
timeline_d->time_media_display_order = TIME_ORDER_DESC;
ad->pinchinfo.zoom_level = GL_ZOOM_IN_ONE;
- layout = gl_ui_load_edj(parent, GL_EDJ_FILE, "timeline");
+ char *path = _gl_get_edje_path();
+ GL_CHECK_VAL(path, -1);
+ layout = gl_ui_load_edj(parent, path, "timeline");
+ free(path);
if (layout == NULL) {
gl_dbgE("Failed to create layout!");
goto GL_TIMELINE_FAILED;
}
char cnt[GL_ALBUM_NAME_LEN_MAX] = { 0, };
Evas_Object *layout = elm_layout_add(obj);
- elm_layout_file_set(layout, GL_EDJ_FILE, "ceter_algined_text_layout");
+ char *path = _gl_get_edje_path();
+ GL_CHECK_NULL(path);
+ elm_layout_file_set(layout, path, "ceter_algined_text_layout");
+ free(path);
char *i18n_name = _gl_get_i18n_album_name(album_item->cluster);
elm_layout_text_set(layout, "elm.text", elm_entry_utf8_to_markup(_gl_str(i18n_name)));
snprintf(cnt, sizeof(cnt), "(%d)", (int)(album_item->cluster->count));
if (!g_strcmp0(part, "elm.text.name.swallow")) {
char cnt[GL_ALBUM_NAME_LEN_MAX] = { 0, };
Evas_Object *layout = elm_layout_add(obj);
- elm_layout_file_set(layout, GL_EDJ_FILE, "ceter_algined_text_layout_split_view");
+ char *path = _gl_get_edje_path();
+ GL_CHECK_NULL(path);
+ elm_layout_file_set(layout, path, "ceter_algined_text_layout_split_view");
+ free(path);
char *i18n_name = _gl_get_i18n_album_name(album_item->cluster);
elm_layout_text_set(layout, "elm.text", _gl_str(i18n_name));
snprintf(cnt, sizeof(cnt), "(%d)", (int)(album_item->cluster->count));
_gl_ui_set_translate_part_str(popup, "title,text", title);
entry_ly = elm_layout_add(popup);
- elm_layout_file_set(entry_ly, GL_EDJ_FILE, "popup_input_text");
+ char *path = _gl_get_edje_path();
+ GL_CHECK_VAL(path, -1);
+ elm_layout_file_set(entry_ly, path, "popup_input_text");
+ free(path);
Evas_Object *entry = elm_entry_add(entry_ly);
if (entry == NULL) {
GL_PROFILE_IN;
GL_CHECK_VAL(ad, -1);
- elm_theme_extension_add(NULL, GL_EDJ_FILE);
+ char *path = _gl_get_edje_path();
+ GL_CHECK_VAL(path, -1);
+ elm_theme_extension_add(NULL, path);
+ free(path);
/* Set initial rotate angle */
ad->maininfo.rotate_mode = APP_DEVICE_ORIENTATION_0;
gl_dbg("Initial rotation mode: %d", ad->maininfo.rotate_mode);
evas_object_smart_callback_del(ad->maininfo.win, "wm,rotation,changed",
__gl_main_win_rot_changed_cb);
_gl_ctxpopup_del(ad);
- elm_theme_extension_del(NULL, GL_EDJ_FILE);
+ char *path = _gl_get_edje_path();
+ GL_CHECK_VAL(path, -1);
+ elm_theme_extension_del(NULL, path);
+ free(path);
return 0;
}
gl_dbg("");
Evas_Object *layout = NULL;
- layout = gl_ui_load_edj(ad->maininfo.naviframe, GL_EDJ_FILE,
+ char *path = _gl_get_edje_path();
+ GL_CHECK_NULL(path);
+ layout = gl_ui_load_edj(ad->maininfo.naviframe, path,
GL_GRP_GRIDVIEW);
+ free(path);
evas_object_show(layout);
return layout;
return -1;
}
+char *_gl_get_edje_path(void)
+{
+ char edj_path[1024] = {0};
+ char *path = app_get_resource_path();
+ if (!path) {
+ return NULL;
+ }
+ snprintf(edj_path, 1024, "%s%s/%s", path , "edje", GL_EDJ_FILE);
+ return strdup(edj_path);
+}
+
{
GL_CHECK_NULL(parent);
Evas_Object *layout = NULL;
- layout = gl_ui_load_edj(parent, GL_EDJ_FILE, GL_GRP_CONTROLBAR);
+ char *path = _gl_get_edje_path();
+ GL_CHECK_NULL(path);
+ layout = gl_ui_load_edj(parent, path, GL_GRP_CONTROLBAR);
+ free(path);
GL_CHECK_NULL(layout);
evas_object_show(layout);
return layout;
Evas_Object *ly = elm_layout_add(popup);
Evas_Object *ly1 = elm_layout_add(ly);
- elm_layout_file_set(ly, GL_EDJ_FILE, "list_popup_swallow_ly");
- elm_layout_file_set(ly1, GL_EDJ_FILE, "list_popup_content_ly");
+ char *path = _gl_get_edje_path();
+ GL_CHECK(path);
+ elm_layout_file_set(ly, path, "list_popup_swallow_ly");
+ elm_layout_file_set(ly1, path, "list_popup_content_ly");
+ free(path);
_gl_ui_set_translate_part_str(ly1, "elm.text", first_text);
_gl_ui_set_translate_part_str(ly1, "elm.text.second", second_text);
__gl_popup_menu_get_genlist_text, __gl_popup_menu_get_genlist_content,
_gl_genlist_item_apend);
Evas_Object *ly = elm_layout_add(popup);
- elm_layout_file_set(ly, GL_EDJ_FILE, "list_popup_swallow_ly");
+ char *path = _gl_get_edje_path();
+ GL_CHECK_VAL(path, -1);
+ elm_layout_file_set(ly, path, "list_popup_swallow_ly");
Evas_Object *ly1 = elm_layout_add(popup);
- elm_layout_file_set(ly1, GL_EDJ_FILE, "list_popup_content_ly");
+ elm_layout_file_set(ly1, path, "list_popup_content_ly");
+ free(path);
elm_object_part_content_set(ly, "list", genlist);
elm_object_content_set(popup, ly);
int w, h;
eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK,
__gl_pb_cancel_thread_pbar_cb, data);
Evas_Object *popupLayout = elm_layout_add(popup);
- elm_layout_file_set(popupLayout, GL_EDJ_FILE, "popup_text_progressbar_view_layout");
+ char *path = _gl_get_edje_path();
+ GL_CHECK_VAL(path, -1);
+ elm_layout_file_set(popupLayout, path, "popup_text_progressbar_view_layout");
+ free(path);
evas_object_size_hint_weight_set(popupLayout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(popupLayout);
evas_object_show(label);
layout = elm_layout_add(popup);
- elm_layout_file_set(layout, GL_EDJ_FILE, "popup_processing");
+ char *path = _gl_get_edje_path();
+ GL_CHECK_NULL(path);
+ elm_layout_file_set(layout, path, "popup_processing");
+ free(path);
evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
GL_CHECK_NULL(bg_data);
Evas_Object *base = NULL;
- base = _gl_rotate_bg_add_layout(parent, GL_EDJ_FILE,
+ char *path = _gl_get_edje_path();
+ GL_CHECK_NULL(path);
+ base = _gl_rotate_bg_add_layout(parent, path,
GL_ROTATE_BG_GROUP);
+ free(path);
if (base == NULL) {
GL_FREE(bg_data);
return NULL;