Fix coding style errors 85/123685/2
authorAbhishek Sansanwal <abhishek.s94@samsung.com>
Thu, 13 Apr 2017 07:24:00 +0000 (12:54 +0530)
committerAbhishek Sansanwal <abhishek.s94@samsung.com>
Thu, 13 Apr 2017 07:24:00 +0000 (12:54 +0530)
Signed-off-by: Abhishek Sansanwal <abhishek.s94@samsung.com>
Change-Id: I5d27248a8b10fd786658bd1da96e60f1a84dbb8f

25 files changed:
include/app_debug.h
include/common/gridmgr.h
include/common/listmgr.h
include/data/system/data_wired.h
include/view/common/view_generic_popup.h
src/common/gridmgr.c
src/common/listmgr.c
src/common/menumgr.c
src/common/utils.c
src/data/settings_picture.c
src/data/system/data_wired.c
src/data/system/settings_clock.c
src/data/system/settings_voice_control.c
src/layout/layout_network.c
src/layout/layout_picture.c
src/layout/layout_system.c
src/main.c
src/view/common/view_generic_popup.c
src/view/picture/view_picture_slider_generic.c
src/view/system/view_clock.c
src/view/system/view_clock_mode.c
src/view/system/view_language.c
src/view/system/view_voice_control.c
src/view/view_base.c
src/view/view_new_network.c

index 389c4d5..71328e0 100644 (file)
@@ -65,34 +65,34 @@ extern long int _timens();
 #define SETTING_TRACE_SECURE_DEBUG(fmt, arg...) \
        do {\
                SECURE_LOGD("\033[0;32mDEBUG[%ld]: " fmt "\033[0m\n", _timens(), ##args));\
-       }while(0);
+       } while (0);
 
 #define SETTING_TRACE_DEBUG(fmt, arg...) \
        do {\
                SECURE_LOGD("\033[0;32mDEBUG[%ld]:: " fmt "\033[0m\n", _timens(), ##arg);\
-       }while(0);
+       } while (0);
 
 #define SETTING_TRACE(fmt, arg...) \
        do {\
                SECURE_LOGI("\033[0;36m[%ld]:" fmt "\033[0m\n", _timens(), ##arg);\
-       }while(0);
+       } while (0);
 
 #define SETTING_TRACE_WARNING(fmt, arg...) \
        do {\
                SECURE_LOGI("\033[0;33mWARRING[%ld]: " fmt "\033[0m\n", _timens(), ##arg);\
-       }while(0);
+       } while (0);
 
 #define SETTING_TRACE_ERROR(fmt, arg...) \
        do {\
                SECURE_LOGE("\033[0;31mERROR[%ld]: " fmt "\033[0m\n", _timens(), ##arg);\
-       }while(0);
+       } while (0);
 #define SETTING_TRACE_BEGIN do {\
                SECURE_LOGD("\033[0;35mENTER FUNCTION[%ld]: %s. \033[0m\n", _timens(), __FUNCTION__);\
-       }while(0);
+       } while (0);
 
 #define SETTING_TRACE_END  do {\
                SECURE_LOGD("\033[0;35mEXIT FUNCTION[%ld]: %s. \033[0m\n", _timens(), __FUNCTION__);\
-       }while(0);
+       } while (0);
 #else
 #define SETTING_TRACE(fmt, arg...)
 #define SETTING_TRACE_SECURE_DEBUG(fmt, arg...)
index ee8e674..d9f2377 100644 (file)
@@ -30,7 +30,7 @@ struct grid_class {
        char *(*text_get)(void *data, Evas_Object *obj, const char *part);
        Evas_Object *(*content_get)(void *data, Evas_Object *obj,
                        const char *part);
-       Eina_Bool (*state_get)(void *data, Evas_Object *obj, const char *part);
+       Eina_Bool(*state_get)(void *data, Evas_Object *obj, const char *part);
        void (*del)(void *data, Evas_Object *obj);
 };
 
index a7d4f93..9095823 100644 (file)
@@ -110,16 +110,16 @@ bool listmgr_hide_grid(struct listmgr *listmgr, const char *list_id,
                const char *part);
 
 /**
- * @brief      Set next focused object to the list (grid) in specified direction.
- * @param[in]  listmgr                 List manager handle
- * @param[in]  list_id                 ID of list
- * @param[in]  obj_to_focus    Object which should be focused in specified direction to list.
- *                             If set to NULL no next object will be focused in specified direction (focus is
- *                             set back to the list)
- * @param[in]  dir                             Direction
- * @param[in]  add_reverse_link        Should reverse direction be added?
- * @param[in]  reverse_dir             Reverse direction
- */
+* @brief       Set next focused object to the list (grid) in specified direction.
+* @param[in]   listmgr                 List manager handle
+* @param[in]   list_id                 ID of list
+* @param[in]   obj_to_focus    Object which should be focused in specified direction to list.
+                             If set to NULL no next object will be focused in specified direction (focus is
+                             set back to the list)
+* @param[in]   dir                             Direction
+* @param[in]   add_reverse_link        Should reverse direction be added?
+* @param[in]   reverse_dir             Reverse direction
+*/
 void listmgr_set_list_next_focus(struct listmgr *listmgr, const char *list_id,
                Evas_Object *obj_to_focus, Elm_Focus_Direction dir,
                Eina_Bool add_reverse_link, Elm_Focus_Direction reverse_dir);
@@ -130,7 +130,7 @@ void listmgr_set_list_next_focus(struct listmgr *listmgr, const char *list_id,
 * @param listmgr A list manager pointer.
 * @param list_id Unique existing list identifier.
 *
-* @return 
+* @return
 */
 bool listmgr_update_grid(struct listmgr *listmgr, const char *list_id);
 
index 6387365..8fa8acf 100644 (file)
@@ -51,55 +51,55 @@ struct _connection_data {
 };
 
 /**
-* @brief 
+* @brief
 *
 * @param data
 *
-* @return 
+* @return
 */
 int get_wired_network_status(struct _connection_data *data);
 
 /**
-* @brief 
+* @brief
 *
 * @param data
 *
-* @return 
+* @return
 */
 bool get_ethernet_profile(struct _connection_data *data);
 
 /**
-* @brief 
+* @brief
 *
 * @param data
 *
-* @return 
+* @return
 */
 bool update_ethernet_profile_dhcp(struct _connection_data *data);
 
 /**
-* @brief 
+* @brief
 *
 * @param data
 *
-* @return 
+* @return
 */
 bool update_ethernet_profile_manual(struct _connection_data *data);
 
 /**
-* @brief 
+* @brief
 *
 * @param data
 * @param event_cb
 * @param cb_data
 *
-* @return 
+* @return
 */
 bool wired_connection_init(struct _connection_data **data,
                void (*event_cb)(enum event_type type, void *data), void *cb_data);
 
 /**
-* @brief 
+* @brief
 *
 * @param data
 */
index d9b892a..f08c9ec 100644 (file)
@@ -25,8 +25,7 @@
 /**
 * @brief Available types of generic popups.
 */
-typedef enum
-{
+typedef enum {
        POPUP_TYPE_BUTTONS_LIST = 0
 } popup_type_t;
 
index c1c095d..8c4de6a 100644 (file)
@@ -180,9 +180,8 @@ bool gridmgr_replace_list(struct gridmgr *gmgr, const char *grid_id,
                it = elm_gengrid_item_append(gitem->obj, gitem->ic, data,
                                NULL, NULL);
                elm_object_item_data_set(it, data);
-               if (item_found && data == item_data_to_find) {
+               if (item_found && data == item_data_to_find)
                        *item_found = it;
-               }
        }
 
        return true;
index f24207e..705708d 100755 (executable)
@@ -400,9 +400,8 @@ void listmgr_set_list_next_focus(struct listmgr *listmgr, const char *list_id,
 
        elm_object_focus_next_object_set(linfo->grid, obj_to_focus, dir);
 
-       if (add_reverse_link) {
+       if (add_reverse_link)
                elm_object_focus_next_object_set(obj_to_focus, linfo->grid, reverse_dir);
-       }
 }
 
 bool listmgr_hide_grid(struct listmgr *listmgr, const char *list_id,
index e0fc6d0..47de08a 100755 (executable)
@@ -75,7 +75,7 @@ static void _key_down_cb(int id, void *data, Evas *e, Evas_Object *obj,
                                m->info[id]->selected(m->data, id);
 
                if ((!strcmp(ev->keyname, KEY_MENU) || !strcmp(ev->keyname, KEY_MENU_WAY)
-                               ||!strcmp(ev->keyname, KEY_MENU_EMULATOR)) &&
+                               || !strcmp(ev->keyname, KEY_MENU_EMULATOR)) &&
                                m->info[id]->selected_menu)
                        m->info[id]->selected_menu(m->data, id);
        }
@@ -159,10 +159,10 @@ void menumgr_update(struct menumgr *m)
                                } else {
                                        str_copy = strdup(str);
                                        token = strtok_r(str, delimiters, &save_ptr);
-                                       if(token) {
+                                       if (token) {
                                                strncpy(value_str, token, sizeof(value_str)-1);
                                                token = strtok_r(NULL, delimiters, &save_ptr);
-                                               if(token) {
+                                               if (token) {
                                                        elm_object_part_text_set(m->btn[i], PART_MENU_MIN_VALUE, value_str);
                                                        strncpy(value_str, token, sizeof(value_str)-1);
                                                        elm_object_part_text_set(m->btn[i], PART_MENU_MAX_VALUE, value_str);
@@ -236,11 +236,10 @@ struct menumgr *menumgr_create(Evas_Object *table, Evas_Object *tab_menu_btn,
                if (info[i].progress_value) {
                                info[i].progress_evas = utils_add_progressbar(btn, PART_MENU_PROGRESS, STYLE_IMAGE_PROGRESS_BAR);
 
-                               if (!info[i].progress_evas) {
+                               if (!info[i].progress_evas)
                                        _ERR("Add progress bar failed.");
-                               } else {
+                               else
                                        elm_progressbar_value_set(info[i].progress_evas, info[i].progress_value());
-                               }
                }
 
                inputmgr_add_callback(btn, info[i].id, &_handler, m);
@@ -261,7 +260,6 @@ struct menumgr *menumgr_create(Evas_Object *table, Evas_Object *tab_menu_btn,
        return m;
 }
 
-
 void menumgr_destroy(struct menumgr *m)
 {
        SETTING_TRACE_BEGIN;
index 2ecf786..fade325 100755 (executable)
 #include "define.h"
 
 
-long int _timens() {
+long int _timens()
+{
        struct timespec start;
-       clock_gettime( CLOCK_REALTIME, &start);
+       clock_gettime(CLOCK_REALTIME, &start);
        return start.tv_nsec;
 }
 
index 4802f8b..051b6c6 100644 (file)
@@ -146,36 +146,40 @@ float settings_picture_get_tint_relative(void)
 
 void settings_picture_set_contrast_update_callbacks(void *data)
 {
-       if (data) {
+       /*
+       if (data)
                //@TODO: set needed callbacks
-       } else {
+       else
                //@TODO: unset previously set callbacks
-       }
+       */
 }
 
 void settings_picture_set_brightness_update_callbacks(void *data)
 {
-       if (data) {
+       /*
+       if (data)
                //@TODO: set needed callbacks
-       } else {
+       else
                //@TODO: unset previously set callbacks
-       }
+       */
 }
 
 void settings_picture_set_color_update_callbacks(void *data)
 {
-       if (data) {
+       /*
+       if (data)
                //@TODO: set needed callbacks
-       } else {
+       else
                //@TODO: unset previously set callbacks
-       }
+       */
 }
 
 void settings_picture_set_tint_update_callbacks(void *data)
 {
-       if (data) {
+       /*
+       if (data)
                //@TODO: set needed callbacks
-       } else {
+       else
                //@TODO: unset previously set callbacks
-       }
+       */
 }
index b24714a..d58f76c 100755 (executable)
@@ -122,7 +122,7 @@ bool update_ethernet_profile_dhcp(struct _connection_data *data)
        connection_profile_h profile;
        int rv;
 
-       if (!data || !data->conn ||!data->profile)
+       if (!data || !data->conn || !data->profile)
                return false;
 
        profile = data->profile;
@@ -153,7 +153,7 @@ bool update_ethernet_profile_manual(struct _connection_data *data)
        char *address = NULL;
        int rv;
 
-       if (!data || !data->conn ||!data->profile)
+       if (!data || !data->conn || !data->profile)
                return false;
 
        profile = data->profile;
@@ -302,16 +302,14 @@ bool wired_connection_init(struct _connection_data **data,
        } else {
                rv = connection_profile_set_state_changed_cb(conn->profile,
                        _profile_changed_cb, conn);
-               if (CONNECTION_ERROR_NONE != rv) {
+               if (CONNECTION_ERROR_NONE != rv)
                        _ERR("Failed to set profile state callback !");
-               }
        }
 
        rv = connection_set_ethernet_cable_state_chaged_cb(conn->conn,
                _ethernet_cable_changed_cb, conn);
-       if (CONNECTION_ERROR_NONE != rv) {
+       if (CONNECTION_ERROR_NONE != rv)
                _ERR("Failed to set ethernet cable state callback !");
-       }
 
        conn->event_cb = event_cb;
        conn->cb_data = cb_data;
index ed84643..5e77b63 100755 (executable)
@@ -38,11 +38,10 @@ bool settings_clock_is_24h_set(bool *h24)
 
 bool settings_clock_set_24h(bool h24)
 {
-       if (h24) {
+       if (h24)
                return (0 == vconf_set_int(VCONFKEY_REGIONFORMAT_TIME1224, VCONFKEY_TIME_FORMAT_24));
-       } else {
+       else
                return (0 == vconf_set_int(VCONFKEY_REGIONFORMAT_TIME1224, VCONFKEY_TIME_FORMAT_12));
-       }
 }
 
 bool settings_clock_is_time_automatic(bool *automatic)
@@ -115,9 +114,8 @@ char *_get_str_from_icu(const char *pattern)
 
        if (locale[0] != '\0') {
                p = strstr(locale, ".UTF-8");
-               if (p) {
+               if (p)
                        *p = 0;
-               }
        }
 
        char *ret_str = NULL;
@@ -154,18 +152,16 @@ char *settings_clock_get_clock_status_str()
        if (!settings_clock_is_time_automatic(&automatic))
                return NULL;
 
-       if (automatic) {
+       if (automatic)
                return strdup(STR_AUTO);
-       }
 
-       if (!settings_clock_is_24h_set(&is24h)) {
+       if (!settings_clock_is_24h_set(&is24h))
                _ERR("Cannot get 24h setting");
-       }
 
        if (is24h) {
                _DBG("is24h is TRUE");
                return _get_str_from_icu("dd/MM/y HH:mm");
-       } 
+       }
 
        _DBG("is24h is FALSE");
        return _get_str_from_icu("dd/MM/y hh:mm a");
@@ -179,7 +175,7 @@ char *settings_clock_get_clock_status_str()
        bool is24h = false;
        time_t timer;
        char str_buffer[MAX_DATETIME_LENGTH];
-       struct tm* tm_info,time_info;
+       struct tm* tm_info, time_info;
 
        if (!settings_clock_is_time_automatic(&automatic))
                return NULL;
@@ -188,19 +184,17 @@ char *settings_clock_get_clock_status_str()
                return strdup(STR_AUTO);
        } else {
                time(&timer);
-               
-               tm_info = localtime_r(&timer,&time_info);
 
-               if (!settings_clock_is_24h_set(&is24h)) {
+               tm_info = localtime_r(&timer, &time_info);
+
+               if (!settings_clock_is_24h_set(&is24h))
                        _ERR("Cannot get 24h setting");
-               }
 
 #if 0
-               if (is24h) {
+               if (is24h)
                        strftime(str_buffer, MAX_DATETIME_LENGTH, "%x %H:%M", tm_info);
-               } else {
+               else
                        strftime(str_buffer, MAX_DATETIME_LENGTH, "%x %I:%M %p", tm_info);
-               }
 #else
                if (is24h) {
                        _DBG("is24h is TRUE");
@@ -208,7 +202,7 @@ char *settings_clock_get_clock_status_str()
                } else {
                        _DBG("is24h is FALSE");
                        strftime(str_buffer, MAX_DATETIME_LENGTH, "%d/%m/%Y %I:%M", tm_info);
-                       strncat(str_buffer, (tm_info->tm_hour>=12)? " pm":" am",3);
+                       strncat(str_buffer, (tm_info->tm_hour >= 12) ? " pm" : " am", 3);
                }
 
 #endif
index a651859..2ffe46b 100755 (executable)
@@ -62,8 +62,7 @@ char *settings_voice_control_status_str(void)
        int ret = VC_ERROR_NONE;
        bool on_off = false;
 
-       if (!vc_initialised)
-       {
+       if (!vc_initialised) {
                ret = vc_setting_initialize();
                if (VC_ERROR_NONE != ret) {
                        _ERR("VC init error: %s", get_error_message(ret));
@@ -79,11 +78,10 @@ char *settings_voice_control_status_str(void)
                return strdup("");
        }
 
-       if (on_off) {
+       if (on_off)
                return strdup(_("IDS_ST_BODY_ON"));
-       } else {
+       else
                return strdup(_("IDS_ST_BODY_OFF"));
-       }
 }
 
 static void _voice_control_changed_cb(bool enabled, void *data)
@@ -140,9 +138,8 @@ static void *_create(void (*event_cb)(enum event_type type, void *data),
        }
 
        ret = vc_setting_set_auto_language(true);
-       if (VC_ERROR_NONE != ret) {
+       if (VC_ERROR_NONE != ret)
                _DBG("VC set auto language error: %s", get_error_message(ret));
-       }
 
        ret = vc_setting_set_enabled_changed_cb(_voice_control_changed_cb , priv);
        if (VC_ERROR_NONE != ret) {
@@ -177,9 +174,8 @@ static bool _destroy(void *data)
                return false;
 
        ret =  vc_setting_unset_enabled_changed_cb();
-       if (VC_ERROR_NONE != ret) {
+       if (VC_ERROR_NONE != ret)
                _ERR("VC unset callback error: %s", get_error_message(ret));
-       }
 
        priv->voice_control_is_on = eina_list_free(priv->voice_control_is_on);
        free(priv);
index e59d6e4..890691b 100644 (file)
@@ -204,7 +204,7 @@ static void _network_type_option_key_down_cb(int id, void *data, Evas *e,
        priv = data;
 
        if (!strcmp(ev->keyname, KEY_BACK) || !strcmp(ev->keyname, KEY_BACK_WAY)
-               ||!strcmp(ev->keyname, KEY_ESC) || !strcmp(ev->keyname, KEY_ESC_WAY)
+               || !strcmp(ev->keyname, KEY_ESC) || !strcmp(ev->keyname, KEY_ESC_WAY)
        )
                _destroy_network_type_popup(priv);
        else if (!strcmp(ev->keyname, KEY_ENTER))
@@ -323,7 +323,7 @@ static void _retry_wired_network(struct _priv *priv)
                        STR_WIRED_PROGRESS);
 
        /* If custom option is set, update connection profile */
-       _DBG("Update status : [%s]", (data->result)?"True":"False");
+       _DBG("Update status : [%s]", (data->result) ? "True" : "False");
        _DBG("         type : [%d]", data->network_type);
        if (data->result) {
                if (data->network_type == WIRED_TYPE_AUTOMATIC) {
@@ -420,7 +420,7 @@ static void _grid_realized_cb(int id, void *data, Evas_Object *obj,
 
        ap_info = (struct wifi_manager_ap_info*)elm_object_item_data_get(item);
        if (ap_info) {
-               switch(ap_info->signal_level) {
+               switch (ap_info->signal_level) {
                case SIGNAL_LEVEL_1:
                        elm_object_item_signal_emit(item, "wifi_signal_level,1", SRC_ELM);
                        break;
@@ -850,11 +850,10 @@ static void _popup_entry_key_down_cb(void *data, Evas *e, Evas_Object *obj, void
                return;
 
        len = strlen(str);
-       if (len >= MIN_WIRELESS_LEN) {
+       if (len >= MIN_WIRELESS_LEN)
                elm_object_disabled_set(priv->popup_btn2, EINA_FALSE);
-       } else {
+       else
                elm_object_disabled_set(priv->popup_btn2, EINA_TRUE);
-       }
 }
 
 static void _imf_commit_event_cb(void *data, Ecore_IMF_Context *ctx, void *event_info)
@@ -871,11 +870,10 @@ static void _imf_commit_event_cb(void *data, Ecore_IMF_Context *ctx, void *event
                return;
 
        len = strlen(buf);
-       if (len >= MIN_WIRELESS_LEN) {
+       if (len >= MIN_WIRELESS_LEN)
                elm_object_disabled_set(priv->popup_btn2, EINA_FALSE);
-       } else {
+       else
                elm_object_disabled_set(priv->popup_btn2, EINA_TRUE);
-       }
 }
 
 static void _imf_delete_event_cb(void *data, Ecore_IMF_Context *ctx, void *event_info)
@@ -1201,7 +1199,7 @@ static bool _create(layoutmgr *lmgr, void *data)
        listmgr_add_inner_grid_cb(priv->listmgr, LIST_WIRELESS,
                        &_grid_input_handler, priv);
 
-       if(data) {
+       if (data) {
                listmgr_set_list_next_focus(priv->listmgr, LIST_WIRELESS,
                                (Evas_Object *)data, ELM_FOCUS_UP, EINA_FALSE, ELM_FOCUS_DOWN);
 
@@ -1297,14 +1295,14 @@ static void _update(void *layout_data, int update_type, void *data)
        }
 
        switch (update_type) {
-               case UPDATE_DISABLE:
-                       elm_object_disabled_set(priv->ly, EINA_TRUE);
-                       break;
-               case UPDATE_ENABLE:
-                       elm_object_disabled_set(priv->ly, EINA_FALSE);
-                       break;
-               default:
-                       break;
+       case UPDATE_DISABLE:
+               elm_object_disabled_set(priv->ly, EINA_TRUE);
+               break;
+       case UPDATE_ENABLE:
+               elm_object_disabled_set(priv->ly, EINA_FALSE);
+               break;
+       default:
+               break;
        }
 }
 
index edfcd53..ca5e653 100644 (file)
@@ -175,8 +175,7 @@ static char *_get_tint(void *data, int id)
 
 static void _selected(void *data, int id)
 {
-       switch (id)
-       {
+       switch (id) {
        case MENU_CONTRAST:
                if (!viewmgr_push_view(VIEW_PICTURE_CONTRAST))
                        _ERR("Push Picture contrast view failed.");
@@ -343,16 +342,16 @@ static void _update(void *layout_data, int update_type, void *data)
        }
 
        switch (update_type) {
-               case UPDATE_DISABLE:
-                       elm_object_disabled_set(priv->ly, EINA_TRUE);
-                       break;
-               case UPDATE_ENABLE:
-                       elm_object_disabled_set(priv->ly, EINA_FALSE);
-                       break;
-               case UPDATE_CONTENT:
-                       menumgr_update(priv->menu);
-                       break;
-               default:
-                       break;
+       case UPDATE_DISABLE:
+               elm_object_disabled_set(priv->ly, EINA_TRUE);
+               break;
+       case UPDATE_ENABLE:
+               elm_object_disabled_set(priv->ly, EINA_FALSE);
+               break;
+       case UPDATE_CONTENT:
+               menumgr_update(priv->menu);
+               break;
+       default:
+               break;
        }
 }
index 01c7a09..6244bf0 100755 (executable)
@@ -133,11 +133,12 @@ static char *_get_voice_control_status(void *data, int id)
 
 void set_callback_for_system_location_change(void *data)
 {
-       if (data) {
+       /*
+       if (data)
                //@TODO: set needed callbacks
-       } else {
+       else
                //@TODO: unset previously set callbacks
-       }
+       */
 }
 
 static void _selected(void *data, int id)
@@ -308,17 +309,17 @@ static void _update(void *layout_data, int update_type, void *data)
        }
 
        switch (update_type) {
-               case UPDATE_DISABLE:
-                       elm_object_disabled_set(priv->ly, EINA_TRUE);
-                       break;
-               case UPDATE_ENABLE:
-                       elm_object_disabled_set(priv->ly, EINA_FALSE);
-                       break;
-               case UPDATE_CONTENT:
+       case UPDATE_DISABLE:
+               elm_object_disabled_set(priv->ly, EINA_TRUE);
+               break;
+       case UPDATE_ENABLE:
+               elm_object_disabled_set(priv->ly, EINA_FALSE);
+               break;
+       case UPDATE_CONTENT:
                        menumgr_update(priv->menu);
-                       break;
-               default:
-                       break;
+               break;
+       default:
+               break;
        }
 }
 
index 0bb85c4..2944cdf 100644 (file)
@@ -167,7 +167,7 @@ static void _app_control(app_control_h control, void *data)
 
        res = app_control_get_extra_data(control, "subview", &subview);
        if (APP_CONTROL_ERROR_NONE == res && subview) {
-               for(i = 0; i < ARRAY_SIZE(appctl_subview_values); i++) {
+               for (i = 0; i < ARRAY_SIZE(appctl_subview_values); i++) {
                        if (!strcmp(appctl_subview_values[i].subview, subview)) {
                                v_class = appctl_subview_values[i].class_getter();
                                viewmgr_pop_all_views();
index 8f955eb..8950668 100644 (file)
@@ -93,9 +93,8 @@ static Evas_Object *_create(Evas_Object *win, void *data)
 
        elm_object_part_text_set(priv->popup, PART_POPUP_TITLE, g_data->popup_title);
 
-       if (g_data->items_count != 0) {
+       if (g_data->items_count != 0)
                _fill_items(priv, priv->popup, g_data->items_count, g_data->item_texts, g_data->handler);
-       }
 
        inputmgr_add_callback(priv->popup, 0, &_input_handler, NULL);
        g_data->generic_popup_data = priv;
@@ -153,7 +152,7 @@ static void _destroy(void *data)
        SETTING_TRACE_END;
 }
 
-inline static void _focus_link_set(Evas_Object *prev, Evas_Object *next,
+static inline void _focus_link_set(Evas_Object *prev, Evas_Object *next,
                Elm_Focus_Direction *next_dirs, Elm_Focus_Direction *prev_dirs,
                int count)
 {
index 21c02cb..724ef3c 100644 (file)
@@ -71,17 +71,17 @@ static Evas_Object *_create(Evas_Object *win, void *data)
 
        elm_object_part_text_set(priv->base, PART_TEXT, attr->slider_title);
 
-       if(attr->slider_min_str) {
+       if (attr->slider_min_str)
                elm_object_part_text_set(priv->base, PART_VIEW_SLIDER_MIN, attr->slider_min_str);
-       else {
+       else {
                char slider_min_val_str[SLIDER_VAL_STR_L] = {0, };
                snprintf(slider_min_val_str, SLIDER_VAL_STR_L, "%d", attr->slider_min_val);
                elm_object_part_text_set(priv->base, PART_VIEW_SLIDER_MIN, slider_min_val_str);
        }
 
-       if(attr->slider_max_str) {
+       if (attr->slider_max_str)
                elm_object_part_text_set(priv->base, PART_VIEW_SLIDER_MAX, attr->slider_max_str);
-       else {
+       else {
                char slider_max_val_str[SLIDER_VAL_STR_L] = {0, };
                snprintf(slider_max_val_str, SLIDER_VAL_STR_L, "%d", attr->slider_max_val);
                elm_object_part_text_set(priv->base, PART_VIEW_SLIDER_MAX, slider_max_val_str);
@@ -202,13 +202,11 @@ static void _set_current_value_str_position(struct _priv *priv)
        msg.val = priv->slider_val;
        edje_object_message_send(elm_layout_edje_get(priv->base), EDJE_MESSAGE_INT, PIC_SLIDER_UPDATE_VAL, &msg);
 
-       if (priv->settings_get_str) {
+       if (priv->settings_get_str)
                priv->settings_get_str(priv->slider_val, val_str);
-       } else {
+       else
                snprintf(val_str, SLIDER_VAL_STR_L, "%d", priv->slider_val);
 
-       }
-
        elm_object_part_text_set(priv->base, PART_VIEW_SLIDER_CUR, val_str);
 }
 
index 2a26fd1..c4499c2 100755 (executable)
@@ -253,15 +253,15 @@ static void _setup_type_option_selected(clock_view_priv_data *priv, int id,
        _destroy_setup_type_popup(priv);
 
        switch (id) {
-               case TYPE_AUTO:
-                       _disable_manual_settings(true, priv);
-                       break;
-               case TYPE_MANUAL:
-                       _disable_manual_settings(false, priv);
-                       break;
-               default:
-                       _ERR("Unhandled setup type.");
-                       return;
+       case TYPE_AUTO:
+               _disable_manual_settings(true, priv);
+               break;
+       case TYPE_MANUAL:
+               _disable_manual_settings(false, priv);
+               break;
+       default:
+               _ERR("Unhandled setup type.");
+               return;
        }
 
        priv->cur_type = id;
@@ -375,7 +375,7 @@ static void _set_obj_focus_dir(Evas_Object *obj, Evas_Object *neighbour, Elm_Foc
 {
        elm_object_focus_next_object_set(obj, neighbour, dir);
 
-       if(allow_reverse)
+       if (allow_reverse)
                elm_object_focus_next_object_set(neighbour, obj, reverse);
 }
 
@@ -540,7 +540,7 @@ static bool _add_clock_setting(clock_view_priv_data *priv)
        elm_object_scale_set(priv->check_24, 1.0 / APP_BASE_SCALE);
 
        bool is24h;
-       if(settings_clock_is_24h_set(&is24h))
+       if (settings_clock_is_24h_set(&is24h))
                elm_check_state_set(priv->check_24, is24h);
 
 
@@ -618,7 +618,7 @@ static Evas_Object *_create(Evas_Object *win, void *data)
 */
        evas_object_smart_callback_add(priv->conformant, "virtualkeypad,state,on", _keypad_up_cb, priv);
        evas_object_smart_callback_add(priv->conformant, "virtualkeypad,state,off", _keypad_down_cb, priv);
-       
+
 
        if (!_add_clock_setting(priv)) {
                _ERR("failed to add clock setting layout");
@@ -772,11 +772,10 @@ static void _auto_manual_setup_key_down_cb(int id, void *data, Evas *e, Evas_Obj
        if (!strcmp(ev->keyname, KEY_BACK) || !strcmp(ev->keyname, KEY_BACK_WAY)
                || !strcmp(ev->keyname, KEY_ESC) || !strcmp(ev->keyname, KEY_ESC_WAY)
                        || !strcmp(ev->keyname, KEY_UP)) {
-               if(priv->setup_type_popup) {
+               if (priv->setup_type_popup)
                        _destroy_setup_type_popup(priv);
-               } else {
+               else
                        viewmgr_pop_view();
-               }
        } else {
                if (!strcmp(ev->keyname, KEY_ENTER))
                        _draw_setup_type_popup(priv);
@@ -813,7 +812,7 @@ static void _auto_manual_setup_option_key_down_cb(int id, void *data, Evas *e,
                ) {
                _destroy_setup_type_popup(priv);
        } else {
-               if(!strcmp(ev->keyname, KEY_ENTER))
+               if (!strcmp(ev->keyname, KEY_ENTER))
                        _setup_type_option_selected(priv, id, obj);
        }
 }
@@ -935,7 +934,7 @@ static void _get_time_from_controls(struct tm *result, const clock_view_priv_dat
        SETTING_TRACE("result->tm_hour: %d", result->tm_hour);
        SETTING_TRACE("result->tm_min: %d", result->tm_min);
        SETTING_TRACE("result->tm_sec: %d", result->tm_sec);
-       
+
 }
 
 static void _focused(int id, void *data, Evas_Object *obj, Elm_Object_Item *item)
index e2300ae..7c54ec7 100755 (executable)
@@ -87,9 +87,8 @@ static Evas_Object *_create(Evas_Object *win, void *data)
        g_data->generic_popup_data = NULL;
 
        int i;
-       for(i = 0; i < sizeof(str_setup_type_opt) / sizeof(str_setup_type_opt[0]); ++i) {
+       for (i = 0; i < sizeof(str_setup_type_opt) / sizeof(str_setup_type_opt[0]); ++i)
                g_data->item_texts[i] = str_setup_type_opt[i];
-       }
 
        if (!viewmgr_set_view_data(VIEW_CLOCK_MODE, g_data)) {
                free(g_data);
index 7e4233a..cc01c97 100644 (file)
@@ -54,7 +54,7 @@ static bool _fill_popup_btns(struct _priv *priv, Evas_Object *layout,
        Evas_Object *btn = NULL;
        int i;
 
-       for(i = 0; i < btn_count; i++) {
+       for (i = 0; i < btn_count; i++) {
                char part_name[PART_POPUP_BUTTON_STR_MAX_L] = {0, };
                snprintf(part_name, sizeof(part_name), btn_part_x, i);
 
@@ -140,7 +140,7 @@ static void _show(void *data)
        /* Set Focus */
        lang_id = settings_language_get_language_id();
 
-       if(lang_id != LANG_TYPE_MAX)
+       if (lang_id != LANG_TYPE_MAX)
                elm_object_focus_set(priv->popup_btn[lang_id], EINA_TRUE);
 }
 
index fb92439..ca5b68d 100644 (file)
@@ -164,11 +164,10 @@ static void _show(void *data)
                return;
        }
 
-       if (eina_list_data_get(node)) {
+       if (eina_list_data_get(node))
                elm_object_focus_set(priv->on_button, EINA_TRUE);
-       } else {
+       else
                elm_object_focus_set(priv->off_button, EINA_TRUE);
-       }
        evas_object_show(priv->base);
 }
 
@@ -242,10 +241,9 @@ static void _vc_data_changed_cb(enum event_type type, void *data)
                return;
        }
 
-       if (eina_list_data_get(node)) {
+       if (eina_list_data_get(node))
                elm_object_focus_set(priv->on_button, EINA_TRUE);
-       } else {
+       else
                elm_object_focus_set(priv->off_button, EINA_TRUE);
-       }
        evas_object_show(priv->base);
 }
index ae79ae8..9f3c327 100755 (executable)
@@ -109,9 +109,8 @@ static void _show_toast_message(Evas_Object *parent, char *text)
        Evas_Object *layout = NULL;
        static Evas_Object *popup = NULL;
 
-       if (popup) {
+       if (popup)
                evas_object_del(popup);
-       }
 
        popup = elm_notify_add(parent);
        if (!popup) {
index b850b30..65422d1 100644 (file)
@@ -238,9 +238,8 @@ static void _set_result(struct _priv *priv, int id)
        }
 
        /* Send event to network layout */
-       if (priv->conn->event_cb) {
+       if (priv->conn->event_cb)
                priv->conn->event_cb(EVENT_DATA_RETRY_WIRED, priv->conn->cb_data);
-       }
 }
 
 static void _button_clicked(struct _priv *priv, int id, Evas_Object *obj)
@@ -358,9 +357,8 @@ static void _menu_btn_key_down_cb(int id, void *data, Evas *e, Evas_Object *obj,
        }
        priv = data;
 
-       if (!strcmp(ev->keyname, KEY_ENTER)) {
+       if (!strcmp(ev->keyname, KEY_ENTER))
                _button_clicked(priv, id, obj);
-       }
 }
 
 static input_handler _base_input_handler = {
@@ -564,9 +562,7 @@ static bool _update_entry_input_state(struct _priv *priv)
        if (priv == NULL ||
                priv->content_manual == NULL ||
                priv->content_automatic == NULL)
-       {
                return false;
-       }
 
        if (priv->cur_menu == EO_BTN_AUTOMATIC) {
                if (elm_radio_value_get(priv->content_automatic->radio1) == 2) {
@@ -702,13 +698,12 @@ static void _markup_cb(void *data, Evas_Object *entry, char **text)
                return;
 
        /* Check focus change key */
-       if (!strcmp(".", *text)) {
+       if (!strcmp(".", *text))
                ignore = true;
-       } else if (!strcmp("<tab/>", *text)) {
+       else if (!strcmp("<tab/>", *text))
                ignore = true;
-       } else if (!strcmp("<br/>", *text)) {
+       else if (!strcmp("<br/>", *text))
                ignore = true;
-       }
 
        if (ignore) {
                /* TODO: Move focus to next item */