From: Radoslaw Czerski Date: Fri, 2 Sep 2016 14:39:11 +0000 (+0200) Subject: ticker: Remove mouse events. X-Git-Tag: submit/tizen/20160905.072141^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2a71ce65b9bb9dbb2b0b5bdd7abaeeb74703821d;p=profile%2Fmobile%2Fapps%2Fnative%2Findicator.git ticker: Remove mouse events. Additionally ticker window was prevented to be created twice after hiding quickpanel. Change-Id: I1066131b5b4c27ef9ec975bf80626e43c7082414 Signed-off-by: Radoslaw Czerski --- diff --git a/res/resource/ticker.edc b/res/resource/ticker.edc index b3698df..40071ef 100755 --- a/res/resource/ticker.edc +++ b/res/resource/ticker.edc @@ -90,7 +90,6 @@ collections } part { name: "bg"; - mouse_events: 1; type: RECT; clip_to: "clipper"; scale: 1; @@ -120,7 +119,6 @@ collections name: "icon"; type: SWALLOW; scale: 1; - mouse_events: 1; clip_to: "clipper"; description { state: "default" 0.0; @@ -168,8 +166,6 @@ collections part { name: "event"; type: RECT; - mouse_events: 1; - repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; @@ -192,26 +188,6 @@ collections transition: ACCEL 0.4; target: "bg"; } - program { - name: "clicked"; - signal: "mouse,clicked,1"; - source: "event"; - action: SIGNAL_EMIT "clicked" ""; - after: "effect_hide"; - } - program { - name: "effect_hide"; - signal: "effect,hide"; - source: "elm"; - action: STATE_SET "default" "0.0"; - transition: DECEL 0.4; - target: "bg"; - after: "hide"; - } - program { - name: "hide"; - action: SIGNAL_EMIT "request,hide" ""; - } } } } diff --git a/res/resource/ticker_default.edc b/res/resource/ticker_default.edc index f39f785..b56388c 100755 --- a/res/resource/ticker_default.edc +++ b/res/resource/ticker_default.edc @@ -28,7 +28,6 @@ name: NAME;\ type: SWALLOW;\ scale: 1;\ - mouse_events: 1;\ repeat_events: 1;\ description {\ state: "default" 0.0;\ @@ -54,7 +53,6 @@ name: NAME;\ type: SWALLOW;\ scale: 1;\ - mouse_events: 1;\ repeat_events: 1;\ description {\ state: "default" 0.0;\ @@ -91,7 +89,6 @@ collections { name: "base"; type: RECT; scale: 1; - mouse_events: 1; description { state: "default" 0.0; visible: 1; @@ -337,20 +334,6 @@ collections { target: "qp.handler.button"; target: "qp.handler.text"; } - program { - name: "handler.press"; - signal: "mouse,down,1"; - source: "qp.handler.bg"; - action: STATE_SET "pressed" 0.0; - target: "qp.handler.bg"; - } - program { - name: "handler.release"; - signal: "mouse,up,1"; - source: "qp.handler.bg"; - action: STATE_SET "default" 0.0; - target: "qp.handler.bg"; - } } } @@ -361,7 +344,6 @@ collections { name: "background"; type: SPACER; scale: 1; - mouse_events: 1; description { state: "default" 0.0; } @@ -423,7 +405,6 @@ collections { name: "background.touch"; type: SWALLOW; scale: 1; - mouse_events:1; description { state: "default" 0.0; fixed: 0 0; @@ -444,7 +425,6 @@ collections { type: SWALLOW; scale: 1; repeat_events: 1; - mouse_events:1; description { state: "default" 0.0; fixed: 0 0; @@ -491,12 +471,6 @@ collections { target: "qp.base.rect.setting"; target: "qp.base.setting.swallow"; } - program { - name: "background.touch"; - action: SIGNAL_EMIT "close.quickpanel" ""; - signal: "mouse,down,1"; - source: "background"; - } } } } diff --git a/src/ticker.c b/src/ticker.c index b71f9ff..5491048 100644 --- a/src/ticker.c +++ b/src/ticker.c @@ -739,27 +739,6 @@ static char *_ticker_get_text(notification_h noti, int is_screenreader, char **l return result; } -static void _noti_hide_cb(void *data, Evas_Object *obj, const char *emission, const char *source) -{ - ticker_info_s *ticker_info = NULL; - - ret_if(!data); - - ticker_info = data; - - if (ticker_info->timer) { - ecore_timer_del(ticker_info->timer); - ticker_info->timer = NULL; - } - - _destroy_ticker_noti(ticker_info); -} - -static void _mouse_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) -{ - _noti_hide_cb(data, NULL, NULL, NULL); -} - static void _content_changed_size_hints(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) { Evas_Coord h; @@ -1025,8 +1004,6 @@ static void _create_ticker_noti(notification_h noti, struct appdata *ad, ticker_ goto_if(ret == EINA_FALSE, ERROR); - elm_object_signal_callback_add(detail, "request,hide", "", _noti_hide_cb, ticker_info); - evas_object_event_callback_add(detail, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_cb, ticker_info); evas_object_size_hint_min_set(detail, 1, noti_height); _win_content_set(ad->ticker_win, detail); @@ -1290,6 +1267,11 @@ int ticker_init(void *data) { struct appdata *ad = data; + if (ad->ticker_win) { + _D("Ticker already exists - it was created before quickpanel run"); + return INDICATOR_ERROR_NONE; + } + ad->ticker_win = _create_ticker_window(NULL, ad); retv_if(!ad->ticker_win, 0);