summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjinwoo.shin <jw0227.shin@samsung.com>2015-07-15 19:30:24 +0900
committerjinwoo.shin <jw0227.shin@samsung.com>2015-07-15 19:33:27 +0900
commitad24aef8e4060765ab62c691f42a688ae9835ec1 (patch)
tree2089899677989abfb673708e8204fbc1077ea37f
parent0bd985a4a5477c62a7d9fed3a50757678efdff48 (diff)
downloadair_livetv-ad24aef8e4060765ab62c691f42a688ae9835ec1.tar.gz
air_livetv-ad24aef8e4060765ab62c691f42a688ae9835ec1.tar.bz2
air_livetv-ad24aef8e4060765ab62c691f42a688ae9835ec1.zip
Add function to remove all event callbacks on the box
Change-Id: I305f22f66feb41d82498e08b0ab119a572b8423b Signed-off-by: jinwoo.shin <jw0227.shin@samsung.com>
-rw-r--r--src/layout_channelinfo_search.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/layout_channelinfo_search.c b/src/layout_channelinfo_search.c
index 306a59c..fbedb1d 100644
--- a/src/layout_channelinfo_search.c
+++ b/src/layout_channelinfo_search.c
@@ -71,7 +71,7 @@ static void _key_down_cb(int id, void *data, Evas *e, Evas_Object *obj,
_tune_channel(data);
}
-void _mouse_down_cb(int id, void *data, Evas *e, Evas_Object *obj,
+static void _mouse_down_cb(int id, void *data, Evas *e, Evas_Object *obj,
Evas_Event_Mouse_Down *ev)
{
_tune_channel(data);
@@ -82,6 +82,24 @@ static input_handler channel_handler = {
.mouse_down = _mouse_down_cb,
};
+static void _release_channel_handler(Evas_Object *obj)
+{
+ Eina_List *child, *l;
+ Evas_Object *ly;
+
+ if (!obj)
+ return;
+
+ child = elm_box_children_get(obj);
+
+ EINA_LIST_FOREACH(child, l, ly) {
+ inputmgr_remove_callback(ly, &channel_handler);
+ }
+
+ if (child)
+ eina_list_free(child);
+}
+
static void _load_channel_list(struct _priv *priv, Eina_List *channel_list)
{
Evas_Object *ly, *divider, *first;
@@ -104,6 +122,7 @@ static void _load_channel_list(struct _priv *priv, Eina_List *channel_list)
DIVIDER_WIDTH, DIVIDER_HEIGHT);
evas_object_show(divider);
+ _release_channel_handler(priv->box);
elm_box_clear(priv->box);
first = NULL;