From: Kamil Lipiszko Date: Wed, 11 May 2016 13:30:42 +0000 (+0200) Subject: ticker: Show ticker noti properly. X-Git-Tag: submit/tizen/20160513.094751^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F05%2F69105%2F2;p=profile%2Fmobile%2Fapps%2Fnative%2Findicator.git ticker: Show ticker noti properly. Additional fixes: Do not show noti when display is locked. Move icon and message a little higher to not cut g,y,p and etc. Change-Id: I55ec5fb3fe71676c299c4254e7cd3760750c6336 --- diff --git a/res/resource/ticker.edc b/res/resource/ticker.edc index be157f8..cf98aa0 100755 --- a/res/resource/ticker.edc +++ b/res/resource/ticker.edc @@ -130,7 +130,7 @@ collections align: 0.0 0.5; rel1 { - relative: 0.0 0.5; + relative: 0.0 0.3; to: "base"; offset: 6 0; } @@ -156,7 +156,7 @@ collections relative: 1.0 0.0; to_x: "icon"; to_y: "base"; - offset: 10 3; + offset: 10 0; } rel2 { relative: 1.0 0.9; diff --git a/src/ticker.c b/src/ticker.c index fbb5f5e..3bf8e31 100644 --- a/src/ticker.c +++ b/src/ticker.c @@ -957,6 +957,7 @@ static Evas_Object *_create_ticker_window(Evas_Object *parent, struct appdata *a elm_win_autodel_set(win, EINA_TRUE); efl_util_set_notification_window_level(win, EFL_UTIL_NOTIFICATION_LEVEL_HIGH); elm_win_prop_focus_skip_set(win, EINA_TRUE); + elm_win_role_set(win, "notification-normal"); /* This is for rotation issue */ e = evas_object_evas_get(win); @@ -1297,6 +1298,7 @@ static void _ticker_noti_detailed_changed_cb(void *data, notification_type_e typ int applist = NOTIFICATION_DISPLAY_APP_ALL; int op_type = 0; int priv_id = 0; + int lock_state = SYSTEM_SETTINGS_LOCK_STATE_UNLOCK; int ret; ret_if(!ad); @@ -1308,6 +1310,10 @@ static void _ticker_noti_detailed_changed_cb(void *data, notification_type_e typ /* FIXME : num_op can be more than 1 */ ret_if(num_op > 1); + ret = system_settings_get_value_int(SYSTEM_SETTINGS_KEY_LOCK_STATE, &lock_state); + if (ret != SYSTEM_SETTINGS_ERROR_NONE || lock_state == SYSTEM_SETTINGS_LOCK_STATE_LOCK) + return; + notification_op_get_data(op_list, NOTIFICATION_OP_DATA_TYPE, &op_type); notification_op_get_data(op_list, NOTIFICATION_OP_DATA_PRIV_ID, &priv_id); notification_op_get_data(op_list, NOTIFICATION_OP_DATA_NOTI, ¬i_from_master);