diff options
-rw-r--r-- | res/edje/images/alarm_toast_popup_success.png | bin | 0 -> 1598 bytes | |||
-rwxr-xr-x | src/main.c | 4 | ||||
-rwxr-xr-x | src/view.c | 11 |
3 files changed, 12 insertions, 3 deletions
diff --git a/res/edje/images/alarm_toast_popup_success.png b/res/edje/images/alarm_toast_popup_success.png Binary files differnew file mode 100644 index 0000000..7f50eed --- /dev/null +++ b/res/edje/images/alarm_toast_popup_success.png @@ -193,8 +193,8 @@ static bool app_create(void *user_data) view_set_base_layout(layout); char* respath = app_get_resource_path(); char locale_path[256] = {0,}; - snprintf(locale_path,sizeof(locale_path),"%s/locale",respath); - bindtextdomain(PACKAGE,locale_path); + snprintf(locale_path, sizeof(locale_path), "%s/locale", respath); + bindtextdomain(PACKAGE, locale_path); return true; } @@ -259,8 +259,10 @@ char* _gl_text_get(void *data, Evas_Object *obj, const char *part) if (!strcmp(part, "elm.text")) { if (hour == 0) snprintf(buf, BUF_LEN, "%d:%02d <font_size=24>AM<font_size>", hour+12, min); - else if (hour <= 12) + else if (hour < 12) snprintf(buf, BUF_LEN, "%d:%02d <font_size=24>AM<font_size>", hour, min); + else if (hour == 12) + snprintf(buf, BUF_LEN, "%d:%02d <font_size=24>PM<font_size>", hour, min); else snprintf(buf, BUF_LEN, "%d:%02d <font_size=24>PM<font_size>", hour-12, min); return strdup(buf); @@ -1305,6 +1307,13 @@ void view_create_text_popup(Evas_Object *parent, double timeout, const char *tex eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, _popup_hide_cb, NULL); evas_object_smart_callback_add(popup, "dismissed", _popup_hide_finished_cb, NULL); elm_object_translatable_part_text_set(popup, "elm.text", text); + if (e == EDIT_MODE) { + Evas_Object *img = elm_image_add(popup); + char file_path[BUF_LEN] = {0, }; + data_get_resource_path("edje/images/alarm_toast_popup_success.png", file_path, sizeof(file_path)); + elm_image_file_set(img, file_path, NULL); + elm_object_part_content_set(popup, "toast,icon", img); + } evas_object_smart_callback_add(popup, "block,clicked", _block_clicked_cb, NULL); if (!e_m) { |