return 0;
}
+void _ge_free_sel_info(ge_ugdata *ugd)
+{
+ ge_dbg("Deleting selected media data");
+ GE_CHECK(ugd);
+ Eina_List *l = NULL;
+ ge_sel_item_s *sit = NULL;
+
+ EINA_LIST_FOREACH(ugd->selected_elist, l, sit) {
+ _ge_data_util_free_sel_item(sit);
+ }
+ ugd->selected_elist = NULL;
+ ge_dbg("Deleting selected media data done");
+}
+
+void _ge_free_medias(ge_ugdata *ugd)
+{
+ ge_dbg("Deleting media data");
+ GE_CHECK(ugd);
+ GE_CHECK(ugd->thumbs_d);
+ if (ugd->thumbs_d->medias_elist) {
+ ge_dbg("Deleting media list");
+ _ge_data_util_free_mtype_items(&ugd->thumbs_d->medias_elist);
+ }
+ ge_dbg("Deleting media data done");
+}
+
+void _ge_free_thumb_data(ge_ugdata *ugd)
+{
+ ge_dbg("Deleting thumb data");
+ GE_CHECK(ugd);
+ GE_CHECK(ugd->thumbs_d);
+
+ GE_IF_DEL_IDLER(ugd->thumbs_d->append_idler);
+ GE_FREEIF(ugd->thumbs_d->album_uuid);
+
+ if (ugd->thumbs_d->check_list) {
+ ugd->thumbs_d->check_list = NULL;
+ }
+
+ if (ugd->thumbs_d->image_layout_list) {
+ ugd->thumbs_d->image_layout_list = NULL;
+ }
+
+ GE_GENGRID_ITC_FREE(ugd->thumbs_d->gic);
+ GE_GENGRID_ITC_FREE(ugd->thumbs_d->gic_first);
+ GE_GENGRID_ITC_FREE(ugd->thumbs_d->no_content);
+
+ GE_FREEIF(ugd->thumbs_d);
+
+ ge_dbg("Deleting thumb data done");
+
+}
+
static int _ge_close_view(ge_ugdata *ugd)
{
GE_CHECK_VAL(ugd, -1);
_ge_db_update_finalize(ugd);
/* Disconnet with libmedia-info */
_ge_data_finalize(ugd);
+ if (ugd->gallery_handle) {
+ app_control_send_terminate_request(ugd->gallery_handle);
+ app_control_destroy(ugd->gallery_handle);
+ ugd->gallery_handle = NULL;
+ }
+ _ge_free_sel_info(ugd);
+ _ge_free_medias(ugd);
+ _ge_free_thumb_data(ugd);
return 0;
}
} else {
ugd->file_type_mode = GE_FILE_T_ALL;
}
-
+ GE_FREE(mime);
return 0;
}
GE_FREE(file_type);
return 0;
}
-
+ GE_FREEIF(file_type);
GE_DEFAULT_FILE_TYPE:
char *launch_type = NULL;
char *select_mode = NULL;
char *operation = NULL;
+ ugd->gallery_handle = NULL;
app_control_get_operation(service, &operation);
ge_sdbg("operation [%s]", operation);
} else {
ugd->is_attach_panel = false;
}
-
+ GE_FREEIF(contact_id);
if (ugd->overlap_mode) {
ugd->b_hide_indicator = true;
} else if (ugd->b_hide_indicator) {
static void _ge_pause(ui_gadget_h ug, app_control_h service, void *priv)
{
ge_dbg("");
+ GE_CHECK(priv);
+ ge_ugdata *ugd = (ge_ugdata *)priv;
+ if (ugd->ug_launched) {
+ __ge_grid_reset_view(ugd);
+ ugd->ug_launched = false;
+ }
}
/**
static void _ge_resume(ui_gadget_h ug, app_control_h service, void *priv)
{
ge_dbg("");
- GE_CHECK(priv);
- ge_ugdata *ugd = (ge_ugdata *)priv;
- /*update*/
-
- if (ugd->ug_called_by_me == NULL &&
- ugd->file_select_mode != GE_FILE_SELECT_T_SLIDESHOW) {
- ge_update_view(ugd, GE_UPDATE_NONE);
- }
}
/**
app_control_get_extra_data(msg, APP_CONTROL_DATA_SELECTION_MODE, &display_mode);
app_control_get_extra_data(msg, "__ATTACH_PANEL_INITIALIZE__", &initialized_mode);
+ char *max_cnt = NULL;
+ app_control_get_extra_data(msg, APP_CONTROL_DATA_TOTAL_COUNT, &max_cnt);
+ if (max_cnt) {
+ ugd->max_count = _ge_atoi(max_cnt);
+ GE_FREE(max_cnt);
+ }
+ ge_sdbg("max count: %d", ugd->max_count);
+
if (display_mode) {
if (!strcmp(display_mode, "single")) {
//change to single selection
}
}
- if (ugd->selected_elist) {
- ugd->selected_elist = eina_list_free(ugd->selected_elist);
- }
+ _ge_free_sel_info(ugd);
ugd->thumbs_d->tot_selected = 0;
elm_naviframe_item_title_enabled_set(ugd->nf_it, EINA_FALSE, EINA_FALSE);
//change to multi selection
ge_dbg("multiple_selection");
if (ugd->nocontents) {
+ double scale = elm_config_scale_get();
if (ugd->rotate_mode == GE_ROTATE_LANDSCAPE_UPSIDEDOWN || ugd->rotate_mode == GE_ROTATE_LANDSCAPE) {
- elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_h, LANDSCAPE_HEIGHT);
+ if ((scale - 1.8) < 0.0001) {
+ elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_h, LANDSCAPE_HEIGHT_WVGA);
+ } else {
+ elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_h, LANDSCAPE_HEIGHT);
+ }
} else {
- elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_w, FULL_MODE_PORTRAIT_HEIGHT);
+ if ((scale - 1.8) < 0.0001) {
+ elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_w, FULL_MODE_PORTRAIT_HEIGHT_WVGA);
+ } else {
+ elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_w, FULL_MODE_PORTRAIT_HEIGHT);
+ }
}
}
ugd->attach_panel_display_mode = ATTACH_PANEL_FULL_MODE;
text = g_strdup_printf(pd_selected, ugd->thumbs_d->tot_selected);
elm_object_item_text_set(ugd->nf_it, text);
+ GE_FREEIF(text);
+
/*Disable DONE Button if count is zero */
if (!ugd->thumbs_d->tot_selected) {
btn = elm_object_item_part_content_get(ugd->nf_it , GE_NAVIFRAME_TITLE_RIGHT_BTN);
elm_gengrid_realized_items_update(ugd->albums_view);
}
}
+ GE_FREEIF(display_mode);
+ GE_FREEIF(initialized_mode);
}
}
if (ugd->rotate_mode == GE_ROTATE_LANDSCAPE_UPSIDEDOWN || ugd->rotate_mode == GE_ROTATE_LANDSCAPE) {
if (ugd->nocontents) {
- elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_h, LANDSCAPE_HEIGHT);
+ double scale = elm_config_scale_get();
+ if ((scale - 1.8) < 0.0001) {
+ elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_h, LANDSCAPE_HEIGHT_WVGA);
+ } else {
+ elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_h, LANDSCAPE_HEIGHT);
+ }
} else {
elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, landscape_size, landscape_size);
}
} else {
if (ugd->nocontents) {
+ double scale = elm_config_scale_get();
if (ugd->attach_panel_display_mode == ATTACH_PANEL_FULL_MODE) {
- elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_w, FULL_MODE_PORTRAIT_HEIGHT);
+ if ((scale - 1.8) < 0.0001) {
+ elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_w, FULL_MODE_PORTRAIT_HEIGHT_WVGA);
+ } else {
+ elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_w, FULL_MODE_PORTRAIT_HEIGHT);
+ }
} else {
- elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_w, HALF_MODE_PORTRAIT_HEIGHT);
+ if ((scale - 1.8) < 0.0001) {
+ elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_w, HALF_MODE_PORTRAIT_HEIGHT_WVGA);
+ } else {
+ elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_w, HALF_MODE_PORTRAIT_HEIGHT);
+ }
}
} else {
elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, size, size);
#include "ge-nocontent.h"
#include <notification.h>
-static Elm_Gengrid_Item_Class *gic_first = NULL;
-static Elm_Gengrid_Item_Class *no_content = NULL;
-
-
#define DEFAULT_THUMBNAIL "/opt/usr/share/media/.thumb/thumb_default.png"
/* Only for local medias */
Evas_Object *layout = elm_layout_add(obj);
GE_CHECK_NULL(layout);
- Evas_Object *bg = elm_bg_add(layout);
+ Evas_Object *bg = elm_image_add(layout);
if (bg == NULL) {
evas_object_del(layout);
return NULL;
}
- elm_bg_file_set(bg, path, NULL);
- elm_bg_load_size_set(bg, item_w, item_h);
+ elm_image_file_set(bg, path, NULL);
+ elm_image_preload_disabled_set(bg, EINA_FALSE);
+ elm_image_fill_outside_set(bg, EINA_TRUE);
evas_object_size_hint_max_set(bg, item_w, item_h);
- evas_object_size_hint_aspect_set(bg, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bg, EVAS_HINT_FILL, EVAS_HINT_FILL);
int i = 0;
_ge_data_get_sel_paths(ugd, &paths, &path_array, &sel_cnt);
+ _ge_free_sel_info(ugd);
if (sel_cnt <= 0) {
ge_dbgE("Invalid selected path count!");
goto GE_SEND_RESULT_FINISHED;
if (ugd->thumbs_d->tot_selected >= 0) {
text = g_strdup_printf(pd_selected, ugd->thumbs_d->tot_selected);
elm_object_item_text_set(ugd->nf_it, text);
+ GE_FREEIF(text);
}
}
}
if (gitem->item->type == MEDIA_CONTENT_TYPE_IMAGE) {
- layout = ge_thumb_show_part_icon_image(obj, path,
- ugd->thumbs_d->icon_w,
- ugd->thumbs_d->icon_h);
+ if (ugd->thumbs_d->image_layout_list) {
+ Evas_Object *bg = NULL;
+ layout = eina_list_data_get(ugd->thumbs_d->image_layout_list);
+ GE_CHECK_NULL(layout);
+ ugd->thumbs_d->image_layout_list = eina_list_remove(ugd->thumbs_d->image_layout_list, layout);
+ bg = elm_object_part_content_get(layout, "elm.swallow.icon");
+ elm_image_file_set(bg, path, NULL);
+ } else {
+ layout = ge_thumb_show_part_icon_image(obj, path,
+ ugd->thumbs_d->icon_w,
+ ugd->thumbs_d->icon_h);
+ }
}
} else if (!g_strcmp0(part, "checkbox_swallow") && ugd->thumbs_d->b_editmode == true) {
Evas_Object* ck = NULL;
- ck = elm_check_add(obj);
- GE_CHECK_NULL(ck);
+ if (ugd->thumbs_d->check_list) {
+ ck = eina_list_data_get(ugd->thumbs_d->check_list);
+ GE_CHECK_NULL(ck);
+ ugd->thumbs_d->check_list = eina_list_remove(ugd->thumbs_d->check_list, ck);
+ } else {
+ ck = elm_check_add(obj);
+ GE_CHECK_NULL(ck);
+ }
evas_object_propagate_events_set(ck, EINA_FALSE);
evas_object_repeat_events_set(ck, EINA_FALSE);
elm_check_state_set(ck, gitem->checked);
ugd->thumbs_d->check = ck;
evas_object_smart_callback_add(ck, "changed",
- __ge_check_state_changed_cb, gitem);
+ __ge_check_state_changed_cb, gitem);
evas_object_show(ck);
return ck;
}
}
+void
+__ge_grid_reset_view(ge_ugdata *ugd)
+{
+ ge_dbg("");
+ if (ugd->thumbs_d->tot_selected == 0) {
+ return;
+ }
+ ge_item* gitem = NULL;
+ char *pd_selected = GE_STR_PD_SELECTED;
+ int i;
+ ugd->selected_elist = eina_list_free(ugd->selected_elist);
+ for (i = 0; i < ugd->thumbs_d->medias_cnt; i++) {
+ gitem = eina_list_nth(ugd->thumbs_d->medias_elist, i);
+ if (gitem == NULL || gitem->item == NULL ||
+ gitem->item->uuid == NULL) {
+ ge_dbgE("Invalid gitem!");
+ continue;
+ }
+ gitem->checked = false;
+ elm_gengrid_item_update(gitem->elm_item);
+ }
+ ugd->thumbs_d->tot_selected = 0;
+ char *text = g_strdup_printf(pd_selected, ugd->thumbs_d->tot_selected);
+ elm_object_item_text_set(ugd->nf_it, text);
+ GE_FREEIF(text);
+ Evas_Object *btn = NULL;
+ btn = elm_object_item_part_content_get(ugd->nf_it , GE_NAVIFRAME_TITLE_RIGHT_BTN);
+ if (btn == NULL) {
+ ge_dbgE("Failed to get part information");
+ }
+
+ if (ugd->thumbs_d->tot_selected == 0) {
+ elm_object_disabled_set(btn, EINA_TRUE);
+ }
+}
+
+
static void
__ge_launch_ug_gallery(void *data, Evas_Object *obj, void *ei)
{
app_control_add_extra_data(svc_handle, APP_CONTROL_DATA_TOTAL_COUNT, maximum_count);
app_control_add_extra_data(svc_handle, "launch-type", "select-multiple");
app_control_add_extra_data(svc_handle, "file-type", "image");
- app_control_add_extra_data(svc_handle, "hide-personal", "true");
- app_control_send_launch_request(svc_handle, __ge_gallery_ug_result_cb, data);
- int ret = app_control_destroy(svc_handle);
+ int ret = app_control_send_launch_request(svc_handle, __ge_gallery_ug_result_cb, data);
+ ugd->gallery_handle = svc_handle;
if (ret == 0) {
ge_dbg("Launched ug-gallery-efl successfully.");
+ ugd->ug_launched = true;
} else {
ge_dbgE("Launching ug-gallery-efl Failed.");
}
if (gitem->ugd->thumbs_d->tot_selected >= 0) {
text = g_strdup_printf(pd_selected, gitem->ugd->thumbs_d->tot_selected);
elm_object_item_text_set(gitem->ugd->nf_it, text);
+ GE_FREEIF(text);
}
}
}
}
elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, size, size);
elm_gengrid_item_append(ugd->thumbs_d->gengrid,
- gic_first,
+ ugd->thumbs_d->gic_first,
NULL, __ge_launch_ug_gallery,
ugd);
gitem->sequence = item_cnt + 1;
}
} else {
+ double scale = elm_config_scale_get();
if (ugd->attach_panel_display_mode == ATTACH_PANEL_FULL_MODE) {
- elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_w, FULL_MODE_PORTRAIT_HEIGHT);
+ if ((scale - 1.8) < 0.0001) {
+ elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_w, FULL_MODE_PORTRAIT_HEIGHT_WVGA);
+ } else {
+ elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_w, FULL_MODE_PORTRAIT_HEIGHT);
+ }
} else {
- elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_w, HALF_MODE_PORTRAIT_HEIGHT);
+ if ((scale - 1.8) < 0.0001) {
+ elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_w, HALF_MODE_PORTRAIT_HEIGHT_WVGA);
+ } else {
+ elm_gengrid_item_size_set(ugd->thumbs_d->gengrid, win_w, HALF_MODE_PORTRAIT_HEIGHT);
+ }
}
ugd->nocontents = _ge_nocontents_create(ugd);
elm_gengrid_item_append(ugd->thumbs_d->gengrid,
- no_content ,
+ ugd->thumbs_d->no_content ,
ugd, NULL,
ugd);
}
char *text = g_strdup_printf(pd_selected, ugd->thumbs_d->tot_selected);
elm_object_item_text_set(ugd->nf_it, text);
+ GE_FREEIF(text);
return 0;
}
ge_dbgE("No content layout no need to update items");
return;
}
- Elm_Object_Item *it = (Elm_Object_Item *)ei;
- ge_item* gitem = elm_object_item_data_get(it);
+ GE_CHECK(ugd->thumbs_d);
+ Elm_Object_Item *item = (Elm_Object_Item *)ei;
+ ge_item* gitem = elm_object_item_data_get(item);
GE_CHECK(gitem);
GE_CHECK(gitem->item);
ge_dbg("realized");
if (!GE_FILE_EXISTS(gitem->item->thumb_url) &&
- GE_FILE_EXISTS(gitem->item->file_url) &&
- (gitem->store_type == GE_PHONE ||
- gitem->store_type == GE_MMC ||
- gitem->store_type == GE_ALL)) {
+ GE_FILE_EXISTS(gitem->item->file_url) &&
+ (gitem->store_type == GE_PHONE ||
+ gitem->store_type == GE_MMC ||
+ gitem->store_type == GE_ALL)) {
ge_dbg("Generating Thumbs");
_ge_data_create_thumb(gitem->item,
_ge_grid_thumb_created_cb,
- gitem);
+ gitem);
+ }
+
+ Elm_Gengrid_Item_Class *it = elm_gengrid_item_item_class_get(ei);
+ GE_CHECK(it);
+ if (!it->item_style) {
+ ge_dbgE("item style is NULL");
+ return;
+ }
+ if (!g_strcmp0(it->item_style, "gengrid_items")) {
+ elm_object_item_signal_emit(item, "hide_default_image", "elm");
+ } else {
+ ge_dbg("item style not matched");
+ }
+}
+
+static void
+__ge_grid_unrealized(void *data, Evas_Object *obj, void *ei)
+{
+ ge_dbg("Grid unrealized");
+ GE_CHECK(ei);
+
+ ge_ugdata *ugd = (ge_ugdata *)data;
+ GE_CHECK(ugd);
+ GE_CHECK(ugd->thumbs_d);
+ Elm_Object_Item *item = (Elm_Object_Item*)ei;
+ Elm_Gengrid_Item_Class *it = elm_gengrid_item_item_class_get(ei);
+ GE_CHECK(it);
+ if (!it->item_style) {
+ ge_dbgE("item style is NULL");
+ return;
+ }
+ if (!g_strcmp0(it->item_style, "gengrid_items")) {
+ Eina_List *l = NULL;
+ Evas_Object *content = NULL;
+ elm_gengrid_item_all_contents_unset(ei, &l);
+ EINA_LIST_FREE(l, content)
+ {
+ if (evas_object_smart_type_check(content, "elm_check")) {
+ ugd->thumbs_d->check_list = eina_list_append(ugd->thumbs_d->check_list, content);
+ evas_object_smart_callback_del(content, "changed", __ge_check_state_changed_cb);
+ } else if (evas_object_smart_type_check(content, "elm_layout")) {
+ ugd->thumbs_d->image_layout_list = eina_list_append(ugd->thumbs_d->image_layout_list, content);
+ } else {
+ evas_object_del(content);
+ }
+ } elm_object_item_signal_emit(item, "show_default_image", "elm");
+ } else {
+ ge_dbg("item style not matched");
}
}
+
int
ge_create_gengrid(ge_ugdata *ugd)
{
ugd->thumbs_d->b_mainview = true;
ugd->thumbs_d->b_editmode = false;
ugd->thumbs_d->tot_selected = 0;
+ ugd->thumbs_d->check_list = NULL;
+ ugd->thumbs_d->image_layout_list = NULL;
ugd->attach_panel_display_mode = ATTACH_PANEL_HALF_MODE;
ugd->file_select_mode = GE_FILE_SELECT_T_ONE;
_ge_grid_move_stop_cb, ugd);
evas_object_smart_callback_add(gengrid, "realized", __ge_grid_realized,
ugd);
+ evas_object_smart_callback_add(gengrid, "unrealized", __ge_grid_unrealized, ugd);
}
ugd->thumbs_d->gic = elm_gengrid_item_class_new();
ugd->thumbs_d->gic->func.del = NULL;
}
- gic_first = elm_gengrid_item_class_new();
+ ugd->thumbs_d->gic_first = elm_gengrid_item_class_new();
- if (gic_first) {
- gic_first->item_style = "gengrid_first_item";
- gic_first->func.text_get = __ge_gengrid_text_get_cb;
- gic_first->func.content_get = NULL;
- gic_first->func.state_get = NULL;
- gic_first->func.del = NULL;
+ if (ugd->thumbs_d->gic_first) {
+ ugd->thumbs_d->gic_first->item_style = "gengrid_first_item";
+ ugd->thumbs_d->gic_first->func.text_get = __ge_gengrid_text_get_cb;
+ ugd->thumbs_d->gic_first->func.content_get = NULL;
+ ugd->thumbs_d->gic_first->func.state_get = NULL;
+ ugd->thumbs_d->gic_first->func.del = NULL;
}
- no_content = elm_gengrid_item_class_new();
+ ugd->thumbs_d->no_content = elm_gengrid_item_class_new();
- if (no_content) {
- no_content->item_style = "no_content";
- no_content->func.text_get = NULL;
- no_content->func.content_get = __ge_nocontent_get;
- no_content->func.state_get = NULL;
- no_content->func.del = NULL;
+ if (ugd->thumbs_d->no_content) {
+ ugd->thumbs_d->no_content->item_style = "no_content";
+ ugd->thumbs_d->no_content->func.text_get = NULL;
+ ugd->thumbs_d->no_content->func.content_get = __ge_nocontent_get;
+ ugd->thumbs_d->no_content->func.state_get = NULL;
+ ugd->thumbs_d->no_content->func.del = NULL;
}
if (ugd->thumbs_d->medias_cnt > 0) {
elm_gengrid_item_size_set(gengrid, size, size);
elm_gengrid_item_append(gengrid,
- gic_first,
+ ugd->thumbs_d->gic_first,
NULL, __ge_launch_ug_gallery,
ugd);
/* From zeroth IMAGE item to last one */
}
} else {
ugd->nocontents = _ge_nocontents_create(ugd);
- elm_gengrid_item_size_set(gengrid, win_w, HALF_MODE_PORTRAIT_HEIGHT);
+ double scale = elm_config_scale_get();
+ if ((scale - 1.8) < 0.0001) {
+ elm_gengrid_item_size_set(gengrid, win_w, HALF_MODE_PORTRAIT_HEIGHT_WVGA);
+ } else {
+ elm_gengrid_item_size_set(gengrid, win_w, HALF_MODE_PORTRAIT_HEIGHT);
+ }
elm_gengrid_item_append(gengrid,
- no_content,
+ ugd->thumbs_d->no_content,
ugd, NULL,
ugd);
elm_object_part_content_set(ugd->albums_view, "contents", gengrid);
char *pd_selected = GE_STR_PD_SELECTED;
- ugd->nf_it = elm_naviframe_item_push(ugd->naviframe, g_strdup_printf(pd_selected, ugd->thumbs_d->tot_selected), NULL, NULL, ugd->albums_view, "basic/transparent");
+ char *text = g_strdup_printf(pd_selected, ugd->thumbs_d->tot_selected);
+ ugd->nf_it = elm_naviframe_item_push(ugd->naviframe, text, NULL, NULL, ugd->albums_view, "basic/transparent");
+
+ GE_FREEIF(text);
/* Cancel Button */
Evas_Object *btn1 = elm_button_add(ugd->naviframe);