From: seoz Date: Sun, 27 Feb 2011 22:59:12 +0000 (+0000) Subject: Elementary elm_button.c: Fix formatting. X-Git-Tag: REL_F_I9500_20120323_1~17^2~3105 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bf9dd98111310f1750959aecb677339adbceefc8;p=framework%2Fuifw%2Felementary.git Elementary elm_button.c: Fix formatting. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@57400 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/elm_button.c b/src/lib/elm_button.c index fc5bd27..790c5a9 100644 --- a/src/lib/elm_button.c +++ b/src/lib/elm_button.c @@ -41,10 +41,10 @@ static const char SIG_CLICKED[] = "clicked"; static const char SIG_REPEATED[] = "repeated"; static const char SIG_UNPRESSED[] = "unpressed"; static const Evas_Smart_Cb_Description _signals[] = { - {SIG_CLICKED, ""}, - {SIG_REPEATED, ""}, - {SIG_UNPRESSED, ""}, - {NULL, NULL} + {SIG_CLICKED, ""}, + {SIG_REPEATED, ""}, + {SIG_UNPRESSED, ""}, + {NULL, NULL} }; static Eina_Bool @@ -59,7 +59,7 @@ _event_hook(Evas_Object *obj, Evas_Object *src __UNUSED__, Evas_Callback_Type ty if ((strcmp(ev->keyname, "Return")) && (strcmp(ev->keyname, "KP_Enter")) && (strcmp(ev->keyname, "space"))) - return EINA_FALSE; + return EINA_FALSE; _activate(obj); ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; edje_object_signal_emit(wd->btn, "elm,anim,activate", "elm"); @@ -82,13 +82,13 @@ _on_focus_hook(void *data __UNUSED__, Evas_Object *obj) if (!wd) return; if (elm_widget_focus_get(obj)) { - edje_object_signal_emit(wd->btn, "elm,action,focus", "elm"); - evas_object_focus_set(wd->btn, EINA_TRUE); + edje_object_signal_emit(wd->btn, "elm,action,focus", "elm"); + evas_object_focus_set(wd->btn, EINA_TRUE); } else { - edje_object_signal_emit(wd->btn, "elm,action,unfocus", "elm"); - evas_object_focus_set(wd->btn, EINA_FALSE); + edje_object_signal_emit(wd->btn, "elm,action,unfocus", "elm"); + evas_object_focus_set(wd->btn, EINA_FALSE); } } @@ -110,25 +110,25 @@ _theme_hook(Evas_Object *obj) _mirrored_set(obj, elm_widget_mirrored_get(obj)); _elm_theme_object_set(obj, wd->btn, "button", "base", elm_widget_style_get(obj)); if (wd->icon) - edje_object_part_swallow(wd->btn, "elm.swallow.content", wd->icon); + edje_object_part_swallow(wd->btn, "elm.swallow.content", wd->icon); if (wd->label) - edje_object_signal_emit(wd->btn, "elm,state,text,visible", "elm"); + edje_object_signal_emit(wd->btn, "elm,state,text,visible", "elm"); else - edje_object_signal_emit(wd->btn, "elm,state,text,hidden", "elm"); + edje_object_signal_emit(wd->btn, "elm,state,text,hidden", "elm"); if (wd->icon) - edje_object_signal_emit(wd->btn, "elm,state,icon,visible", "elm"); + edje_object_signal_emit(wd->btn, "elm,state,icon,visible", "elm"); else - edje_object_signal_emit(wd->btn, "elm,state,icon,hidden", "elm"); + edje_object_signal_emit(wd->btn, "elm,state,icon,hidden", "elm"); edje_object_part_text_set(wd->btn, "elm.text", wd->label); if (elm_object_disabled_get(obj)) - edje_object_signal_emit(wd->btn, "elm,state,disabled", "elm"); + edje_object_signal_emit(wd->btn, "elm,state,disabled", "elm"); edje_object_message_signal_process(wd->btn); edje_object_scale_set(wd->btn, elm_widget_scale_get(obj) * _elm_config->scale); str = edje_object_data_get(wd->btn, "focus_highlight"); if ((str) && (!strcmp(str, "on"))) - elm_widget_highlight_in_theme_set(obj, EINA_TRUE); + elm_widget_highlight_in_theme_set(obj, EINA_TRUE); else - elm_widget_highlight_in_theme_set(obj, EINA_FALSE); + elm_widget_highlight_in_theme_set(obj, EINA_FALSE); _sizing_eval(obj); } @@ -138,9 +138,9 @@ _disable_hook(Evas_Object *obj) Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; if (elm_widget_disabled_get(obj)) - edje_object_signal_emit(wd->btn, "elm,state,disabled", "elm"); + edje_object_signal_emit(wd->btn, "elm,state,disabled", "elm"); else - edje_object_signal_emit(wd->btn, "elm,state,enabled", "elm"); + edje_object_signal_emit(wd->btn, "elm,state,enabled", "elm"); } static void @@ -197,12 +197,12 @@ _sub_del(void *data __UNUSED__, Evas_Object *obj, void *event_info) if (!wd) return; if (sub == wd->icon) { - edje_object_signal_emit(wd->btn, "elm,state,icon,hidden", "elm"); - evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS, - _changed_size_hints, obj); - wd->icon = NULL; - edje_object_message_signal_process(wd->btn); - _sizing_eval(obj); + edje_object_signal_emit(wd->btn, "elm,state,icon,hidden", "elm"); + evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS, + _changed_size_hints, obj); + wd->icon = NULL; + edje_object_message_signal_process(wd->btn); + _sizing_eval(obj); } } @@ -213,8 +213,8 @@ _activate(Evas_Object *obj) if (!wd) return; if (wd->timer) { - ecore_timer_del(wd->timer); - wd->timer = NULL; + ecore_timer_del(wd->timer); + wd->timer = NULL; } wd->repeating = EINA_FALSE; evas_object_smart_callback_call(obj, SIG_CLICKED, NULL); @@ -241,8 +241,8 @@ _autorepeat_send(void *data) evas_object_smart_callback_call(data, SIG_REPEATED, NULL); if (!wd->repeating) { - wd->timer = NULL; - return ECORE_CALLBACK_CANCEL; + wd->timer = NULL; + return ECORE_CALLBACK_CANCEL; } return ECORE_CALLBACK_RENEW; @@ -270,10 +270,10 @@ _signal_pressed(void *data, Evas_Object *obj __UNUSED__, const char *emission __ if ((wd->autorepeat) && (!wd->repeating)) { - if (wd->ar_threshold <= 0.0) - _autorepeat_initial_send(data); /* call immediately */ - else - wd->timer = ecore_timer_add(wd->ar_threshold, _autorepeat_initial_send, data); + if (wd->ar_threshold <= 0.0) + _autorepeat_initial_send(data); /* call immediately */ + else + wd->timer = ecore_timer_add(wd->ar_threshold, _autorepeat_initial_send, data); } } @@ -285,8 +285,8 @@ _signal_unpressed(void *data, Evas_Object *obj __UNUSED__, const char *emission if (wd->timer) { - ecore_timer_del(wd->timer); - wd->timer = NULL; + ecore_timer_del(wd->timer); + wd->timer = NULL; } wd->repeating = EINA_FALSE; evas_object_smart_callback_call(data, SIG_UNPRESSED, NULL); @@ -363,9 +363,9 @@ elm_button_label_set(Evas_Object *obj, const char *label) if (!wd) return; eina_stringshare_replace(&wd->label, label); if (label) - edje_object_signal_emit(wd->btn, "elm,state,text,visible", "elm"); + edje_object_signal_emit(wd->btn, "elm,state,text,visible", "elm"); else - edje_object_signal_emit(wd->btn, "elm,state,text,hidden", "elm"); + edje_object_signal_emit(wd->btn, "elm,state,text,hidden", "elm"); edje_object_message_signal_process(wd->btn); edje_object_part_text_set(wd->btn, "elm.text", label); _sizing_eval(obj); @@ -403,12 +403,12 @@ elm_button_icon_set(Evas_Object *obj, Evas_Object *icon) wd->icon = icon; if (icon) { - elm_widget_sub_object_add(obj, icon); - evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS, - _changed_size_hints, obj); - edje_object_part_swallow(wd->btn, "elm.swallow.content", icon); - edje_object_signal_emit(wd->btn, "elm,state,icon,visible", "elm"); - edje_object_message_signal_process(wd->btn); + elm_widget_sub_object_add(obj, icon); + evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS, + _changed_size_hints, obj); + edje_object_part_swallow(wd->btn, "elm.swallow.content", icon); + edje_object_signal_emit(wd->btn, "elm,state,icon,visible", "elm"); + edje_object_message_signal_process(wd->btn); } _sizing_eval(obj); } @@ -513,8 +513,8 @@ elm_button_autorepeat_initial_timeout_set(Evas_Object *obj, double t) if (wd->ar_threshold == t) return; if (wd->timer) { - ecore_timer_del(wd->timer); - wd->timer = NULL; + ecore_timer_del(wd->timer); + wd->timer = NULL; } wd->ar_threshold = t; }