TizenRefApp-7690 codestyle 19/99019/1 submit/tizen_3.0/20161121.160705
authorDenis Dolzhenko <d.dolzhenko@samsung.com>
Mon, 21 Nov 2016 13:01:14 +0000 (15:01 +0200)
committerDenis Dolzhenko <d.dolzhenko@samsung.com>
Mon, 21 Nov 2016 13:01:14 +0000 (15:01 +0200)
Change-Id: Ic8b216bd826085c19f115c080ef9eb6b4ad85cf4
Signed-off-by: Denis Dolzhenko <d.dolzhenko@samsung.com>
src/allowed-calls.c
src/app-details.c
src/common-efl.c
src/do-not-disturb-efl.c
src/excepted-apps-efl.c
src/lock_screen_content.c
src/main.c
src/notification-setting-info.c
src/set-schedule-info.c
src/sys_setting.c

index 01e474b..5f37800 100755 (executable)
@@ -109,8 +109,7 @@ static void popup_hide_cb(void *data, Evas_Object *obj, void *event_info)
 
 static char *gl_text_get_cb(void *data, Evas_Object *obj, const char *part)
 {
-    if(!strcmp(part, "elm.text"))
-    {
+    if (!strcmp(part, "elm.text")) {
         int index = (int)data;
         return strdup(APP_STRING(items[index]));
     }
@@ -123,13 +122,12 @@ static void popup_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)
     Evas_Object *popup = data;
     evas_object_del(popup);
 
-    if(check_state)
-    {
+    if (check_state) {
         int value = 0;
         notification_system_setting_get_dnd_allow_exceptions(get_system_setting(), NOTIFICATION_DND_ALLOWED_CALLS, &value);
-        if(value == NOTIFICATION_DND_ALLOWED_CALLS_CONTACT)
+        if (value == NOTIFICATION_DND_ALLOWED_CALLS_CONTACT)
             set_do_not_show_contact_popup_again(false);
-        else if(value == NOTIFICATION_DND_ALLOWED_CALLS_FAVORITE)
+        else if (value == NOTIFICATION_DND_ALLOWED_CALLS_FAVORITE)
             set_do_not_show_favorite_popup_again(false);
         else
             set_do_not_show_nobody_popup_again(false);
@@ -171,8 +169,7 @@ static void create_reject_calls_popup(const char *title_text, const char *conten
     /* layout */
     layout = elm_layout_add(popup);
     char *res_path = app_get_resource_path();
-    if(res_path)
-    {
+    if (res_path) {
         char edj_path[PATH_MAX] = { 0, };
         snprintf(edj_path, PATH_MAX, "%s%s", res_path, "edje/reject_calls_popup.edj");
         elm_layout_file_set(layout, edj_path, "popup_checkview_layout");
@@ -228,10 +225,10 @@ static void contacts_only_clicked()
     notification_system_setting_set_dnd_allow_exceptions(get_system_setting(), NOTIFICATION_DND_ALLOWED_CALLS, NOTIFICATION_DND_ALLOWED_CALLS_CONTACT);
     update_allowed_calls_item();
 
-    if(!is_existing_do_not_show_contact_popup_again())
+    if (!is_existing_do_not_show_contact_popup_again())
         set_do_not_show_contact_popup_again(true);
 
-    if(get_do_not_show_contact_popup_again())
+    if (get_do_not_show_contact_popup_again())
         create_reject_calls_popup("IDS_ST_HEADER_REJECT_CALLS_ABB2",
                 "IDS_ST_BODY_INCOMING_CALLS_FROM_CONTACTS_YOU_HAVE_NOT_ALLOWED_WILL_BE_REJECTED_AUTOMATICALLY");
 }
@@ -243,10 +240,10 @@ static void favorite_contacts_only_clicked()
     notification_system_setting_set_dnd_allow_exceptions(get_system_setting(), NOTIFICATION_DND_ALLOWED_CALLS, NOTIFICATION_DND_ALLOWED_CALLS_FAVORITE);
     update_allowed_calls_item();
 
-    if(!is_existing_do_not_show_favorite_popup_again())
+    if (!is_existing_do_not_show_favorite_popup_again())
         set_do_not_show_favorite_popup_again(true);
 
-    if(get_do_not_show_favorite_popup_again())
+    if (get_do_not_show_favorite_popup_again())
         create_reject_calls_popup("IDS_ST_HEADER_REJECT_CALLS_ABB2",
                 "IDS_ST_BODY_INCOMING_CALLS_FROM_CONTACTS_YOU_HAVE_NOT_ALLOWED_WILL_BE_REJECTED_AUTOMATICALLY");
 }
@@ -258,10 +255,10 @@ static void nobody_item_clicked()
     notification_system_setting_set_dnd_allow_exceptions(get_system_setting(), NOTIFICATION_DND_ALLOWED_CALLS, NOTIFICATION_DND_ALLOWED_CALLS_NOBODY);
     update_allowed_calls_item();
 
-    if(!is_existing_do_not_show_nobody_popup_again())
+    if (!is_existing_do_not_show_nobody_popup_again())
         set_do_not_show_nobody_popup_again(true);
 
-    if(get_do_not_show_nobody_popup_again())
+    if (get_do_not_show_nobody_popup_again())
         create_reject_calls_popup("IDS_ST_HEADER_REJECT_ALL_CALLS_ABB", "IDS_ST_POP_ALL_INCOMING_CALLS_WILL_BE_REJECTED_AUTOMATICALLY");
 }
 
@@ -272,8 +269,7 @@ static void gl_sel_cb(void *data, Evas_Object *obj, void *event_info)
     Elm_Object_Item *item = event_info;
 
     index = (int)elm_object_item_data_get(item);
-    switch (index)
-    {
+    switch (index) {
         case 0:
             everyone_item_clicked();
             break;
index 16f1eff..1d344f8 100644 (file)
@@ -21,8 +21,7 @@
 
 #define AMOUNT_OF_CONTENT_ITEMS 3
 
-typedef enum
-{
+typedef enum {
     APP_DETAILS_ALLOW_NOTI = 1,
     APP_DETAILS_GROUP_INDEX,
     APP_DETAILS_POPUP_NOTI,
@@ -71,21 +70,16 @@ static Eina_Bool popup_noti_status_get()
     notification_setting_h setting = NULL;
 
     int err = notification_setting_get_setting_by_package_name(g_app_info->appid, &setting);
-    if(err != NOTIFICATION_ERROR_NONE)
-    {
+    if (err != NOTIFICATION_ERROR_NONE) {
         NOTISET_ERR("notification_setting_get_setting_by_package_name [%d]\n", err);
-    }
-    else if(setting == NULL)
-    {
+    } else if (setting == NULL) {
         NOTISET_ERR("Notification setting is NULL\n");
-    }
-    else
-    {
+    } else {
         notification_setting_get_pop_up_notification(setting, &state);
         NOTISET_DBG("notification_setting_get_pop_up_notification [%d]\n", state);
     }
 
-    if(setting)
+    if (setting)
         notification_setting_free_notification(setting);
 
     return state;
@@ -97,25 +91,20 @@ static void popup_noti_status_set(Eina_Bool value)
     notification_setting_h setting = NULL;
 
     int err = notification_setting_get_setting_by_package_name(g_app_info->appid, &setting);
-    if(err != NOTIFICATION_ERROR_NONE)
-    {
+    if (err != NOTIFICATION_ERROR_NONE) {
         NOTISET_ERR("notification_setting_get_setting_by_package_name [%d]\n", err);
-    }
-    else if(setting == NULL)
-    {
+    } else if (setting == NULL) {
         NOTISET_ERR("Notification setting is NULL\n");
-    }
-    else
-    {
+    } else {
         notification_setting_set_pop_up_notification(setting, value);
         NOTISET_DBG("notification_setting_set_pop_up_notification [%d]\n", value);
 
         err = notification_setting_update_setting(setting);
-        if(err != NOTIFICATION_ERROR_NONE)
+        if (err != NOTIFICATION_ERROR_NONE)
             NOTISET_ERR("notification_setting_update_setting err[%d]\n", err);
     }
 
-    if(setting)
+    if (setting)
         notification_setting_free_notification(setting);
 }
 
@@ -151,21 +140,16 @@ static int noti_on_lock_screen_status_get()
     notification_setting_h setting = NULL;
 
     int err = notification_setting_get_setting_by_package_name(g_app_info->appid, &setting);
-    if(err != NOTIFICATION_ERROR_NONE)
-    {
+    if (err != NOTIFICATION_ERROR_NONE) {
         NOTISET_ERR("notification_setting_get_setting_by_package_name [%d]\n", err);
-    }
-    else if(setting == NULL)
-    {
+    } else if (setting == NULL) {
         NOTISET_ERR("Notification setting is NULL\n");
-    }
-    else
-    {
+    } else {
         notification_setting_get_lock_screen_content(setting, &level);
         NOTISET_DBG("notification_setting_get_lock_screen_content [%d]\n", level);
     }
 
-    if(setting)
+    if (setting)
         notification_setting_free_notification(setting);
 
     return level;
@@ -178,50 +162,39 @@ static char *app_details_gl_text_get_cb(void *data, Evas_Object *obj, const char
 
     switch (item) {
         case APP_DETAILS_ALLOW_NOTI:
-            if(!strcmp(part, "elm.text"))
-            {
+            if (!strcmp(part, "elm.text")) {
                 return strdup(APP_STRING("IDS_ST_MBODY_ALLOW_NOTIFICATIONS"));
             }
             break;
         case APP_DETAILS_GROUP_INDEX:
-            if(!strcmp(part, "elm.text"))
-            {
+            if (!strcmp(part, "elm.text")) {
                 return strdup(APP_STRING("IDS_ST_HEADER_ADVANCED_SETTINGS_ABB2"));
             }
             break;
         case APP_DETAILS_POPUP_NOTI:
-            if(!strcmp(part, "elm.text"))
-            {
+            if (!strcmp(part, "elm.text")) {
                 return strdup(APP_STRING("IDS_ST_MBODY_POP_UP_NOTIFICATIONS_ABB"));
-            }
-            else if(!strcmp(part, "elm.text.multiline"))
-            {
+            } else if (!strcmp(part, "elm.text.multiline")) {
                 return strdup(APP_STRING("IDS_ST_SBODY_SHOW_POP_UP_NOTIFICATIONS_AT_THE_TOP_OF_THE_SCREEN"));
             }
             break;
         case APP_DETAILS_APP_BADGE:
-            if(!strcmp(part, "elm.text"))
-            {
+            if (!strcmp(part, "elm.text")) {
                 return strdup(APP_STRING("IDS_ST_MBODY_APP_BADGES_ABB"));
-            }
-            else if(!strcmp(part, "elm.text.sub"))
-            {
+            } else if (!strcmp(part, "elm.text.sub")) {
                 return strdup(APP_STRING("IDS_ST_SBODY_SHOW_BADGES_ON_THE_APP_ICON"));
             }
             break;
         case APP_DETAILS_NOTI_ON_LOCK:
-            if(!strcmp(part, "elm.text"))
-            {
+            if (!strcmp(part, "elm.text")) {
                 return strdup(APP_STRING("IDS_QP_TMBODY_NOTIFICATIONS_ON_LOCK_SCREEN"));
-            }
-            else if(!strcmp(part, "elm.text.sub"))
-            {
+            } else if (!strcmp(part, "elm.text.sub")) {
                 int level = noti_on_lock_screen_status_get();
-                if(level == SHOW_ALL_CONTENT)
+                if (level == SHOW_ALL_CONTENT)
                     return strdup(APP_STRING("IDS_QP_OPT_SHOW_ALL_CONTENT_ABB"));
-                else if(level == HIDE_SENSITIVE_CONTENT)
+                else if (level == HIDE_SENSITIVE_CONTENT)
                     return strdup(APP_STRING("IDS_QP_OPT_HIDE_SENSITIVE_CONTENT_ABB"));
-                else if(level == DO_NOT_SHOW_NOTIFICATIONS)
+                else if (level == DO_NOT_SHOW_NOTIFICATIONS)
                     return strdup(APP_STRING("IDS_QP_OPT_DONT_SHOW_NOTIFICATIONS_ABB"));
             }
             break;
@@ -240,21 +213,17 @@ static Evas_Object *app_details_gl_content_get_cb(void *data, Evas_Object *obj,
 
     switch (item) {
         case APP_DETAILS_ALLOW_NOTI:
-            if(!strcmp(part, "elm.swallow.end"))
-            {
+            if (!strcmp(part, "elm.swallow.end")) {
                 check = create_on_off_check(obj);
                 elm_check_state_set(check, allow_noti_status_get());
                 evas_object_smart_callback_add(check, "changed", allow_noti_check_changed_cb, NULL);
                 return check;
-            }
-            else if(!strcmp(part, "elm.swallow.icon"))
-            {
+            } else if (!strcmp(part, "elm.swallow.icon")) {
                 return create_icon(obj, g_app_info->icon);
             }
             break;
         case APP_DETAILS_POPUP_NOTI:
-            if(!strcmp(part, "elm.swallow.end"))
-            {
+            if (!strcmp(part, "elm.swallow.end")) {
                 check = create_on_off_check(obj);
                 elm_check_state_set(check, popup_noti_status_get());
                 evas_object_smart_callback_add(check, "changed", popup_noti_check_changed_cb, NULL);
@@ -262,8 +231,7 @@ static Evas_Object *app_details_gl_content_get_cb(void *data, Evas_Object *obj,
             }
             break;
         case APP_DETAILS_APP_BADGE:
-            if(!strcmp(part, "elm.swallow.end"))
-            {
+            if (!strcmp(part, "elm.swallow.end")) {
                 check = create_on_off_check(obj);
                 elm_check_state_set(check, app_badge_status_get());
                 evas_object_smart_callback_add(check, "changed", app_badge_check_changed_cb, NULL);
@@ -288,8 +256,7 @@ static void popup_hide_cb(void *data, Evas_Object *obj, void *event_info)
 
 static char *gl_text_get_cb(void *data, Evas_Object *obj, const char *part)
 {
-    if(!strcmp(part, "elm.text"))
-    {
+    if (!strcmp(part, "elm.text")) {
         int index = (int)data;
         return strdup(APP_STRING(items[index]));
     }
@@ -298,15 +265,14 @@ static char *gl_text_get_cb(void *data, Evas_Object *obj, const char *part)
 
 static Evas_Object *gl_content_get_cb(void *data, Evas_Object *obj, const char *part)
 {
-    if(!strcmp(part, "elm.swallow.end"))
-    {
+    if (!strcmp(part, "elm.swallow.end")) {
         int index = (int)data;
         Evas_Object *radio = NULL;
         Evas_Object *radio_main = evas_object_data_get(obj, "radio");
         radio = elm_radio_add(obj);
         elm_radio_group_add(radio, radio_main);
         elm_radio_state_value_set(radio, index);
-        evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND,EVAS_HINT_EXPAND);
+        evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
         evas_object_size_hint_align_set(radio, EVAS_HINT_FILL, EVAS_HINT_FILL);
         return radio;
     }
@@ -330,18 +296,12 @@ static void gl_radio_sel_cb(void *data, Evas_Object *obj, void *event_info)
     elm_radio_value_set(radio, index);
 
     int err = notification_setting_get_setting_by_package_name(g_app_info->appid, &setting);
-    if(err != NOTIFICATION_ERROR_NONE)
-    {
+    if (err != NOTIFICATION_ERROR_NONE) {
         NOTISET_ERR("notification_setting_get_setting_by_package_name [%d]\n", err);
-    }
-    else if(setting == NULL)
-    {
+    } else if (setting == NULL) {
         NOTISET_ERR("Notification setting is NULL\n");
-    }
-    else
-    {
-        switch (index)
-        {
+    } else {
+        switch (index) {
             case 0:
                 level = SHOW_ALL_CONTENT;
                 break;
@@ -360,11 +320,11 @@ static void gl_radio_sel_cb(void *data, Evas_Object *obj, void *event_info)
         NOTISET_DBG("notification_setting_set_lock_screen_content [%d]\n", level);
 
         err = notification_setting_update_setting(setting);
-        if(err != NOTIFICATION_ERROR_NONE)
+        if (err != NOTIFICATION_ERROR_NONE)
             NOTISET_ERR("notification_setting_update_setting err[%d]\n", err);
     }
 
-    if(setting)
+    if (setting)
         notification_setting_free_notification(setting);
 
     elm_genlist_item_update(elm_genlist_last_item_get(get_app_ui_data()->list_sub));
@@ -406,8 +366,7 @@ static void show_noti_on_lock_popup()
     itc.func.del = NULL;
 
     int i = 0;
-    for (; i < AMOUNT_OF_CONTENT_ITEMS; i++)
-    {
+    for (; i < AMOUNT_OF_CONTENT_ITEMS; i++) {
         elm_genlist_item_append(genlist, &itc, (void *)i, NULL, ELM_GENLIST_ITEM_NONE, gl_radio_sel_cb, popup);
     }
 
@@ -426,18 +385,16 @@ static void app_details_gl_selected_cb(void *data, Evas_Object *obj EINA_UNUSED,
 {
     App_Details_Items detail = (App_Details_Items)data;
 
-    Elm_Object_Item *it = (Elm_Object_Item*)event_info;
+    Elm_Object_Item *it = (Elm_Object_Item *)event_info;
     elm_genlist_item_selected_set(it, EINA_FALSE);
 
-    if(detail == APP_DETAILS_NOTI_ON_LOCK)
-    {
+    if (detail == APP_DETAILS_NOTI_ON_LOCK) {
         show_noti_on_lock_popup();
         return;
     }
 
     Evas_Object *check = elm_object_item_part_content_get(it, "elm.swallow.end");
-    if(check)
-    {
+    if (check) {
         elm_check_state_set(check, !elm_check_state_get(check));
         evas_object_smart_callback_call(check, "changed", NULL);
     }
@@ -462,7 +419,7 @@ static void app_details_gl_append(Evas_Object *genlist, char *style, App_Details
                             ELM_GENLIST_ITEM_NONE,                 /* item type */
                             app_details_gl_selected_cb,            /* select smart callback */
                             (void *)item_name);                    /* smart callback user data */
-    if(style && !strcmp(style, "group_index"))
+    if (style && !strcmp(style, "group_index"))
         elm_genlist_item_select_mode_set(gen_item, ELM_OBJECT_SELECT_MODE_NONE);
     elm_genlist_item_class_free(itc);
 }
index 2d709d5..0ade813 100755 (executable)
 
 static ug_data *g_ug_data = NULL;
 
-ug_data* get_app_ui_data() {
+ug_data *get_app_ui_data()
+{
        return g_ug_data;
 }
 
-void set_app_ui_data(ug_data *data) {
+void set_app_ui_data(ug_data *data)
+{
        g_ug_data = data;
 }
 
@@ -98,46 +100,38 @@ Evas_Object *create_naviframe(Evas_Object *parent)
 
 void gl_selected_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
 {
-    Elm_Object_Item *it = (Elm_Object_Item*) event_info;
+    Elm_Object_Item *it = (Elm_Object_Item *) event_info;
     elm_genlist_item_selected_set(it, EINA_FALSE);
 
-    if(data)
-    {
+    if (data) {
         void *item_data = elm_object_item_data_get(it);
-        if(item_data && !strcmp(data, "app-notification-details"))
-        {
-            app_details_create_view(g_ug_data, (item_info_s*)item_data);
+        if (item_data && !strcmp(data, "app-notification-details")) {
+            app_details_create_view(g_ug_data, (item_info_s *)item_data);
             return;
         }
 
-        if(!strcmp(data, "set-schedule-multiline"))
-        {
+        if (!strcmp(data, "set-schedule-multiline")) {
             gl_set_schedule_selected(g_ug_data);
         }
 
-        if(!strcmp(data, "allowed-calls"))
-        {
+        if (!strcmp(data, "allowed-calls")) {
             gl_allowed_calls_selected();
         }
 
-        if(!strcmp(data, "start-time"))
-        {
+        if (!strcmp(data, "start-time")) {
             create_start_time_popup();
         }
-        if(!strcmp(data, "end-time"))
-        {
+        if (!strcmp(data, "end-time")) {
             create_end_time_popup();
         }
     }
 
     Evas_Object *check = elm_object_item_part_content_get(it, "elm.swallow.end");
-    if (!check)
-    {
+    if (!check) {
         check = elm_object_item_part_content_get(it, "elm.icon.right");
     }
 
-    if (check)
-    {
+    if (check) {
         elm_check_state_set(check, !elm_check_state_get(check));
         evas_object_smart_callback_call(check, "changed", NULL);
     }
@@ -153,12 +147,12 @@ void gl_del_cb(void *data, Evas_Object *obj EINA_UNUSED)
 {
 }
 
-Evas_Object* create_icon(Evas_Object *parent, char* icon)
+Evas_Object *create_icon(Evas_Object *parent, char *icon)
 {
        Evas_Object *img = elm_image_add(parent);
 
-       if(access(icon, F_OK) == -1) {
-               charres_path = app_get_resource_path();
+       if (access(icon, F_OK) == -1) {
+               char *res_path = app_get_resource_path();
                if (res_path) {
                        char buf[PATH_MAX] = {0, };
                        snprintf(buf, PATH_MAX, "%s%s", res_path, "images/unknown.png");
@@ -183,12 +177,12 @@ Evas_Object *create_on_off_check(Evas_Object *parent)
     return check;
 }
 
-Evas_Objectcreate_custom_layout(Evas_Object *parent, char* group_name)
+Evas_Object *create_custom_layout(Evas_Object *parent, char* group_name)
 {
     Evas_Object *layout = create_layout(parent);
     char edj_path[PATH_MAX] = {0, };
 
-    charres_path = app_get_resource_path();
+    char *res_path = app_get_resource_path();
     if (res_path) {
         snprintf(edj_path, PATH_MAX, "%s%s", res_path, "edje/setting_notification.edj");
         free(res_path);
@@ -205,48 +199,40 @@ static void _do_not_disturb_check_changed_cb(void *data, Evas_Object *obj, void
     Eina_Bool state = elm_check_state_get(obj);
     set_do_not_disturb(state);
     update_system_settings();
-    NOTISET_DBG("do_not_disturb check value = %s", state==false ? "FALSE":"TRUE");
+    NOTISET_DBG("do_not_disturb check value = %s", state == false ? "FALSE" : "TRUE");
 }
 
-static Evas_Objectgl_content_get_cb(void *data, Evas_Object *obj, const char *part)
+static Evas_Object *gl_content_get_cb(void *data, Evas_Object *obj, const char *part)
 {
     retv_if(!data, NULL);
 
     Evas_Object *content = NULL;
 
     item_info_s *data_list = data;
-    if(!strcmp(part, "elm.swallow.icon") || !strcmp(part, "elm.icon.left"))
-    {
-        if(data_list->item_style != ITEM_STYLE_RADIO)
-        {
+    if (!strcmp(part, "elm.swallow.icon") || !strcmp(part, "elm.icon.left")) {
+        if (data_list->item_style != ITEM_STYLE_RADIO) {
             Evas_Object *icon = create_icon(obj, data_list->icon);
             evas_object_show(icon);
             return icon;
         }
     }
 
-    if(!strcmp(part, "elm.swallow.end"))
-    {
-        if(data_list->item_style == ITEM_STYLE_TYPE_ONE)
-        {
+    if (!strcmp(part, "elm.swallow.end")) {
+        if (data_list->item_style == ITEM_STYLE_TYPE_ONE) {
             return NULL;
-        }
-        else if(data_list->item_style == ITEM_STYLE_DEFAULT)
-        {
+        } else if (data_list->item_style == ITEM_STYLE_DEFAULT) {
             content = create_on_off_check(obj);
             elm_check_state_set(content, data_list->do_not_disturb_except);
             evas_object_smart_callback_add(content, "changed", _excepted_check_changed_cb, data_list);
             return content;
-        }
-        else if(data_list->item_style == ITEM_STYLE_RADIO)
-        {
+        } else if (data_list->item_style == ITEM_STYLE_RADIO) {
             int count = data_list->index;
             Evas_Object *radio = NULL;
             Evas_Object *radio_main = evas_object_data_get(obj, "radio");
             radio = elm_radio_add(obj);
             elm_radio_group_add(radio, radio_main);
             elm_radio_state_value_set(radio, count);
-            evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND,EVAS_HINT_EXPAND);
+            evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
             evas_object_size_hint_align_set(radio, EVAS_HINT_FILL, EVAS_HINT_FILL);
             return radio;
         }
@@ -255,7 +241,7 @@ static Evas_Object* gl_content_get_cb(void *data, Evas_Object *obj, const char *
     return content;
 }
 
-static chargl_text_get_cb(void *data, Evas_Object *obj, const char *part)
+static char *gl_text_get_cb(void *data, Evas_Object *obj, const char *part)
 {
        item_info_s *data_list = data;
        retv_if(data_list == NULL, NULL);
@@ -279,8 +265,7 @@ static void gl_radio_sel_cb(void *data, Evas_Object *obj, void *event_info)
     radio = elm_object_item_part_content_get(it, "elm.swallow.end");
     elm_radio_value_set(radio, index);
 
-    switch (index)
-    {
+    switch (index) {
         case 0:
             show_all_content_clicked();
             break;
@@ -310,9 +295,8 @@ void append_gl_radio_item_list(Evas_Object *genlist, Eina_List* list, char *styl
     itc->func.content_get = gl_content_get_cb;
     itc->func.del = gl_del_cb;
 
-    while(list)
-    {
-        item = (item_info_s*)eina_list_data_get(list);
+    while (list) {
+        item = (item_info_s *)eina_list_data_get(list);
         item->index = count;
         item->item_style = ITEM_STYLE_RADIO;
         elm_genlist_item_append(genlist,                        /* genlist object */
@@ -332,7 +316,7 @@ void append_gl_radio_item_list(Evas_Object *genlist, Eina_List* list, char *styl
     gl_radio_sel_cb((void *)index, genlist, NULL);
 }
 
-void append_gl_item_list(Evas_Object *genlist, Eina_Listlist, int style, char *ugName)
+void append_gl_item_list(Evas_Object *genlist, Eina_List *list, int style, char *ugName)
 {
     NOTISET_TRACE_BEGIN;
 
@@ -343,9 +327,9 @@ void append_gl_item_list(Evas_Object *genlist, Eina_List* list, int style, char
        item_info_s *item;
        int count = 0;
 
-       if (style == ITEM_STYLE_TYPE_ONE){
+       if (style == ITEM_STYLE_TYPE_ONE) {
                itc->item_style = "type1";
-       } else if(style == ITEM_STYLE_ONE_ICON){
+       } else if (style == ITEM_STYLE_ONE_ICON) {
                itc->item_style = "one_icon";
        } else {
                itc->item_style = "default";
@@ -358,7 +342,7 @@ void append_gl_item_list(Evas_Object *genlist, Eina_List* list, int style, char
        NOTISET_DBG("count %d", count);
 
        while (list) {
-               item = (item_info_s*)eina_list_data_get(list);
+               item = (item_info_s *)eina_list_data_get(list);
                item->item_style = style;
                gen_item = elm_genlist_item_append(genlist,                         /* genlist object */
                                                                itc,                                                    /* item class */
@@ -379,29 +363,21 @@ static char *_gl_option_text_get_cb(void *data, Evas_Object *obj, const char *pa
        char buf[MAX_TEXT_SIZE] = {0,};
 
     retv_if(!data, NULL);
-    if(!strcmp(data, "do-not-disturb"))
-    {
-        if(!strcmp("elm.text.multiline", part))
-        {
+    if (!strcmp(data, "do-not-disturb")) {
+        if (!strcmp("elm.text.multiline", part)) {
             snprintf(buf, sizeof(buf), "<font_size=30>%s</font_size>", APP_STRING("IDS_ST_BODY_MUTE_ALL_ALERTS_AND_ONLY_SHOW_NOTIFICATIONS_IN_THE_NOTIFICATION_PANEL_ADD_APPS_BELOW_TO_ALLOW_EXCEPTIONS"));
             return strdup(buf);
         }
 
-        if(!strcmp(part, "elm.text"))
-        {
+        if (!strcmp(part, "elm.text")) {
             return strdup(APP_STRING("IDS_ST_HEADER_DO_NOT_DISTURB_ABB"));
         }
-    }
-    else if(!strcmp(data, "set-schedule-multiline"))
-    {
-        if(!strcmp("elm.text", part))
-        {
+    } else if (!strcmp(data, "set-schedule-multiline")) {
+        if (!strcmp("elm.text", part)) {
             return strdup(APP_STRING("IDS_ST_MBODY_SET_SCHEDULE_M_TIME"));
         }
-        if(!strcmp("elm.text.multiline", part))
-        {
-            if(get_schedule())
-            {
+        if (!strcmp("elm.text.multiline", part)) {
+            if (get_schedule()) {
                 int dndSchedule = load_dnd_schedule_day();
 
                 struct tm start_time;
@@ -410,78 +386,57 @@ static char *_gl_option_text_get_cb(void *data, Evas_Object *obj, const char *pa
 
                 snprintf(buf, sizeof(buf), "<font_size=30>%s<br/>%s</font_size>",
                         get_day_string(dndSchedule), get_time_string(&start_time, &end_time));
-            }
-            else
+            } else
                 snprintf(buf, sizeof(buf), "<font_size=30>%s</font_size>", APP_STRING("WDS_ST_ACBUTTON_OFF_ABB2"));
 
             return strdup(buf);
         }
-    }
-    else if(!strcmp(data, "set-schedule"))
-    {
-        if(!strcmp("elm.text", part))
-        {
+    } else if (!strcmp(data, "set-schedule")) {
+        if (!strcmp("elm.text", part)) {
             return strdup(APP_STRING("IDS_ST_MBODY_SET_SCHEDULE_M_TIME"));
         }
-    }
-    else if(!strcmp(data, "start-time") && !strcmp("elm.text", part))
-    {
+    } else if (!strcmp(data, "start-time") && !strcmp("elm.text", part)) {
         return strdup(APP_STRING("IDS_ST_BODY_START_TIME"));
-    }
-    else if(!strcmp(data, "end-time") && !strcmp("elm.text", part))
-    {
+    } else if (!strcmp(data, "end-time") && !strcmp("elm.text", part)) {
         return strdup(APP_STRING("IDS_ST_BODY_END_TIME"));
-    }
-    else if(!strcmp(data, "end-time") && !strcmp("elm.text.sub", part) && is_next_day())
-    {
+    } else if (!strcmp(data, "end-time") && !strcmp("elm.text.sub", part) && is_next_day()) {
         return strdup(APP_STRING("IDS_ST_SBODY_NEXT_DAY_M_LC_ABB"));
-    }
-    else if(!strcmp(data, "allowed-calls"))
-    {
-        if(!strcmp("elm.text.multiline", part))
-        {
+    } else if (!strcmp(data, "allowed-calls")) {
+        if (!strcmp("elm.text.multiline", part)) {
             snprintf(buf, sizeof(buf), "<font_size=30>%s</font_size>", APP_STRING(get_allowed_calls_string()));
             return strdup(buf);
         }
-        if(!strcmp("elm.text", part))
-        {
+        if (!strcmp("elm.text", part)) {
             return strdup(APP_STRING("IDS_ST_MBODY_ALLOWED_CALLS_ABB"));
         }
-    }
-    else if(!strcmp(data, "show-all-content"))
-    {
+    } else if (!strcmp(data, "show-all-content")) {
 
-        if(!strcmp("elm.text", part))
+        if (!strcmp("elm.text", part))
             return strdup("Picture.jpg");
-        else if(!strcmp("elm.text.sub", part))
+        else if (!strcmp("elm.text.sub", part))
             return strdup("Download complete");
-        else if(!strcmp("elm.text.sub.end", part))
+        else if (!strcmp("elm.text.sub.end", part))
             return strdup(APP_STRING("IDS_ST_HEADER_TIME"));
-    }
-    else if(!strcmp(data, "hide-sensitive-content"))
-    {
-        if(!strcmp("elm.text", part))
+    } else if (!strcmp(data, "hide-sensitive-content")) {
+        if (!strcmp("elm.text", part))
             return strdup("Download manager");
-        else if(!strcmp("elm.text.sub", part))
+        else if (!strcmp("elm.text.sub", part))
             return strdup(APP_STRING("IDS_ST_OPT_CONTENT_HIDDEN"));
-        else if(!strcmp("elm.text.sub.end", part))
+        else if (!strcmp("elm.text.sub.end", part))
             return strdup(APP_STRING("IDS_ST_BODY_DATE"));
-    }
-    else if(!strcmp(data, "blocked-noti"))
-    {
-        if(!strcmp("elm.text", part))
+    } else if (!strcmp(data, "blocked-noti")) {
+        if (!strcmp("elm.text", part))
             return strdup(APP_STRING("IDS_ST_HEADER_BLOCKED_NOTIFICATIONS_ABB"));
     }
 
        return NULL;
 }
 
-static Evas_Object_gl_option_content_get_cb(void *data, Evas_Object *obj, const char *part)
+static Evas_Object *_gl_option_content_get_cb(void *data, Evas_Object *obj, const char *part)
 {
     retv_if(!data, NULL);
 
-    if(!strcmp(data, "do-not-disturb") && !strcmp(part, "elm.swallow.end"))
-    {
+    if (!strcmp(data, "do-not-disturb") && !strcmp(part, "elm.swallow.end")) {
         Evas_Object *check = NULL;
         check = create_on_off_check(obj);
         elm_check_state_set(check, get_do_not_disturb());
@@ -489,26 +444,22 @@ static Evas_Object* _gl_option_content_get_cb(void *data, Evas_Object *obj, cons
         return check;
     }
 
-    if(!strcmp(data, "set-schedule") && !strcmp("elm.swallow.end", part))
-    {
+    if (!strcmp(data, "set-schedule") && !strcmp("elm.swallow.end", part)) {
         Evas_Object *check = create_on_off_check(obj);
         elm_check_state_set(check, get_schedule());
         evas_object_smart_callback_add(check, "changed", set_schedule_check_changed_cb, NULL);
         return check;
     }
 
-    if(!strcmp(data, "start-time") && !strcmp("elm.swallow.end", part))
-    {
+    if (!strcmp(data, "start-time") && !strcmp("elm.swallow.end", part)) {
         return start_end_time_item(obj, true);
     }
 
-    if(!strcmp(data, "end-time") && !strcmp("elm.swallow.end", part))
-    {
+    if (!strcmp(data, "end-time") && !strcmp("elm.swallow.end", part)) {
         return start_end_time_item(obj, false);
     }
 
-    if ((!strcmp(data, "hide-sensitive-content") || !strcmp(data, "show-all-content")) && !strcmp(part, "elm.swallow.icon"))
-    {
+    if ((!strcmp(data, "hide-sensitive-content") || !strcmp(data, "show-all-content")) && !strcmp(part, "elm.swallow.icon")) {
        return create_icon(obj, NULL);
     }
 
@@ -536,7 +487,7 @@ void append_gl_start_option(Evas_Object *genlist, char *style, char *ugName)
                             gl_selected_cb,             /* select smart callback */
                             ugName);                    /* smart callback user data */
 
-    if(style && !strcmp(style, "group_index"))
+    if (style && !strcmp(style, "group_index"))
         elm_genlist_item_select_mode_set(gen_item, ELM_OBJECT_SELECT_MODE_NONE);
     elm_genlist_item_class_free(itc);
 }
@@ -544,7 +495,7 @@ void append_gl_start_option(Evas_Object *genlist, char *style, char *ugName)
 void cancel_button_noti_ls_cb(void *data, Evas_Object *obj, void *event_info)
 {
     NOTISET_TRACE_BEGIN;
-    ug_datau_data = data;
+    ug_data *u_data = data;
     ret_if(!data);
     elm_naviframe_item_pop(u_data->naviframe);
 
@@ -577,22 +528,21 @@ void back_button_cb(void *data, Evas_Object *obj, void *event_info)
 /**
  * @brief This struct stands for helping to generate a full content-layout of item added  to genlist.
  */
-typedef struct
-{
+typedef struct {
     /**
      * A callback raised from genlist item class'es content_get callback that should create genlist
      * item's content.
      * */
-    Evas_Object *(*fullContentCb)(Evas_Objectparent, void *data);
+    Evas_Object *(*fullContentCb)(Evas_Object *parent, void *data);
     void *cbData; /**< User-data passed to fullContentCb.*/
 } full_content_data_s;
 
-static Evas_Object_gl_full_content_get_cb(void *data, Evas_Object *obj, const char *part)
+static Evas_Object *_gl_full_content_get_cb(void *data, Evas_Object *obj, const char *part)
 {
     retv_if(!data, NULL);
     full_content_data_s *content_data = (full_content_data_s *)data;
     if (!strcmp(part, "elm.swallow.content")) {
-        if(content_data->fullContentCb)
+        if (content_data->fullContentCb)
             return content_data->fullContentCb(obj, content_data->cbData);
     }
     return NULL;
@@ -610,8 +560,7 @@ void append_gl_full_item(Evas_Object *genlist, Evas_Object *(*fullContentCb)(Eva
     ret_if(!itc);
 
     full_content_data_s *data = calloc(1, sizeof(full_content_data_s));
-    if(!data)
-    {
+    if (!data) {
         elm_genlist_item_class_free(itc);
         return;
     }
index 672f2ba..d3a5cea 100755 (executable)
@@ -33,7 +33,7 @@
 #define APP_LAYOUT_HEADER ELM_SCALE_SIZE(95 + 64)
 #define ITEMS_PER_ROW 5
 
-void do_not_disturb_append_items_in_list(Evas_Objectgenlist)
+void do_not_disturb_append_items_in_list(Evas_Object *genlist)
 {
     append_gl_start_option(genlist, "multiline", "do-not-disturb");
     append_gl_start_option(genlist, "multiline", "set-schedule-multiline");
@@ -59,7 +59,7 @@ Evas_Object *do_not_disturb_allowed_apps_cont_cb(Evas_Object* parent, void *data
     evas_object_smart_callback_add(select_button, "clicked", exception_application_clicked_cb, ug_main);
     evas_object_show(select_button);
 
-    elm_object_part_content_set(full_layout, ALLOWED_LAYOUT_BUTTON_PART,select_button);
+    elm_object_part_content_set(full_layout, ALLOWED_LAYOUT_BUTTON_PART, select_button);
 
     retv_if(!data, full_layout);
     Eina_List *allowed_apps_list = (Eina_List *)data;
@@ -72,18 +72,16 @@ Evas_Object *do_not_disturb_allowed_apps_cont_cb(Evas_Object* parent, void *data
     evas_object_size_hint_min_set(table, 0, height);
 
     int row_number = 0;
-    while(allowed_apps_list)
-    {
+    while (allowed_apps_list) {
         int items_in_row = 0;
-        while(allowed_apps_list && items_in_row < ITEMS_PER_ROW)
-        {
-            item_info_s *item = (item_info_s*)eina_list_data_get(allowed_apps_list);
+        while (allowed_apps_list && items_in_row < ITEMS_PER_ROW) {
+            item_info_s *item = (item_info_s *)eina_list_data_get(allowed_apps_list);
             Evas_Object *app_layout = create_custom_layout(table, APP_LAYOUT_NAME);
 
             evas_object_show(app_layout);
             Evas_Object *icon = create_icon(app_layout, item->icon);
             evas_object_show(icon);
-            elm_object_part_content_set(app_layout, APP_LAYOUT_ICON_PART,icon);
+            elm_object_part_content_set(app_layout, APP_LAYOUT_ICON_PART, icon);
             elm_object_part_text_set(app_layout, APP_LAYOUT_TEXT_PART, item->name);
             elm_table_pack(table, app_layout, items_in_row, row_number, 1, 1);
 
@@ -93,7 +91,7 @@ Evas_Object *do_not_disturb_allowed_apps_cont_cb(Evas_Object* parent, void *data
         row_number++;
     }
 
-    elm_object_part_content_set(full_layout, ALLOWED_LAYOUT_GRID_PART,table);
+    elm_object_part_content_set(full_layout, ALLOWED_LAYOUT_GRID_PART, table);
 
     return full_layout;
 }
index 52a9b1f..fc6a285 100755 (executable)
@@ -30,7 +30,7 @@ static Eina_List *state_list = NULL;
 static bool is_list_main_need_to_be_update(item_info_s *app_data);
 static void _done_button_cb(void *data, Evas_Object *obj, void *event_info);
 
-static Evas_Object_create_edit_exception_apps_list(ug_data *ugd)
+static Evas_Object *_create_edit_exception_apps_list(ug_data *ugd)
 {
     Evas_Object *parent = ugd->naviframe;
     Evas_Object *genlist;
@@ -51,13 +51,10 @@ static Evas_Object* _create_edit_exception_apps_list(ug_data *ugd)
 
 static bool is_list_main_need_to_be_update(item_info_s *app_data)
 {
-    if(!state_list)
-    {
+    if (!state_list) {
         state_list = eina_list_append(state_list, app_data);
-    }
-    else
-    {
-        if(eina_list_data_find(state_list, app_data))
+    } else {
+        if (eina_list_data_find(state_list, app_data))
             state_list = eina_list_remove(state_list, app_data);
         else
             state_list = eina_list_append(state_list, app_data);
@@ -69,8 +66,7 @@ static bool is_list_main_need_to_be_update(item_info_s *app_data)
 static void cancel_changes()
 {
     NOTISET_TRACE_BEGIN;
-    while(state_list)
-    {
+    while (state_list) {
         item_info_s *app_data = eina_list_data_get(state_list);
         app_data->do_not_disturb_except = !app_data->do_not_disturb_except;
         state_list = eina_list_next(state_list);
@@ -79,7 +75,7 @@ static void cancel_changes()
 
 static void remove_state_list()
 {
-    if(state_list)
+    if (state_list)
         state_list = eina_list_free(state_list);
 }
 
@@ -106,8 +102,7 @@ static void _done_button_cb(void *data, Evas_Object *obj, void *event_info)
     EVAS_OBJECT_DELIF(u_data->cancel_button);
     EVAS_OBJECT_DELIF(u_data->list_sub);
 
-    if(u_data->list_main && is_need_to_update)
-    {
+    if (u_data->list_main && is_need_to_update) {
         update_do_not_disturb_application_list();
         elm_genlist_clear(u_data->list_main);
         do_not_disturb_append_items_in_list(u_data->list_main);
@@ -122,7 +117,7 @@ static void _done_button_cb(void *data, Evas_Object *obj, void *event_info)
 void _cancel_button_cb(void *data, Evas_Object *obj, void *event_info)
 {
     NOTISET_TRACE_BEGIN;
-    ug_datau_data = data;
+    ug_data *u_data = data;
     ret_if(!data);
 
     EVAS_OBJECT_DELIF(u_data->done_button);
@@ -135,7 +130,7 @@ void _cancel_button_cb(void *data, Evas_Object *obj, void *event_info)
 static Eina_Bool _back_button_cb(void *data, Elm_Object_Item *it)
 {
     NOTISET_TRACE_BEGIN;
-    if(is_need_to_update)
+    if (is_need_to_update)
         cancel_changes();
     return EINA_TRUE;
 }
@@ -143,10 +138,10 @@ static Eina_Bool _back_button_cb(void *data, Elm_Object_Item *it)
 void exception_application_clicked_cb(void *data, Evas_Object *obj, void *event_info)
 {
     NOTISET_TRACE_BEGIN;
-    ug_datau_data = data;
+    ug_data *u_data = data;
     ret_if(!u_data);
 
-    Elm_Object_Itemnavi_item = NULL;
+    Elm_Object_Item *navi_item = NULL;
     Evas_Object *cancel_btn = NULL;
     Evas_Object *done_btn = NULL;
 
index a984e1a..652eb9e 100644 (file)
@@ -26,7 +26,7 @@ void show_all_content_clicked()
 
     Elm_Object_Item *genlist_item = elm_genlist_first_item_get(ugd->list_sub);
 
-    if(genlist_item)
+    if (genlist_item)
         elm_genlist_clear(ugd->list_sub);
     g_lock_screen_content_level = SHOW_ALL_CONTENT;
     append_gl_start_option(ugd->list_sub, "type1", "show-all-content");
@@ -40,7 +40,7 @@ void hide_sensitive_content_clicked()
 
     Elm_Object_Item *genlist_item = elm_genlist_first_item_get(ugd->list_sub);
 
-    if(genlist_item)
+    if (genlist_item)
         elm_genlist_clear(ugd->list_sub);
     g_lock_screen_content_level = HIDE_SENSITIVE_CONTENT;
     append_gl_start_option(ugd->list_sub, "type1", "hide-sensitive-content");
index 9d517d4..eb452f5 100755 (executable)
@@ -37,8 +37,7 @@
 
 static void update_character_orientation();
 
-typedef enum
-{
+typedef enum {
        NOTIF_APP_TYPE,
        DO_NOT_DISTURB_APP_TYPE,
        NOTIFICATION_ON_LOCK_SCREEN_APP_TYPE
@@ -76,14 +75,14 @@ static Eina_Bool _notifiacation_setting_main_pop_cb(void *data, Elm_Object_Item
     NOTISET_TRACE_BEGIN;
        ug_data *ugd = (ug_data *) data;
        retv_if(!ugd, EINA_FALSE);
-       if(ugd->init_thread)
+       if (ugd->init_thread)
                ecore_thread_cancel(ugd->init_thread);
        ui_app_exit();
 
        return EINA_FALSE;
 }
 
-static Evas_Object_create_do_not_disturb_gl(ug_data *ugd)
+static Evas_Object *_create_do_not_disturb_gl(ug_data *ugd)
 {
        Evas_Object *parent = ugd->naviframe;
 
@@ -101,7 +100,7 @@ static Evas_Object* _create_do_not_disturb_gl(ug_data *ugd)
        return genlist;
 }
 
-Evas_Object_create_lockscreen_content(ug_data *ugd)
+Evas_Object *_create_lockscreen_content(ug_data *ugd)
 {
     Evas_Object *bg = create_background(ugd->naviframe);
     evas_object_size_hint_align_set(bg, EVAS_HINT_FILL, EVAS_HINT_FILL);
@@ -139,7 +138,7 @@ Evas_Object* _create_lockscreen_content(ug_data *ugd)
     return bg;
 }
 
-static void * _update_dnd_view(void *data)
+static void *_update_dnd_view(void *data)
 {
        ug_data *ugd = (ug_data *) data;
        ugd->list_main = _create_do_not_disturb_gl(ugd);
@@ -150,7 +149,7 @@ static void * _update_dnd_view(void *data)
 static void _init_dnd_app_list(void *data, Ecore_Thread *thread)
 {
        create_do_not_disturb_application_list();
-       //check if thread isn't pending cancellation
+       /* check if thread isn't pending cancellation */
        if (!ecore_thread_check(thread))
                ecore_main_loop_thread_safe_call_sync(_update_dnd_view, data);
 }
@@ -243,8 +242,7 @@ static Evas_Object *_create_fullview(Evas_Object *parent, ug_data *ugd, app_type
     NOTISET_TRACE_BEGIN;
     retv_if(!ugd, NULL);
 
-    switch(type)
-    {
+    switch (type) {
         case NOTIF_APP_TYPE:
             _create_notif_view(ugd);
             break;
@@ -306,8 +304,7 @@ static void on_app_control(app_control_h app_control, void *user_data)
 
     app_control_get_operation(app_control, &op_str);
 
-    if(!op_str)
-    {
+    if (!op_str) {
         NOTISET_DBG("app_control operation is null");
         return;
     }
@@ -315,12 +312,9 @@ static void on_app_control(app_control_h app_control, void *user_data)
     NOTISET_DBG("%s", op_str);
 
     app_type type = NOTIF_APP_TYPE;
-    if(strcmp(DO_NOT_DISTURB_OP, op_str) == 0)
-    {
+    if (strcmp(DO_NOT_DISTURB_OP, op_str) == 0) {
         type = DO_NOT_DISTURB_APP_TYPE;
-    }
-    else if(strcmp(NOTIFICATIONS_ON_LOCK_SCREEN_OP, op_str) == 0)
-    {
+    } else if (strcmp(NOTIFICATIONS_ON_LOCK_SCREEN_OP, op_str) == 0) {
         type = NOTIFICATION_ON_LOCK_SCREEN_APP_TYPE;
     }
 
@@ -334,17 +328,15 @@ static void update_character_orientation()
 {
     char *lang = NULL;
     system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &lang);
-    if(lang)
-    {
+    if (lang) {
         NOTISET_DBG("Language: %s", lang);
         elm_language_set(lang);
 
         i18n_ulocale_layout_type_e layout = I18N_ULOCALE_LAYOUT_UNKNOWN;
-        if(i18n_ulocale_get_character_orientation(lang, &layout) == I18N_ERROR_NONE)
-        {
-            if(layout == I18N_ULOCALE_LAYOUT_LTR)
+        if (i18n_ulocale_get_character_orientation(lang, &layout) == I18N_ERROR_NONE) {
+            if (layout == I18N_ULOCALE_LAYOUT_LTR)
                 elm_config_mirrored_set(false);
-            else if(layout == I18N_ULOCALE_LAYOUT_RTL)
+            else if (layout == I18N_ULOCALE_LAYOUT_RTL)
                 elm_config_mirrored_set(true);
             else
                 NOTISET_ERR("Unsupported character orientation type: %s", layout);
@@ -363,8 +355,7 @@ int main(int argc, char *argv[])
        NOTISET_TRACE_BEGIN;
 
        ug_data *ug_main = calloc(1, sizeof(ug_data));
-    if(!ug_main)
-    {
+    if (!ug_main) {
         NOTISET_ERR("CALLOC ERROR");
         ug_main = NULL;
         assert(false);
index 82dc1da..d2f8f0e 100755 (executable)
@@ -26,7 +26,7 @@ setting_info_s *setting_info = NULL;
 #define VOICE_CALL_PACKAGE "org.tizen.call-ui"
 #define CALENDAR_PACKAGE "org.tizen.calendar"
 #define MESSAGES_PACKAGE "org.tizen.message"
-// TODO: we have no clock on device, when it will be add, we will need to change package id
+/* TODO: we have no clock on device, when it will be add, we will need to change package id */
 #define CLOCK_PACKAGE "org.tizen.clock"
 
 void create_app_notification_list()
@@ -71,9 +71,8 @@ void create_app_notification_list()
 
             if (item_info->name && strcmp(package_name, VOICE_CALL_PACKAGE)
                                 && strcmp(package_name, CALENDAR_PACKAGE)
-                                && strcmp(package_name, CLOCK_PACKAGE))
-            {
-                if(item_info->allow_to_notify)
+                                && strcmp(package_name, CLOCK_PACKAGE)) {
+                if (item_info->allow_to_notify)
                     setting_info->apps_noti_allowed_list = eina_list_append(setting_info->apps_noti_allowed_list, item_info);
                 else
                     setting_info->apps_noti_blocked_list = eina_list_append(setting_info->apps_noti_blocked_list, item_info);
@@ -97,7 +96,7 @@ void update_app_notification_list_on_item(item_info_s *item_info)
 
     setting_info->apps_noti_allowed_list = eina_list_remove(setting_info->apps_noti_allowed_list, item_info);
     setting_info->apps_noti_blocked_list = eina_list_remove(setting_info->apps_noti_blocked_list, item_info);
-    if(get_allow_to_nofity(item_info->appid))
+    if (get_allow_to_nofity(item_info->appid))
         setting_info->apps_noti_allowed_list = eina_list_sorted_insert(setting_info->apps_noti_allowed_list, apps_sort_cb, item_info);
     else
         setting_info->apps_noti_blocked_list = eina_list_sorted_insert(setting_info->apps_noti_blocked_list, apps_sort_cb, item_info);
@@ -124,11 +123,9 @@ void create_do_not_disturb_application_list()
     NOTISET_DBG("count %d", count);
 
     item_info_s *item_info = NULL;
-    for(i = 0; i < count; i++)
-    {
+    for (i = 0; i < count; i++) {
         item_info = calloc(1, sizeof(item_info_s));
-        if(item_info)
-        {
+        if (item_info) {
             temp = setting_array + i;
 
             notification_setting_get_package_name(temp, &package_name);
@@ -142,43 +139,34 @@ void create_do_not_disturb_application_list()
 
             item_info->icon = get_app_icon(package_name);
 
-            if(!strcmp(package_name, CALENDAR_PACKAGE))
+            if (!strcmp(package_name, CALENDAR_PACKAGE))
                 item_info->name = strdup(APP_STRING("IDS_COM_BODY_CALENDAR_EVENTS"));
-            else if(!strcmp(package_name, CLOCK_PACKAGE))
+            else if (!strcmp(package_name, CLOCK_PACKAGE))
                 item_info->name = strdup(APP_STRING("IDS_ST_BODY_ALARMS"));
             else
                 item_info->name = get_app_name(package_name);
 
             item_info->index = i;
 
-            if(item_info->name)
-            {
-                if((allow_to_notify && !strcmp(package_name, MESSAGES_PACKAGE)) || !strcmp(package_name, CLOCK_PACKAGE)
-                                                                                || !strcmp(package_name, CALENDAR_PACKAGE) )
-                {
+            if (item_info->name) {
+                if ((allow_to_notify && !strcmp(package_name, MESSAGES_PACKAGE)) || !strcmp(package_name, CLOCK_PACKAGE)
+                                                                                || !strcmp(package_name, CALENDAR_PACKAGE)) {
                     setting_info->first_allowed_list = eina_list_append(setting_info->first_allowed_list, item_info);
-                    if(do_not_disturb_except)
-                    {
+                    if (do_not_disturb_except) {
                         setting_info->first_excepted_list = eina_list_append(setting_info->first_excepted_list, item_info);
                     }
                 }
 
-                if(allow_to_notify && strcmp(package_name, MESSAGES_PACKAGE)
+                if (allow_to_notify && strcmp(package_name, MESSAGES_PACKAGE)
                                    && strcmp(package_name, CALENDAR_PACKAGE)
-                                   && strcmp(package_name, CLOCK_PACKAGE))
-                {
-                    if(do_not_disturb_except)
-                    {
+                                   && strcmp(package_name, CLOCK_PACKAGE)) {
+                    if (do_not_disturb_except) {
                         setting_info->excepted_list = eina_list_append(setting_info->excepted_list, item_info);
-                    }
-                    else
-                    {
+                    } else {
                         setting_info->not_excepted_list = eina_list_append(setting_info->not_excepted_list, item_info);
                     }
                 }
-            }
-            else
-            {
+            } else {
                 FREEIF(package_name);
                 FREEIF(item_info->name);
                 FREEIF(item_info->icon);
@@ -204,20 +192,18 @@ void update_do_not_disturb_application_list()
     Eina_List *sub_list = NULL;
 
     Eina_List *list = get_first_allowed_apps_list();
-    while(list)
-    {
-        item_info_s *item = (item_info_s*) eina_list_data_get(list);
-        if(item->do_not_disturb_except)
+    while (list) {
+        item_info_s *item = (item_info_s *) eina_list_data_get(list);
+        if (item->do_not_disturb_except)
             setting_info->first_excepted_list = eina_list_append(setting_info->first_excepted_list, item);
 
         list = eina_list_next(list);
     }
 
     list = get_excepted_apps_list();
-    while(list)
-    {
-        item_info_s *item = (item_info_s*) eina_list_data_get(list);
-        if(item->do_not_disturb_except)
+    while (list) {
+        item_info_s *item = (item_info_s *) eina_list_data_get(list);
+        if (item->do_not_disturb_except)
             sub_list = eina_list_append(sub_list, item);
         else
             setting_info->not_excepted_list = eina_list_sorted_insert(setting_info->not_excepted_list, apps_sort_cb, item);
@@ -228,10 +214,9 @@ void update_do_not_disturb_application_list()
 
     list = get_not_excepted_apps_list();
     sub_list = NULL;
-    while(list)
-    {
-        item_info_s *item = (item_info_s*)eina_list_data_get(list);
-        if(item->do_not_disturb_except)
+    while (list) {
+        item_info_s *item = (item_info_s *)eina_list_data_get(list);
+        if (item->do_not_disturb_except)
             setting_info->excepted_list = eina_list_sorted_insert(setting_info->excepted_list, apps_sort_cb, item);
         else
             sub_list = eina_list_append(sub_list, item);
@@ -432,16 +417,14 @@ out:
 
 }
 
-static void _remove_apps_list(Eina_Listinput_list)
+static void _remove_apps_list(Eina_List *input_list)
 {
     NOTISET_TRACE_BEGIN;
     item_info_s *item_info = NULL;
 
-    if(input_list)
-    {
+    if (input_list) {
         EINA_LIST_FREE(input_list, item_info)
         {
-//            NOTISET_DBG("remove %s", item_info->name);
             FREEIF(item_info->appid);
             FREEIF(item_info->name);
             FREEIF(item_info->icon);
@@ -453,21 +436,22 @@ static void _remove_apps_list(Eina_List* input_list)
 void remove_lower_noti_list()
 {
     NOTISET_TRACE_BEGIN;
-    if(setting_info)
+    if (setting_info)
         _remove_apps_list(setting_info->lower_noti_list);
 }
 
-void remove_apps_noti_allowed_list() {
+void remove_apps_noti_allowed_list()
+{
     NOTISET_TRACE_BEGIN;
-    if(setting_info) {
+    if (setting_info) {
         _remove_apps_list(setting_info->apps_noti_allowed_list);
     }
 }
 
-void remove_apps_noti_blocked_list() {
+void remove_apps_noti_blocked_list()
+{
     NOTISET_TRACE_BEGIN;
-    if(setting_info)
-    {
+    if (setting_info) {
         _remove_apps_list(setting_info->apps_noti_blocked_list);
     }
 }
@@ -475,8 +459,7 @@ void remove_apps_noti_blocked_list() {
 void remove_excepted_apps_list()
 {
     NOTISET_TRACE_BEGIN;
-    if(setting_info)
-    {
+    if (setting_info) {
         _remove_apps_list(setting_info->first_excepted_list);
         _remove_apps_list(setting_info->excepted_list);
         _remove_apps_list(setting_info->first_allowed_list);
@@ -487,8 +470,7 @@ void remove_excepted_apps_list()
 void update_apps_settings_info()
 {
     NOTISET_TRACE_BEGIN;
-    if(setting_info)
-    {
+    if (setting_info) {
         Eina_List *first_list = eina_list_merge(setting_info->first_allowed_list, setting_info->excepted_list);
         setting_info->first_allowed_list = NULL;
         setting_info->excepted_list = NULL;
@@ -497,9 +479,8 @@ void update_apps_settings_info()
         first_list = NULL;
         setting_info->not_excepted_list = NULL;
 
-        while(list)
-        {
-            item_info_s *item = (item_info_s*)eina_list_data_get(list);
+        while (list) {
+            item_info_s *item = (item_info_s *)eina_list_data_get(list);
             set_excepted_apps(item->appid, item->do_not_disturb_except);
             list = eina_list_next(list);
         }
index 0b14cf6..7514eee 100755 (executable)
 #include <utils_i18n_udate.h>
 #include <utils_i18n_ucalendar.h>
 
-enum TimeFormat
-    {
-        time_format_unknown,
-        time_format_24H,
-        time_format_12H
-    };
+enum TimeFormat {
+    time_format_unknown,
+    time_format_24H,
+    time_format_12H
+};
 
 #define POPUP_TIME_12_FORMAT "%d/%b/%Y %I:%M %p"
 #define TIME_12_FORMAT "%I:%M %p"
@@ -59,16 +58,14 @@ enum TimeFormat
 #define GREEN_TEXT_MAIN "<color=#b3b3b3>%s</color>"
 #define GREY_TEXT_MAIN "<color=#97e57b>%s</color>"
 
-typedef struct changecolor
-{
+typedef struct changecolor {
     dnd_schedule_week_flag_e week;
     const char *text;
     bool change_color;
     Evas_Object *label;
 } changecolor_s;
 
-typedef struct datetime
-{
+typedef struct datetime {
     Evas_Object *button;
     Evas_Object *datetime;
     Evas_Object *popup;
@@ -97,7 +94,7 @@ static Evas_Object *create_start_end_time_layout(Evas_Object* parent);
 static void close_set_schedule_cb(void *data, Evas_Object *obj, void *event_info);
 static void make_color_text(int dayCode, dnd_schedule_week_flag_e week_day, const char *text, char* outBuf);
 static void save_dnd_weekday(int dayCode);
-static bool same_time(struct tm* timeA, struct tm* timeB);
+static bool same_time(struct tm *timeA, struct tm *timeB);
 static void create_popup(datetime_s *dt);
 static bool is_empty_str(const char *str);
 static int safe_str_len(const char *str);
@@ -162,20 +159,16 @@ static char *get_timezone()
     char buf[DEF_BUF_LEN] = {0,};
     ssize_t len = readlink("/opt/etc/localtime", buf, sizeof(buf) - 1);
 
-    if (len != -1)
-    {
+    if (len != -1) {
         buf[len] = '\0';
-    }
-    else
-    {
+    } else {
         NOTISET_ERR("Getting default timezone failed, use system settings value");
 
         char res[MAX_CHAR_LEN] = {0,};
         char *time_zone = NULL;
 
         system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_TIMEZONE, &time_zone);
-        if(time_zone)
-        {
+        if (time_zone) {
             strncpy(res, time_zone, safe_str_len(time_zone));
             free(time_zone);
         }
@@ -212,14 +205,13 @@ static char *get_formatted_date(const char *locale, const char *best_pattern, ti
         NOTISET_ERR("default timezone set error");
 
     /* convert time_t to UDate, if it is */
-    if(time)
+    if (time)
         date = (i18n_udate)time * 1000;
     else
         i18n_ucalendar_get_now(&date);
 
     status = get_date_format(locale, u_best_pattern, &date_format);
-    if(status == I18N_ERROR_NONE)
-    {
+    if (status == I18N_ERROR_NONE) {
         /* get formatted string */
         i18n_udate_format_date(date_format, date, formatted, formatted_capacity, NULL, &formatted_length);
         /* convert uchar to char */
@@ -235,8 +227,7 @@ static char *make_time_string(time_t curr_time)
     NOTISET_TRACE_BEGIN;
     char *lang = NULL;
     system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &lang);
-    if(lang)
-    {
+    if (lang) {
         struct tm msgTimeTm;
         localtime_r(&curr_time, &msgTimeTm);
         const char *time_format = get_time_format() == time_format_12H  ? TIME_12H : TIME_24H;
@@ -257,15 +248,13 @@ bool load_dnd_schedule_time(struct tm *start_time_out, struct tm *end_time_out)
     end_time_p.saved_time.tm_sec = 0;
 
     notification_system_setting_dnd_schedule_get_start_time(get_system_setting(), &start_time_p.saved_time.tm_hour, &start_time_p.saved_time.tm_min);
-    if(start_time_p.saved_time.tm_hour == 0 && start_time_p.saved_time.tm_min == 0)
-    {
+    if (start_time_p.saved_time.tm_hour == 0 && start_time_p.saved_time.tm_min == 0) {
         start_time_p.saved_time.tm_hour = 22;
         notification_system_setting_dnd_schedule_set_start_time(get_system_setting(), start_time_p.saved_time.tm_hour, start_time_p.saved_time.tm_min);
     }
 
     notification_system_setting_dnd_schedule_get_end_time(get_system_setting(), &end_time_p.saved_time.tm_hour, &end_time_p.saved_time.tm_min);
-    if(end_time_p.saved_time.tm_hour == 0 && end_time_p.saved_time.tm_min == 0)
-    {
+    if (end_time_p.saved_time.tm_hour == 0 && end_time_p.saved_time.tm_min == 0) {
         end_time_p.saved_time.tm_hour = 8;
         notification_system_setting_dnd_schedule_set_start_time(get_system_setting(), end_time_p.saved_time.tm_hour, end_time_p.saved_time.tm_min);
     }
@@ -288,18 +277,15 @@ const char *get_time_string(struct tm *start_time, struct tm *end_time)
     buff_start = make_time_string(mktime(start_time));
     buff_end = make_time_string(mktime(end_time));
 
-    if(buff_start && buff_end)
-    {
+    if (buff_start && buff_end) {
         snprintf(buff, TIME_STRING_SIZE, "%s ~ %s %s", buff_start, buff_end, is_next_day() ? APP_STRING("IDS_ST_SBODY_NEXT_DAY_M_LC_ABB") : "");
     }
 
-    if(buff_start)
-    {
+    if (buff_start) {
         free(buff_start);
         buff_start = NULL;
     }
-    if(buff_end)
-    {
+    if (buff_end) {
         free(buff_end);
         buff_end = NULL;
     }
@@ -310,7 +296,7 @@ const char *get_time_string(struct tm *start_time, struct tm *end_time)
 static void make_color_text(int dayCode, dnd_schedule_week_flag_e week_day, const char *text, char* outBuf)
 {
     char formattedDay[DAY_MAX_LENGTH] = { 0 };
-    if((dayCode & week_day) == 0)
+    if ((dayCode & week_day) == 0)
         snprintf(formattedDay, DAY_MAX_LENGTH, GREEN_TEXT_MAIN, text);
     else
         snprintf(formattedDay, DAY_MAX_LENGTH, GREY_TEXT_MAIN, text);
@@ -372,8 +358,7 @@ static void enable_time_items(bool enable)
     unsigned int i = 1;
     unsigned int size = elm_genlist_items_count(ug_main->list_sub);
     Elm_Object_Item *item = elm_genlist_first_item_get(ug_main->list_sub);
-    for(; i < size; ++i)
-    {
+    for (; i < size; ++i) {
         Elm_Object_Item *next = elm_genlist_item_next_get(item);
         elm_object_item_disabled_set(next, !enable);
         item = next;
@@ -396,7 +381,7 @@ int get_time_format()
 {
     NOTISET_TRACE_BEGIN;
     bool timeFormat = false;
-    if(system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, &timeFormat) < 0)
+    if (system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, &timeFormat) < 0)
         return time_format_unknown;
     return timeFormat ? time_format_24H : time_format_12H;
 }
@@ -430,8 +415,7 @@ static Evas_Object *create_week_repeat_layout(Evas_Object* parent)
     Evas_Object *layout = elm_layout_add(parent);
 
     char *res_path = app_get_resource_path();
-    if(res_path)
-    {
+    if (res_path) {
         char edj_path[PATH_MAX] = { 0, };
         snprintf(edj_path, PATH_MAX, "%s%s", res_path, "edje/repeat_weekly_item.edj");
         elm_layout_file_set(layout, edj_path, "weekly_item");
@@ -450,7 +434,7 @@ static void save_dnd_weekday(int dayCode)
     notification_system_setting_dnd_schedule_set_day(get_system_setting(), dayCode);
 }
 
-static bool same_time(struct tm* timeA, struct tm* timeB)
+static bool same_time(struct tm *timeA, struct tm *timeB)
 {
     time_t t1 = mktime(timeA);
     time_t t2 = mktime(timeB);
@@ -459,7 +443,7 @@ static bool same_time(struct tm* timeA, struct tm* timeB)
 
 static void save_date_time(datetime_s *dt)
 {
-    if(dt->saved_time.tm_hour == start_time_p.saved_time.tm_hour && dt->saved_time.tm_min == start_time_p.saved_time.tm_min)
+    if (dt->saved_time.tm_hour == start_time_p.saved_time.tm_hour && dt->saved_time.tm_min == start_time_p.saved_time.tm_min)
         notification_system_setting_dnd_schedule_set_start_time(get_system_setting(), dt->saved_time.tm_hour, dt->saved_time.tm_min);
     else
         notification_system_setting_dnd_schedule_set_end_time(get_system_setting(), dt->saved_time.tm_hour, dt->saved_time.tm_min);
@@ -473,14 +457,11 @@ static void week_button_clicked_cb(void *data, Evas_Object *obj, void *event_inf
     changecolor_s *cc = data;
     char buf[BUTTON_TEXT_SIZE] = {0, };
 
-    if(cc->change_color)
-    {
+    if (cc->change_color) {
         new_dnd_schedule_weekday ^= cc->week;
         snprintf(buf, sizeof(buf), GREEN_TEXT_COLOR, cc->text);
         elm_object_text_set(cc->label, buf);
-    }
-    else
-    {
+    } else {
         new_dnd_schedule_weekday |= cc->week;
         snprintf(buf, sizeof(buf), GREY_TEXT_COLOR, cc->text);
         elm_object_text_set(cc->label, buf);
@@ -493,7 +474,7 @@ static void week_button_clicked_cb(void *data, Evas_Object *obj, void *event_inf
 
 static Evas_Object *create_week_button(Evas_Object *parent, const char *text, dnd_schedule_week_flag_e week)
 {
-    //add buttons
+    /*add buttons*/
     char buf[BUTTON_TEXT_SIZE] = {0, };
     Evas_Object *button = elm_button_add(parent);
     evas_object_size_hint_max_set(button, WEEK_BUTTON_SIZE, WEEK_BUTTON_SIZE);
@@ -505,20 +486,17 @@ static Evas_Object *create_week_button(Evas_Object *parent, const char *text, dn
     evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
 
     changecolor_s *cc = calloc(1, sizeof(changecolor_s));
-    if(!cc)
+    if (!cc)
         return NULL;
 
     cc->week = week;
     cc->label = label;
     cc->text = text;
 
-    if((default_dnd_schedule_weekday & week) == 0)
-    {
+    if ((default_dnd_schedule_weekday & week) == 0) {
         snprintf(buf, sizeof(buf), GREEN_TEXT_COLOR, text);
         cc->change_color = false;
-    }
-    else
-    {
+    } else {
         snprintf(buf, sizeof(buf), GREY_TEXT_COLOR, text);
         cc->change_color = true;
     }
@@ -536,7 +514,7 @@ static Evas_Object *repeat_weekly_layout_cb(Evas_Object* parent, void *data)
 {
     Evas_Object *layout = create_week_repeat_layout(parent);
     char buf[MAX_TEXT_SIZE] = {0, };
-    // Set text into layout
+    /* Set text into layout */
     Evas_Object *text = elm_label_add(layout);
     elm_label_ellipsis_set(text, EINA_TRUE);
     evas_object_size_hint_weight_set(text, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -581,14 +559,13 @@ static void popup_set_btn_clicked_cb(void *data , Evas_Object *obj , void *event
 
     elm_datetime_value_get(dt->datetime, &dt->saved_time);
 
-    if(dt->is_start_time)
+    if (dt->is_start_time)
         notification_system_setting_dnd_schedule_set_start_time(get_system_setting(), dt->saved_time.tm_hour, dt->saved_time.tm_min);
     else
         notification_system_setting_dnd_schedule_set_end_time(get_system_setting(), dt->saved_time.tm_hour, dt->saved_time.tm_min);
 
     buff = make_time_string(mktime(&dt->saved_time));
-    if(buff)
-    {
+    if (buff) {
         elm_object_text_set(dt->button, buff);
         free(buff);
         buff = NULL;
@@ -637,7 +614,7 @@ static void create_popup(datetime_s *dt)
     char *format = get_time_format() == time_format_12H ? TIME_12_FORMAT : TIME_24_FORMAT;
     bool fmt12hours = !strcmp(format, TIME_12_FORMAT);
     const char *fmt = fmt12hours ? TIME_12_LAYOUT : TIME_24_LAYOUT;
-    const chartimeMask = fmt12hours ? POPUP_TIME_12_FORMAT : POPUP_TIME_24_FORMAT;
+    const char *timeMask = fmt12hours ? POPUP_TIME_12_FORMAT : POPUP_TIME_24_FORMAT;
 
     elm_object_style_set(dt->datetime, fmt);
     elm_datetime_format_set(dt->datetime, timeMask);
@@ -688,8 +665,7 @@ static Evas_Object *create_start_end_time_layout(Evas_Object* parent)
     Evas_Object *layout = elm_layout_add(parent);
 
     char *res_path = app_get_resource_path();
-    if(res_path)
-    {
+    if (res_path) {
         char edj_path[PATH_MAX] = { 0, };
         snprintf(edj_path, PATH_MAX, "%s%s", res_path, "edje/time_button_layout.edj");
         elm_layout_file_set(layout, edj_path, "button_layout");
@@ -702,9 +678,9 @@ static Evas_Object *create_start_end_time_layout(Evas_Object* parent)
     return layout;
 }
 
-Evas_Object* start_end_time_item(Evas_Object* parent, bool is_start_time_item)
+Evas_Object *start_end_time_item(Evas_Object *parent, bool is_start_time_item)
 {
-    Evas_Objectlayout = create_start_end_time_layout(parent);
+    Evas_Object *layout = create_start_end_time_layout(parent);
     char *buff = NULL;
     datetime_s dt;
     time_t local_time = time(0);
@@ -714,33 +690,26 @@ Evas_Object* start_end_time_item(Evas_Object* parent, bool is_start_time_item)
     dt.saved_time = *time_info;
     dt.saved_time.tm_sec = 0;
 
-    if(is_start_time_item)
-    {
+    if (is_start_time_item) {
         notification_system_setting_dnd_schedule_get_start_time(get_system_setting(), &dt.saved_time.tm_hour, &dt.saved_time.tm_min);
         start_time_p = dt;
-    }
-    else
-    {
+    } else {
         notification_system_setting_dnd_schedule_get_end_time(get_system_setting(), &dt.saved_time.tm_hour, &dt.saved_time.tm_min);
         end_time_p = dt;
     }
 
     char *timeFormat = get_time_format() == time_format_12H ? TIME_12_FORMAT : TIME_24_FORMAT;
-    if(is_start_time_item)
-    {
+    if (is_start_time_item) {
         buff = make_time_string(mktime(&start_time_p.saved_time));
         NOTISET_DBG("start_time_p = %s", buff);
         start_time_p.button = create_time_button(layout, buff, timeFormat, &start_time_p);
-    }
-    else
-    {
+    } else {
         buff = make_time_string(mktime(&end_time_p.saved_time));
         NOTISET_DBG("ent_time_p = %s", buff);
         end_time_p.button = create_time_button(layout, buff, timeFormat, &end_time_p);
     }
 
-    if(buff)
-    {
+    if (buff) {
         free(buff);
         buff = NULL;
     }
@@ -751,27 +720,24 @@ static void close_set_schedule_cb(void *data, Evas_Object *obj, void *event_info
 {
     NOTISET_TRACE_BEGIN;
     ret_if(!data);
-    ug_data *ugd = (ug_data*)data;
+    ug_data *ugd = (ug_data *)data;
     bool update_ui = false;
-    if(new_dnd_schedule_weekday != default_dnd_schedule_weekday)
-    {
+    if (new_dnd_schedule_weekday != default_dnd_schedule_weekday) {
         save_dnd_weekday(new_dnd_schedule_weekday);
         update_ui = true;
     }
 
-    if(!same_time(&start_time_p.saved_time, &start_time_p.default_time))
-    {
+    if (!same_time(&start_time_p.saved_time, &start_time_p.default_time)) {
         save_date_time(&start_time_p);
         update_ui = true;
     }
 
-    if(!same_time(&end_time_p.saved_time, &end_time_p.default_time))
-    {
+    if (!same_time(&end_time_p.saved_time, &end_time_p.default_time)) {
         save_date_time(&end_time_p);
         update_ui = true;
     }
 
-    if(update_ui)
+    if (update_ui)
         elm_genlist_item_update(elm_genlist_item_next_get(elm_genlist_first_item_get(ugd->list_main)));
 
     elm_naviframe_item_pop(ugd->naviframe);
index 7dc2421..b380ec0 100644 (file)
@@ -24,7 +24,7 @@ static void load_system_setting();
 notification_system_setting_h get_system_setting()
 {
     NOTISET_TRACE_BEGIN;
-    if(!system_setting)
+    if (!system_setting)
         load_system_setting();
 
     return system_setting;
@@ -34,13 +34,12 @@ void update_system_settings()
 {
     NOTISET_TRACE_BEGIN;
     int err = NOTIFICATION_ERROR_NONE;
-    if(system_setting)
-    {
+    if (system_setting) {
         err = notification_system_setting_update_system_setting(system_setting);
         if (err != NOTIFICATION_ERROR_NONE)
             NOTISET_ERR("notification_setting_update_setting [%d]\n", err);
 
-        if(system_setting)
+        if (system_setting)
             notification_system_setting_free_system_setting(system_setting);
 
         system_setting = NULL;
@@ -49,13 +48,11 @@ void update_system_settings()
 
 static void load_system_setting()
 {
-    if(!system_setting)
-    {
+    if (!system_setting) {
         int err = notification_system_setting_load_system_setting(&system_setting);
-        if(err != NOTIFICATION_ERROR_NONE|| system_setting == NULL)
-        {
+        if (err != NOTIFICATION_ERROR_NONE || system_setting == NULL) {
             NOTISET_ERR("notification_system_setting_load_system_setting failed [%d]\n", err);
-            if(system_setting)
+            if (system_setting)
                 notification_system_setting_free_system_setting(system_setting);
 
             system_setting = NULL;