From: Rajeev Ranjan Date: Thu, 21 Oct 2010 04:38:35 +0000 (+0530) Subject: [src/lib/elm_button.c] Code change to let the text change based on the current state... X-Git-Tag: sbs-working-i386~138^2~6^2~6^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=233ddec6d2f41f929ec71b5311455957de35dd55;p=framework%2Fuifw%2Felementary.git [src/lib/elm_button.c] Code change to let the text change based on the current state if set in advance. Not setting maximum size hint to -1 in _sizing_eval as if set by the user then it should not be overwritten. --- diff --git a/src/lib/elm_button.c b/src/lib/elm_button.c index 4e9d4bb..ffd7633 100644 --- a/src/lib/elm_button.c +++ b/src/lib/elm_button.c @@ -87,10 +87,10 @@ _on_focus_hook(void *data __UNUSED__, Evas_Object *obj) { if(wd->statelabel[DEFAULT]) _set_label(obj, wd->statelabel[DEFAULT]); -#if 0 +//#if 0 else _set_label(obj, wd->label); -#endif +//#endif edje_object_signal_emit(wd->btn, "elm,action,unfocus", "elm"); evas_object_focus_set(wd->btn, EINA_FALSE); } @@ -141,10 +141,10 @@ _disable_hook(Evas_Object *obj) { if(wd->statelabel[DEFAULT]) _set_label(obj, wd->statelabel[DEFAULT]); -#if 0 +//#if 0 else _set_label(obj, wd->label); -#endif +//#endif edje_object_signal_emit(wd->btn, "elm,state,enabled", "elm"); } } @@ -166,7 +166,7 @@ _sizing_eval(Evas_Object *obj) if (h > minh) minh = h; evas_object_size_hint_min_set(obj, minw, minh); - evas_object_size_hint_max_set(obj, maxw, maxh); + //evas_object_size_hint_max_set(obj, maxw, maxh); } static void @@ -207,9 +207,9 @@ _signal_clicked(void *data, Evas_Object *obj, const char *emission, const char * } wd->repeating = EINA_FALSE; evas_object_smart_callback_call(data, SIG_CLICKED, NULL); -#if 0 +//#if 0 _signal_unpressed(data, obj, emission, source); /* safe guard when the theme does not emit the 'unpress' signal */ -#endif +//#endif } static Eina_Bool @@ -268,10 +268,10 @@ _signal_default_text_set(void *data, Evas_Object *obj, const char *emission, con if (!wd) return; if(wd->statelabel[DEFAULT]) _set_label(data, wd->statelabel[DEFAULT]); -#if 0 +//#if 0 else _set_label(data, wd->label); -#endif +//#endif return; } @@ -282,10 +282,10 @@ _signal_unpressed(void *data, Evas_Object *obj __UNUSED__, const char *emission if (!wd) return; if(wd->statelabel[DEFAULT]) _set_label(data, wd->statelabel[DEFAULT]); -#if 0 +//#if 0 else _set_label(data, wd->label); -#endif +//#endif if (wd->timer) {