summaryrefslogtreecommitdiff
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
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>
-rw-r--r--include/define.h1
-rw-r--r--src/util.c10
2 files changed, 11 insertions, 0 deletions
diff --git a/include/define.h b/include/define.h
index 2229a34..6e6279a 100644
--- a/include/define.h
+++ b/include/define.h
@@ -46,6 +46,7 @@
#define SIGNAL_NO_FAVORITE "elm,state,no_favorite"
#define SIGNAL_TOGGLE "elm,state,toggle"
#define SIGNAL_UNTOGGLE "elm,state,untoggle"
+#define SIGNAL_TIMEOUT "timeout"
#define FONT_REGULAR "TizenSans"
#define FONT_LIGHT "TizenSans:style=Light"
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) {