appdata_s *ad = data;
/* Let window go to hide state. */
elm_win_lower(ad->win);
+
}
static void
create_base_gui(appdata_s *ad)
{
- ad->win = elm_win_util_standard_add(PACKAGE, PACKAGE);
+ ad->win = elm_win_add(NULL, PACKAGE, ELM_WIN_BASIC);
elm_win_autodel_set(ad->win, EINA_TRUE);
+ elm_win_alpha_set(ad->win, EINA_TRUE);
if (elm_win_wm_rotation_supported_get(ad->win)) {
int rots[4] = {0, 90, 180, 270};
/* Naviframe */
ad->nf = elm_naviframe_add(ad->conform);
evas_object_show(ad->nf);
- // elm_naviframe_prev_btn_auto_pushed_set(ad->nf, EINA_TRUE);
+ // elm_naviframe_prev_btn_auto_pushed_set(ad->nf, EINA_TRUE);
elm_object_content_set(ad->conform, ad->nf);
- Evas_Object *bg;
- char buf[PATH_MAX];
- char *res_path = app_get_resource_path();
- snprintf(buf, sizeof(buf), "%simages/FirmwareUpdate_BG.png", res_path);
- LOGI("Bg Image path : %s", buf);
- if(res_path) free(res_path);
-
- bg = elm_bg_add(ad->nf);
- elm_bg_option_set(bg, ELM_BG_OPTION_CENTER);
- elm_bg_file_set(bg, buf, NULL);
- Elm_Object_Item *nf_it = elm_naviframe_item_push(ad->nf, NULL, NULL, NULL, bg, "tabbar/notitle");
- //elm_naviframe_item_pop_cb_set(nf_it, naviframe_pop_cb, ad->nf);
-
- Evas_Object * toolbar = elm_bg_add(ad->nf);
- toolbar = elm_bg_add(ad->nf);
- elm_bg_option_set(toolbar, ELM_BG_OPTION_STRETCH);
- elm_bg_file_set(toolbar, buf, NULL);
- elm_object_item_part_content_set(nf_it, "tabbar", toolbar);
-
evas_object_show(ad->win);
}
static void
_popup_block_clicked_cb(void *data, Evas_Object *obj, void *event_info)
{
- //elm_popup_dismiss(obj);
- evas_object_del(obj);
}
static void
_popup_hide_cb(void *data, Evas_Object *obj, void *event_info)
{
- //elm_popup_dismiss(obj);
- evas_object_del(obj);
}
static void
_popup_hide_finished_cb(void *data, Evas_Object *obj, void *event_info)
{
- evas_object_del(obj);
}
static void
LOGI("Inside fota_show_result_popup");
char title[PATH_MAX], text[PATH_MAX];
Evas_Object *popup = elm_popup_add(nf);
- elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
+ elm_object_style_set(popup, "transparent");
+ elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 0.5);
evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
if (e_oper == FOTA_OPERATION_DOWNLOAD ) {
snprintf(title, sizeof(title), "Updating. Don't turn off your device");
Evas_Object *popup = elm_popup_add(nf);
- elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
+ elm_object_style_set(popup, "transparent");
+ elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 0.5);
evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_object_part_text_set(popup, "title,text", title);
evas_object_smart_callback_add(popup, "block,clicked", _popup_block_clicked_cb, NULL);
evas_object_show(popup);
+ Evas_Object *prev_popup = elm_object_item_data_get(obj);
+ if (prev_popup) {
+ evas_object_del(prev_popup);
+ }
LOGI("Start Update");
/* Install update-image downloaded at shared location on device */
int ret = update_control_initialize();
{
LOGI("Inside _download_image_cb");
Evas_Object *nf = data;
+
+ Evas_Object *prev_popup = elm_object_item_data_get(obj);
+
LOGI("System Command : %s", download_cmd);
/* Copy update-image from attached USB to shared location on device */
} else {
fota_show_install_popup(nf, UPDATE_TITLE);
}
-
+ if (prev_popup) {
+ evas_object_del(prev_popup);
+ }
elm_popup_dismiss(nf);
}
LOGI("Inside fota_show_install_popup");
Evas_Object *popup = elm_popup_add(nf);
- elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
+ elm_object_style_set(popup, "transparent");
+ elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 0.5);
evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_object_part_text_set(popup, "title,text", title);
elm_object_text_set(popup,buf);
Evas_Object *btn2 = elm_button_add(popup);
elm_object_text_set(btn2, "Install");
elm_object_part_content_set(popup, "button2", btn2);
+ elm_object_item_data_set(btn2, popup);
evas_object_smart_callback_add(btn2, "clicked", _install_update_cb, nf);
evas_object_show(popup);
}
LOGI("Inside fota_show_download_popup");
Evas_Object *popup = elm_popup_add(nf);
- elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
+ elm_object_style_set(popup, "transparent");
+ elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 0.5);
evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_object_part_text_set(popup, "title,text", title);
elm_object_text_set(popup,buf);
//elm_object_style_set(btn2, "popup");
elm_object_text_set(btn2, "Download");
elm_object_part_content_set(popup, "button2", btn2);
+
+ elm_object_item_data_set(btn2, popup);
evas_object_smart_callback_add(btn2, "clicked", _download_image_cb, nf);
evas_object_show(popup);