Fix indentation
[platform/core/uifw/inputdelegator.git] / src / w-input-selector.cpp
index 7b08443..9536088 100755 (executable)
@@ -50,38 +50,37 @@ Evas_Coord last_step; // 0 ~ 9 for gesture, 10~11 for rotary
 
 tizen_profile_t _get_tizen_profile()
 {
-   static tizen_profile_t profile = TIZEN_PROFILE_UNKNOWN;
-   if (__builtin_expect(profile != TIZEN_PROFILE_UNKNOWN, 1))
-     return profile;
-
-   char *profileName;
-   system_info_get_platform_string("http://tizen.org/feature/profile", &profileName);
-   switch (*profileName)
-     {
-      case 'm':
-      case 'M':
-         profile = TIZEN_PROFILE_MOBILE;
-         break;
-      case 'w':
-      case 'W':
-         profile = TIZEN_PROFILE_WEARABLE;
-         break;
-      case 't':
-      case 'T':
-         profile = TIZEN_PROFILE_TV;
-         break;
-      case 'i':
-      case 'I':
-         profile = TIZEN_PROFILE_IVI;
-         break;
-      default: // common or unknown ==> ALL ARE COMMON.
-         profile = TIZEN_PROFILE_COMMON;
-     }
-   free(profileName);
-
-   return profile;
-}
+       static tizen_profile_t profile = TIZEN_PROFILE_UNKNOWN;
+       if (__builtin_expect(profile != TIZEN_PROFILE_UNKNOWN, 1))
+               return profile;
+
+       char *profileName;
+       system_info_get_platform_string("http://tizen.org/feature/profile", &profileName);
+       switch (*profileName)
+       {
+               case 'm':
+               case 'M':
+                       profile = TIZEN_PROFILE_MOBILE;
+                       break;
+               case 'w':
+               case 'W':
+                       profile = TIZEN_PROFILE_WEARABLE;
+                       break;
+               case 't':
+               case 'T':
+                       profile = TIZEN_PROFILE_TV;
+                       break;
+               case 'i':
+               case 'I':
+                       profile = TIZEN_PROFILE_IVI;
+                       break;
+               default: // common or unknown ==> ALL ARE COMMON.
+                       profile = TIZEN_PROFILE_COMMON;
+       }
+       free(profileName);
 
+       return profile;
+}
 
 void _init_app_data(App_Data* app_data);
 static void _app_language_changed(app_event_info_h event_info, void *user_data);
@@ -566,10 +565,10 @@ void _back_to_genlist_for_selector()
                reply_to_sender_by_callback(NULL, NULL);
                elm_exit();
        }
-#ifdef _WEARABLE
-       Evas_Object *circle_genlist = (Evas_Object *) evas_object_data_get(app_data->genlist, "circle");
-       eext_rotary_object_event_activated_set(circle_genlist, EINA_TRUE);
-#endif
+       if (_WEARABLE) {
+               Evas_Object *circle_genlist = (Evas_Object *) evas_object_data_get(app_data->genlist, "circle");
+               eext_rotary_object_event_activated_set(circle_genlist, EINA_TRUE);
+       }
 }
 
 static void _item_realized(void *data, Evas_Object *obj, void *event_info) //called when list scrolled
@@ -584,12 +583,12 @@ Evas_Object* _create_genlist(Evas_Object* navi)
                return NULL;
 
        elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
-#ifdef _WEARABLE
-       Evas_Object* circle_object_genlist = eext_circle_object_genlist_add(genlist, app_data->circle_surface);
-       eext_circle_object_genlist_scroller_policy_set(circle_object_genlist, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
-       evas_object_data_set(genlist, "circle", (void *) circle_object_genlist);
-       eext_rotary_object_event_activated_set(circle_object_genlist, EINA_TRUE);
-#endif
+       if (_WEARABLE) {
+               Evas_Object* circle_object_genlist = eext_circle_object_genlist_add(genlist, app_data->circle_surface);
+               eext_circle_object_genlist_scroller_policy_set(circle_object_genlist, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
+               evas_object_data_set(genlist, "circle", (void *) circle_object_genlist);
+               eext_rotary_object_event_activated_set(circle_object_genlist, EINA_TRUE);
+       }
        evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
 
@@ -832,9 +831,8 @@ bool _app_create(void* user_data)
        Evas_Object* conform = NULL;
        Evas_Object* bg = NULL;
        Evas_Object* window = NULL;
-#ifdef _WEARABLE
        Eext_Circle_Surface *surface;
-#endif
+
        if (!user_data) {
                return false;
        }
@@ -869,11 +867,10 @@ bool _app_create(void* user_data)
        evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
 
        conform = elm_conformant_add(window);
-#ifdef _WEARABLE
-       surface = eext_circle_surface_conformant_add(conform);
-#endif
-       evas_object_size_hint_weight_set(conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       if (_WEARABLE)
+               surface = eext_circle_surface_conformant_add(conform);
 
+       evas_object_size_hint_weight_set(conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
 
        elm_win_resize_object_add(window, conform);
        elm_object_content_set(conform, layout);
@@ -884,9 +881,7 @@ bool _app_create(void* user_data)
        app_data->win_main = window;
        app_data->conform = conform;
        app_data->layout_main = layout;
-#ifdef _WEARABLE
        app_data->circle_surface = surface;
-#endif
        app_data->app_type = APP_TYPE_SELECT_MODE;
 
        Evas_Object *naviframe = elm_naviframe_add(layout);