summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorjinwoo.shin <jw0227.shin@samsung.com>2015-08-31 21:10:32 +0900
committerjinwoo.shin <jw0227.shin@samsung.com>2015-08-31 21:13:13 +0900
commita1d208163b57dff2d31124d5df22449a4bc3bf14 (patch)
tree4f14b1100964dc0b4a685c99fbfe9b05d2d7a293 /src/util.c
parent93bc4f434a63dd2ab45a18d9b68670a3f98911ea (diff)
downloadair_livetv-a1d208163b57dff2d31124d5df22449a4bc3bf14.tar.gz
air_livetv-a1d208163b57dff2d31124d5df22449a4bc3bf14.tar.bz2
air_livetv-a1d208163b57dff2d31124d5df22449a4bc3bf14.zip
Change-Id: I40fed1988382923ae1495523640954f9849974c8 Signed-off-by: jinwoo.shin <jw0227.shin@samsung.com>
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index 518fad5..041d77b 100644
--- a/src/util.c
+++ b/src/util.c
@@ -159,6 +159,14 @@ Evas_Object *util_add_button(Evas_Object *parent, const char *part,
return btn;
}
+static void _notify_timeout_cb(void *data, Evas_Object *obj, void *ei)
+{
+ if (!obj)
+ return;
+
+ evas_object_del(obj);
+}
+
Evas_Object *util_add_toast(Evas_Object *parent, char *text)
{
Evas_Object *toast, *content;
@@ -177,6 +185,8 @@ Evas_Object *util_add_toast(Evas_Object *parent, char *text)
elm_object_style_set(toast, STYLE_TOAST);
elm_notify_align_set(toast, 0.0, 1.0);
elm_notify_timeout_set(toast, TOAST_TIMEOUT);
+ evas_object_smart_callback_add(toast, SIGNAL_TIMEOUT,
+ _notify_timeout_cb, NULL);
content = elm_label_add(toast);
if (!content) {