ticker: Show ticker noti properly. 05/69105/2 accepted/tizen/mobile/20160520.141325 submit/tizen/20160513.094751 submit/tizen/20160518.092241 submit/tizen/20160520.072105
authorKamil Lipiszko <k.lipiszko@samsung.com>
Wed, 11 May 2016 13:30:42 +0000 (15:30 +0200)
committerLukasz Stanislawski <l.stanislaws@samsung.com>
Wed, 11 May 2016 14:23:05 +0000 (07:23 -0700)
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

res/resource/ticker.edc
src/ticker.c

index be157f8ebe0eb1cb5c564f4b745bc9572aa7b0ce..cf98aa08bba1d4f8ca5f5e2d4872e123b80f9e34 100755 (executable)
@@ -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;
index fbb5f5e0189dec2040f1cbcf2c124bebecf96f5c..3bf8e31c79de1e8c60ed2606d0e0fa66e53a9c50 100644 (file)
@@ -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, &noti_from_master);