summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--res/edje/images/alarm_toast_popup_success.pngbin0 -> 1598 bytes
-rwxr-xr-xsrc/main.c4
-rwxr-xr-xsrc/view.c11
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
new file mode 100644
index 0000000..7f50eed
--- /dev/null
+++ b/res/edje/images/alarm_toast_popup_success.png
Binary files differ
diff --git a/src/main.c b/src/main.c
index 314b30c..575afb3 100755
--- a/src/main.c
+++ b/src/main.c
@@ -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;
}
diff --git a/src/view.c b/src/view.c
index a3c6562..84afdae 100755
--- a/src/view.c
+++ b/src/view.c
@@ -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) {