[elm_popup.c] Refactoring.
authorDaniel Juyung Seo <juyung.seo@samsung.com>
Fri, 3 Dec 2010 01:27:52 +0000 (10:27 +0900)
committerDaniel Juyung Seo <juyung.seo@samsung.com>
Fri, 3 Dec 2010 01:27:52 +0000 (10:27 +0900)
  + Fixed indentation.
  + Removed unnecessary spaces and lines.

src/lib/elm_popup.c

index 33ad345..99f0fa0 100644 (file)
@@ -47,18 +47,17 @@ static void _block_clicked_cb(void *data, Evas_Object *obj, void *event_info);
 static void _show(void *data, Evas *e, Evas_Object *obj, void *event_info);\r
 static void _hide(void *data, Evas *e, Evas_Object *obj, void *event_info);\r
 \r
-\r
 static void\r
 _del_parent(void *data, Evas *e, Evas_Object *obj, void *evet_info)\r
 {\r
    Evas_Object *pop = data;\r
    Widget_Data *wd = elm_widget_data_get(pop);\r
-   \r
+\r
    if (!wd) return;\r
    if (wd->parent == obj)\r
      {\r
-         evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_DEL, _del_parent, pop);\r
-         wd->parent = NULL;\r
+        evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_DEL, _del_parent, pop);\r
+        wd->parent = NULL;\r
      }\r
 }\r
 \r
@@ -73,16 +72,16 @@ static void
 _del_hook(Evas_Object *obj)\r
 {\r
    Widget_Data *wd = elm_widget_data_get(obj);\r
-   \r
+\r
    if (!wd) return;  \r
    if (!wd->del_job)\r
      {\r
-       if (wd->parent)\r
-         {\r
-            evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_DEL, _del_parent, obj);\r
-            wd->del_job = ecore_job_add(_del_job, wd->parent);\r
-            wd->parent = NULL;\r
-         }\r
+        if (wd->parent)\r
+          {\r
+             evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_DEL, _del_parent, obj);\r
+             wd->del_job = ecore_job_add(_del_job, wd->parent);\r
+             wd->parent = NULL;\r
+          }\r
      }\r
    free(wd);   \r
 }\r
@@ -93,14 +92,14 @@ _del_pre_hook(Evas_Object *obj)
    Widget_Data *wd = elm_widget_data_get(obj);\r
    Action_Area_Data *action_data = NULL;\r
    Eina_List *list = NULL;\r
-   \r
+\r
    if (!wd) return;\r
    evas_object_event_callback_del_full(obj, EVAS_CALLBACK_SHOW, _show, NULL);\r
    evas_object_event_callback_del_full(obj, EVAS_CALLBACK_HIDE, _hide, NULL);\r
    EINA_LIST_FOREACH(wd->button_list, list, action_data)\r
      {\r
-       free(action_data);\r
-       action_data = NULL;\r
+        free(action_data);\r
+        action_data = NULL;\r
      }\r
    eina_list_free(wd->button_list);\r
 }\r
@@ -112,28 +111,28 @@ _theme_hook(Evas_Object *obj)
    char buf[4096];\r
    Eina_List *list = NULL;\r
    Action_Area_Data *action_data = NULL;\r
-   \r
+\r
    if (!wd) return;\r
    elm_layout_theme_set(wd->layout, "popup", "base", elm_widget_style_get(obj));\r
    elm_notify_orient_set(wd->notify, wd->notify_orient);\r
    edje_object_message_signal_process(elm_layout_edje_get(wd->layout));\r
-  \r
+\r
    if (wd->action_area)\r
      {\r
-       EINA_LIST_FOREACH(wd->button_list, list, action_data)\r
-         {\r
-               snprintf(buf, sizeof(buf), "popup_button/%s", elm_widget_style_get(obj));\r
-               elm_object_style_set(action_data->btn, buf);\r
-         }\r
+        EINA_LIST_FOREACH(wd->button_list, list, action_data)\r
+          {\r
+             snprintf(buf, sizeof(buf), "popup_button/%s", elm_widget_style_get(obj));\r
+             elm_object_style_set(action_data->btn, buf);\r
+          }\r
      }\r
    if (wd->content_area)\r
      {\r
-       elm_layout_theme_set(wd->content_area, "popup", "content", elm_widget_style_get(obj));\r
-       if (wd->desc_label)\r
-         {\r
-               snprintf(buf, sizeof(buf), "popup_description/%s", elm_widget_style_get(obj));\r
-               elm_object_style_set(wd->desc_label, buf);\r
-         }\r
+        elm_layout_theme_set(wd->content_area, "popup", "content", elm_widget_style_get(obj));\r
+        if (wd->desc_label)\r
+          {\r
+             snprintf(buf, sizeof(buf), "popup_description/%s", elm_widget_style_get(obj));\r
+             elm_object_style_set(wd->desc_label, buf);\r
+          }\r
      }     \r
    _sizing_eval(obj);\r
 }\r
@@ -143,7 +142,7 @@ _sizing_eval(Evas_Object *obj)
 {\r
    Widget_Data *wd = elm_widget_data_get(obj);\r
    Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;\r
-   \r
+\r
    if (!wd) return;\r
    edje_object_size_min_calc(elm_layout_edje_get(wd->layout), &minw, &minh);\r
    evas_object_size_hint_min_set(obj, minw, minh);\r
@@ -157,7 +156,7 @@ _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
 }\r
 \r
 static void \r
-_block_clicked_cb( void *data, Evas_Object *obj, void *event_info )\r
+_block_clicked_cb(void *data, Evas_Object *obj, void *event_info)\r
 {  \r
    evas_object_hide((Evas_Object*)data);  \r
    evas_object_smart_callback_call((Evas_Object *)data, "response", (void *)ELM_POPUP_RESPONSE_NONE);    \r
@@ -192,7 +191,7 @@ static void
 _show(void *data, Evas *e, Evas_Object *obj, void *event_info)\r
 {  \r
    Widget_Data *wd = elm_widget_data_get(obj);   \r
-   \r
+\r
    if (!wd) return;\r
    if (wd->parent) evas_object_show(wd->parent);    \r
    elm_layout_theme_set(wd->layout, "popup", "base", elm_widget_style_get(obj));\r
@@ -211,7 +210,7 @@ _show(void *data, Evas *e, Evas_Object *obj, void *event_info)
         if (!curr_rmethod) return;\r
         if (!gl_rmethod) return;\r
         if (curr_rmethod == gl_rmethod)\r
-          _elm_wnd_map_handler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_SHOW, _wnd_map_notify, obj);\r
+           _elm_wnd_map_handler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_SHOW, _wnd_map_notify, obj);\r
      }\r
 }\r
 \r
@@ -219,7 +218,7 @@ static void
 _hide(void *data, Evas *e, Evas_Object *obj, void *event_info)\r
 {\r
    Widget_Data *wd = elm_widget_data_get(obj);\r
-   \r
+\r
    if (!wd) return;\r
    edje_object_signal_emit(elm_layout_edje_get(wd->layout), "elm,state,hide", "elm");\r
    edje_object_message_signal_process(wd->layout);\r
@@ -228,11 +227,11 @@ _hide(void *data, Evas *e, Evas_Object *obj, void *event_info)
 }\r
 \r
 static void \r
-_action_area_clicked( void *data, Evas_Object *obj, void *event_info )\r
+_action_area_clicked(void *data, Evas_Object *obj, void *event_info)\r
 {\r
    Action_Area_Data *adata = NULL;\r
    adata = (Action_Area_Data *)data;\r
-   \r
+\r
    if (!adata) return;  \r
    evas_object_smart_callback_call(adata->obj, "response", (void *)adata->response_id);   \r
    evas_object_hide(adata->obj);\r
@@ -244,7 +243,7 @@ _elm_popup_add_button(Evas_Object *obj, const char *text, int response_id)
    char buf[4096];\r
    Widget_Data *wd = elm_widget_data_get(obj);\r
    Evas_Object *btn;\r
-   \r
+\r
    if (!wd) return NULL;\r
    Action_Area_Data *adata = ELM_NEW(Action_Area_Data); \r
    btn = elm_button_add(obj);\r
@@ -267,7 +266,7 @@ _elm_popup_buttons_add_valist(Evas_Object *obj, const char *first_button_text, v
    int response = 0;\r
    int index = 0;\r
    Evas_Object *btn;\r
-   \r
+\r
    if (first_button_text == NULL) return;\r
    Widget_Data *wd = elm_widget_data_get(obj);\r
    if (!wd) return;\r
@@ -275,20 +274,20 @@ _elm_popup_buttons_add_valist(Evas_Object *obj, const char *first_button_text, v
    response = va_arg(args, int);\r
    while (text != NULL)\r
      {\r
-       btn = _elm_popup_add_button(obj, text, response);\r
-       ++index;\r
-       snprintf(buf, sizeof(buf), "actionbtn%d", index);           \r
-       elm_layout_content_set(wd->action_area, buf, btn);\r
-       evas_object_event_callback_add(wd->action_area, EVAS_CALLBACK_CHANGED_SIZE_HINTS,\r
-                                       _changed_size_hints, obj);\r
-       text = va_arg(args, char*);\r
-       if (text == NULL) break;\r
-       response = va_arg(args, int);\r
-      }      \r
+        btn = _elm_popup_add_button(obj, text, response);\r
+        ++index;\r
+        snprintf(buf, sizeof(buf), "actionbtn%d", index);           \r
+        elm_layout_content_set(wd->action_area, buf, btn);\r
+        evas_object_event_callback_add(wd->action_area, EVAS_CALLBACK_CHANGED_SIZE_HINTS,\r
+                                       _changed_size_hints, obj);\r
+        text = va_arg(args, char*);\r
+        if (text == NULL) break;\r
+        response = va_arg(args, int);\r
+     }      \r
 }\r
 \r
 static void \r
-_elm_popup_timeout( void *data, Evas_Object *obj, void *event_info )\r
+_elm_popup_timeout(void *data, Evas_Object *obj, void *event_info)\r
 {  \r
    evas_object_hide((Evas_Object*)data);  \r
    evas_object_smart_callback_call((Evas_Object *)data, "response", (void *)ELM_POPUP_RESPONSE_TIMEOUT);    \r
@@ -305,7 +304,7 @@ _elm_signal_exit(void *data __UNUSED__, int ev_type __UNUSED__, void *ev __UNUSE
 }\r
 \r
 static void \r
-response_cb( void *data, Evas_Object *obj, void *event_info )\r
+response_cb(void *data, Evas_Object *obj, void *event_info)\r
 {\r
    int res_id = (int) event_info;\r
    int *id = (int *)data;\r
@@ -334,27 +333,27 @@ elm_popup_add(Evas_Object *parent_app)
    unsigned char *prop_data = NULL;\r
    int ret;\r
    Ecore_X_Window_Type type;\r
-  if(!parent_app)\r
+   if (!parent_app)\r
      {\r
-       //FIXME: Keep this window always on top\r
-       parent = elm_win_add(parent_app, "popup", ELM_WIN_DIALOG_BASIC);\r
-       elm_win_borderless_set(parent, EINA_TRUE);\r
-       elm_win_alpha_set(parent, EINA_TRUE);\r
-       elm_win_raise(parent);  \r
-       ecore_x_window_geometry_get(ecore_x_window_root_get(ecore_x_window_focus_get()), &x, &y, &w, &h);\r
-       ret  = ecore_x_window_prop_property_get(ecore_x_window_root_get(ecore_x_window_focus_get()), ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE, \r
-                                                ECORE_X_ATOM_CARDINAL, 32, &prop_data, &count);\r
-       if (ret && prop_data) memcpy(&rotation, prop_data, sizeof(int));\r
-       if (prop_data) free(prop_data);\r
-       evas_object_resize(parent, w, h);\r
-       evas_object_move(parent, x, y);\r
-       if (rotation != -1) \r
-         elm_win_rotation_with_resize_set(parent, rotation);     \r
-       \r
+        //FIXME: Keep this window always on top\r
+        parent = elm_win_add(parent_app, "popup", ELM_WIN_DIALOG_BASIC);\r
+        elm_win_borderless_set(parent, EINA_TRUE);\r
+        elm_win_alpha_set(parent, EINA_TRUE);\r
+        elm_win_raise(parent);  \r
+        ecore_x_window_geometry_get(ecore_x_window_root_get(ecore_x_window_focus_get()), &x, &y, &w, &h);\r
+        ret  = ecore_x_window_prop_property_get(ecore_x_window_root_get(ecore_x_window_focus_get()), ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE, \r
+                                                ECORE_X_ATOM_CARDINAL, 32, &prop_data, &count);\r
+        if (ret && prop_data) memcpy(&rotation, prop_data, sizeof(int));\r
+        if (prop_data) free(prop_data);\r
+        evas_object_resize(parent, w, h);\r
+        evas_object_move(parent, x, y);\r
+        if (rotation != -1) \r
+           elm_win_rotation_with_resize_set(parent, rotation);   \r
+\r
      }\r
    else\r
-     parent = parent_app;\r
-       \r
+      parent = parent_app;\r
+\r
    wd = ELM_NEW(Widget_Data);\r
    e = evas_object_evas_get(parent);\r
    obj = elm_widget_add(e);\r
@@ -365,7 +364,7 @@ elm_popup_add(Evas_Object *parent_app)
    elm_widget_del_pre_hook_set(obj, _del_pre_hook);\r
    elm_widget_del_hook_set(obj, _del_hook);\r
    elm_widget_theme_hook_set(obj, _theme_hook);\r
-  \r
+\r
    wd->notify = elm_notify_add(parent);    \r
    elm_widget_resize_object_set(obj, wd->notify);\r
    elm_notify_orient_set(wd->notify, ELM_NOTIFY_ORIENT_CENTER);\r
@@ -384,17 +383,17 @@ elm_popup_add(Evas_Object *parent_app)
    evas_object_event_callback_add(obj, EVAS_CALLBACK_SHOW, _show, NULL);\r
    evas_object_event_callback_add(obj, EVAS_CALLBACK_HIDE, _hide, NULL);\r
    wd->rot_angle = rotation;\r
-   if(!parent_app)\r
+   if (!parent_app)\r
      {\r
-               wd->parent = parent;\r
-               elm_object_style_set(wd->notify, "popup");\r
-               evas_object_event_callback_add(parent, EVAS_CALLBACK_DEL, _del_parent, obj);\r
+        wd->parent = parent;\r
+        elm_object_style_set(wd->notify, "popup");\r
+        evas_object_event_callback_add(parent, EVAS_CALLBACK_DEL, _del_parent, obj);\r
      }\r
 \r
    ecore_x_netwm_window_type_get(elm_win_xwindow_get(parent), &type);   \r
-   if(type == ECORE_X_WINDOW_TYPE_DIALOG)\r
+   if (type == ECORE_X_WINDOW_TYPE_DIALOG)\r
      {\r
-               elm_object_style_set(wd->notify, "popup");\r
+        elm_object_style_set(wd->notify, "popup");\r
      }\r
    _sizing_eval(obj);\r
 \r
@@ -415,40 +414,40 @@ elm_popup_add(Evas_Object *parent_app)
  * @ingroup Popup\r
  */\r
 EAPI Evas_Object *\r
-elm_popup_with_buttons_add(Evas_Object *parent, char *title, char *desc_text,int no_of_buttons, char *first_button_text, ... )\r
+elm_popup_with_buttons_add(Evas_Object *parent, char *title, char *desc_text,int no_of_buttons, char *first_button_text, ...)\r
 {\r
    Evas_Object *popup;\r
    popup = elm_popup_add(parent);\r
    Widget_Data *wd = elm_widget_data_get(popup);\r
    char buf[4096];\r
-   \r
+\r
    if (desc_text)\r
      {\r
-       elm_popup_desc_set(popup, desc_text);\r
+        elm_popup_desc_set(popup, desc_text);\r
      }\r
    if (title)\r
      {\r
-       elm_popup_title_label_set(popup, title);\r
+        elm_popup_title_label_set(popup, title);\r
      }\r
    if (first_button_text)\r
      {\r
-       va_list args;  \r
-       va_start(args, first_button_text); \r
-       wd->action_area = elm_layout_add(popup);\r
-       elm_layout_content_set(wd->layout, "elm.swallow.buttonArea", wd->action_area);\r
-       snprintf(buf,sizeof(buf), "buttons%d", no_of_buttons);\r
-       elm_layout_theme_set(wd->action_area, "popup", buf, elm_widget_style_get(popup));\r
-       edje_object_signal_emit(elm_layout_edje_get(wd->layout), "elm,state,button,visible", "elm");\r
-       if (wd->title_area)\r
-         {\r
-               edje_object_signal_emit(elm_layout_edje_get(wd->layout), "elm,state,button,title,visible", "elm");\r
-         }\r
-       _elm_popup_buttons_add_valist (popup, first_button_text, args);\r
-       va_end(args);\r
+        va_list args;  \r
+        va_start(args, first_button_text); \r
+        wd->action_area = elm_layout_add(popup);\r
+        elm_layout_content_set(wd->layout, "elm.swallow.buttonArea", wd->action_area);\r
+        snprintf(buf,sizeof(buf), "buttons%d", no_of_buttons);\r
+        elm_layout_theme_set(wd->action_area, "popup", buf, elm_widget_style_get(popup));\r
+        edje_object_signal_emit(elm_layout_edje_get(wd->layout), "elm,state,button,visible", "elm");\r
+        if (wd->title_area)\r
+          {\r
+             edje_object_signal_emit(elm_layout_edje_get(wd->layout), "elm,state,button,title,visible", "elm");\r
+          }\r
+        _elm_popup_buttons_add_valist (popup, first_button_text, args);\r
+        va_end(args);\r
      }\r
    edje_object_message_signal_process(wd->layout);\r
    _sizing_eval(popup);\r
-   \r
+\r
    return popup;   \r
 }\r
 \r
@@ -467,12 +466,12 @@ elm_popup_desc_set(Evas_Object *obj, const char *text)
    ELM_CHECK_WIDTYPE(obj, widtype);\r
    Widget_Data *wd = elm_widget_data_get(obj);     \r
    char buf[4096];\r
-   \r
+\r
    if (!wd) return;\r
    if (wd->content_area)\r
      {\r
-       evas_object_del(wd->content_area);\r
-       wd->content_area = NULL;\r
+        evas_object_del(wd->content_area);\r
+        wd->content_area = NULL;\r
      }  \r
    wd->content_area = elm_layout_add(obj);\r
    elm_layout_theme_set(wd->content_area, "popup", "content", elm_widget_style_get(obj));\r
@@ -487,7 +486,7 @@ elm_popup_desc_set(Evas_Object *obj, const char *text)
    elm_layout_content_set(wd->content_area, "elm.swallow.content", wd->desc_label);    \r
    elm_layout_content_set(wd->layout, "elm.swallow.content", wd->content_area);        \r
    evas_object_event_callback_add(wd->content_area, EVAS_CALLBACK_CHANGED_SIZE_HINTS,\r
-                                 _changed_size_hints, obj);\r
+                                  _changed_size_hints, obj);\r
    _sizing_eval(obj);\r
 }\r
 \r
@@ -504,7 +503,7 @@ elm_popup_desc_get(Evas_Object *obj)
 {\r
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;\r
    Widget_Data *wd = elm_widget_data_get(obj);\r
-   \r
+\r
    if (!wd) return NULL;\r
    return elm_label_label_get(wd->desc_label);\r
 }\r
@@ -522,19 +521,15 @@ elm_popup_title_label_set(Evas_Object *obj, const char *text)
 {\r
    ELM_CHECK_WIDTYPE(obj, widtype);\r
    Widget_Data *wd = elm_widget_data_get(obj);\r
-   \r
+\r
    if (!wd) return;\r
    eina_stringshare_replace(&wd->title_area, text);\r
    edje_object_part_text_set(elm_layout_edje_get(wd->layout), "elm.swallow.title", text);\r
    edje_object_signal_emit(elm_layout_edje_get(wd->layout), "elm,state,title,visible", "elm");\r
    if (wd->action_area)\r
-     {\r
-       edje_object_signal_emit(elm_layout_edje_get(wd->layout), "elm,state,button,title,visible", "elm");\r
-     }\r
+      edje_object_signal_emit(elm_layout_edje_get(wd->layout), "elm,state,button,title,visible", "elm");\r
    if (wd->title_icon)\r
-     {\r
-       edje_object_signal_emit(elm_layout_edje_get(wd->layout), "elm,state,title,icon,visible", "elm");\r
-     } \r
+      edje_object_signal_emit(elm_layout_edje_get(wd->layout), "elm,state,title,icon,visible", "elm");\r
    edje_object_message_signal_process(wd->layout);\r
    _sizing_eval(obj);\r
 }\r
@@ -552,7 +547,7 @@ elm_popup_title_label_get(Evas_Object *obj)
 {\r
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;\r
    Widget_Data *wd = elm_widget_data_get(obj);\r
-   \r
+\r
    if (!wd) return NULL;\r
    return wd->title_area;\r
 }\r
@@ -570,12 +565,12 @@ elm_popup_title_icon_set(Evas_Object *obj, Evas_Object *icon)
 {\r
    ELM_CHECK_WIDTYPE(obj, widtype);\r
    Widget_Data *wd = elm_widget_data_get(obj);\r
-   \r
+\r
    if (!wd) return;\r
    if (wd->title_icon)\r
      {\r
-       evas_object_del(wd->title_icon);\r
-       wd->title_icon = NULL;\r
+        evas_object_del(wd->title_icon);\r
+        wd->title_icon = NULL;\r
      }\r
    wd->title_icon = icon;   \r
    elm_layout_content_set(wd->layout, "elm.swallow.title.icon", wd->title_icon);    \r
@@ -597,7 +592,7 @@ elm_popup_title_icon_get(Evas_Object *obj)
 {\r
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;\r
    Widget_Data *wd = elm_widget_data_get(obj);\r
-   \r
+\r
    if (!wd) return NULL;\r
    return wd->title_icon;\r
 }\r
@@ -615,19 +610,19 @@ elm_popup_content_set(Evas_Object *obj, Evas_Object *content)
 {\r
    ELM_CHECK_WIDTYPE(obj, widtype);\r
    Widget_Data *wd = elm_widget_data_get(obj);  \r
-   \r
+\r
    if (!wd) return;\r
    if (wd->content_area)\r
      {\r
-       evas_object_del(wd->content_area);\r
-       wd->content_area = NULL;\r
+        evas_object_del(wd->content_area);\r
+        wd->content_area = NULL;\r
      }        \r
    wd->content_area = elm_layout_add(obj);\r
    elm_layout_theme_set(wd->content_area, "popup","content", elm_widget_style_get(obj));\r
    elm_layout_content_set(wd->content_area, "elm.swallow.content", content);     \r
    elm_layout_content_set(wd->layout, "elm.swallow.content", wd->content_area);     \r
    evas_object_event_callback_add(wd->content_area, EVAS_CALLBACK_CHANGED_SIZE_HINTS,\r
-                   _changed_size_hints, obj);\r
+                                  _changed_size_hints, obj);\r
    _sizing_eval(obj);\r
 }\r
 \r
@@ -644,7 +639,7 @@ elm_popup_content_get(Evas_Object *obj)
 {\r
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;\r
    Widget_Data *wd = elm_widget_data_get(obj);\r
-   \r
+\r
    if (!wd) return NULL;\r
    return wd->content_area;\r
 }\r
@@ -666,13 +661,13 @@ elm_popup_buttons_add(Evas_Object *obj,int no_of_buttons, char *first_button_tex
    Widget_Data *wd = elm_widget_data_get(obj);  \r
    char buf[4096];  \r
    va_list args;  \r
-   \r
+\r
    if (!wd) return;\r
    va_start(args, first_button_text); \r
    if (wd->action_area)\r
      {\r
-       evas_object_del(wd->action_area);\r
-       wd->action_area = NULL;\r
+        evas_object_del(wd->action_area);\r
+        wd->action_area = NULL;\r
      }\r
    wd->action_area = elm_layout_add(obj);\r
    elm_layout_content_set(wd->layout, "elm.swallow.buttonArea", wd->action_area);\r
@@ -682,9 +677,7 @@ elm_popup_buttons_add(Evas_Object *obj,int no_of_buttons, char *first_button_tex
    elm_layout_theme_set(wd->action_area, "popup", buf, elm_widget_style_get(obj));     \r
    edje_object_signal_emit(elm_layout_edje_get(wd->layout), "elm,state,button,visible", "elm");\r
    if (wd->title_area)\r
-     {\r
-       edje_object_signal_emit(elm_layout_edje_get(wd->layout), "elm,state,button,title,visible", "elm");\r
-     }\r
+      edje_object_signal_emit(elm_layout_edje_get(wd->layout), "elm,state,button,title,visible", "elm");\r
    _elm_popup_buttons_add_valist (obj, first_button_text, args);\r
    va_end(args);\r
    edje_object_message_signal_process(wd->layout);\r
@@ -705,7 +698,7 @@ elm_popup_timeout_set(Evas_Object *obj, int timeout)
 {  \r
    ELM_CHECK_WIDTYPE(obj, widtype);\r
    Widget_Data *wd = elm_widget_data_get(obj);\r
-   \r
+\r
    if (!wd) return;  \r
    elm_notify_timeout_set(wd->notify, timeout);\r
    evas_object_smart_callback_add(wd->notify, "notify,timeout", _elm_popup_timeout, obj);\r
@@ -726,12 +719,12 @@ elm_popup_mode_set(Evas_Object *obj, Elm_Popup_Mode mode)
 {\r
    ELM_CHECK_WIDTYPE(obj, widtype);\r
    Widget_Data *wd = elm_widget_data_get(obj);\r
-   \r
+\r
    if (!wd) return; \r
-   if(mode == ELM_POPUP_TYPE_ALERT)\r
-     evas_object_smart_callback_add(wd->notify, "block,clicked", _block_clicked_cb, obj);\r
+   if (mode == ELM_POPUP_TYPE_ALERT)\r
+      evas_object_smart_callback_add(wd->notify, "block,clicked", _block_clicked_cb, obj);\r
    else\r
-     evas_object_smart_callback_del(wd->notify, "block,clicked", _block_clicked_cb);\r
+      evas_object_smart_callback_del(wd->notify, "block,clicked", _block_clicked_cb);\r
 }\r
 \r
 /**\r
@@ -747,7 +740,7 @@ elm_popup_response(Evas_Object *obj, int  response_id)
 {\r
    ELM_CHECK_WIDTYPE(obj, widtype);\r
    Widget_Data *wd = elm_widget_data_get(obj);\r
-   \r
+\r
    if (!wd) return;  \r
    evas_object_hide(obj);  \r
    evas_object_smart_callback_call((Evas_Object *)obj, "response", (void *)response_id);  \r
@@ -766,37 +759,37 @@ elm_popup_orient_set(Evas_Object *obj, Elm_Popup_Orient orient)
    ELM_CHECK_WIDTYPE(obj, widtype);\r
    Widget_Data *wd = elm_widget_data_get(obj);\r
    Elm_Notify_Orient notify_orient = -1;\r
-   \r
+\r
    if (!wd) return;\r
    switch (orient)\r
      {\r
       case ELM_POPUP_ORIENT_TOP:\r
-       notify_orient = ELM_NOTIFY_ORIENT_TOP;\r
-       break;\r
+         notify_orient = ELM_NOTIFY_ORIENT_TOP;\r
+         break;\r
       case ELM_POPUP_ORIENT_CENTER:\r
-       notify_orient = ELM_NOTIFY_ORIENT_CENTER;\r
-       break;\r
+         notify_orient = ELM_NOTIFY_ORIENT_CENTER;\r
+         break;\r
       case ELM_POPUP_ORIENT_BOTTOM:\r
-       notify_orient = ELM_NOTIFY_ORIENT_BOTTOM;\r
-       break;\r
+         notify_orient = ELM_NOTIFY_ORIENT_BOTTOM;\r
+         break;\r
       case ELM_POPUP_ORIENT_LEFT:\r
-       notify_orient = ELM_NOTIFY_ORIENT_LEFT;\r
-       break;\r
+         notify_orient = ELM_NOTIFY_ORIENT_LEFT;\r
+         break;\r
       case ELM_POPUP_ORIENT_RIGHT:\r
-       notify_orient = ELM_NOTIFY_ORIENT_RIGHT;\r
-       break;\r
+         notify_orient = ELM_NOTIFY_ORIENT_RIGHT;\r
+         break;\r
       case ELM_POPUP_ORIENT_TOP_LEFT:\r
-       notify_orient = ELM_NOTIFY_ORIENT_TOP_LEFT;\r
-       break;\r
+         notify_orient = ELM_NOTIFY_ORIENT_TOP_LEFT;\r
+         break;\r
       case ELM_POPUP_ORIENT_TOP_RIGHT:\r
-       notify_orient = ELM_NOTIFY_ORIENT_TOP_RIGHT;\r
-       break;\r
+         notify_orient = ELM_NOTIFY_ORIENT_TOP_RIGHT;\r
+         break;\r
       case ELM_POPUP_ORIENT_BOTTOM_LEFT:\r
-       notify_orient = ELM_NOTIFY_ORIENT_BOTTOM_LEFT;\r
-       break;\r
+         notify_orient = ELM_NOTIFY_ORIENT_BOTTOM_LEFT;\r
+         break;\r
       case ELM_POPUP_ORIENT_BOTTOM_RIGHT:\r
-       notify_orient = ELM_NOTIFY_ORIENT_BOTTOM_RIGHT;\r
-       break;\r
+         notify_orient = ELM_NOTIFY_ORIENT_BOTTOM_RIGHT;\r
+         break;\r
      }\r
    wd->notify_orient = notify_orient;\r
    elm_notify_orient_set(wd->notify, notify_orient);\r
@@ -814,15 +807,15 @@ elm_popup_rotation_set(Evas_Object *obj, int rot_angle)
 {\r
    ELM_CHECK_WIDTYPE(obj, widtype);\r
    Widget_Data *wd = elm_widget_data_get(obj);\r
-   \r
+\r
    if (!wd) return;  \r
    if (wd->parent)\r
      {\r
-       if (wd->rot_angle != rot_angle)\r
-         {\r
-            elm_win_rotation_with_resize_set(wd->parent,rot_angle);\r
-            wd->rot_angle = rot_angle;\r
-         }\r
+        if (wd->rot_angle != rot_angle)\r
+          {\r
+             elm_win_rotation_with_resize_set(wd->parent,rot_angle);\r
+             wd->rot_angle = rot_angle;\r
+          }\r
      }\r
 }\r
 \r
@@ -868,12 +861,10 @@ elm_popup_run(Evas_Object *obj)
    evas_object_smart_callback_add(obj, "response", response_cb, &response_id); \r
    _elm_exit_handler = ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, _elm_signal_exit, &response_id);\r
    ecore_main_loop_begin();\r
-   if(_elm_exit_handler)\r
+   if (_elm_exit_handler)\r
      {\r
-       ecore_event_handler_del(_elm_exit_handler);\r
-       _elm_exit_handler = NULL; \r
+        ecore_event_handler_del(_elm_exit_handler);\r
+        _elm_exit_handler = NULL; \r
      }\r
    return response_id;\r
 }\r
-\r
-\r