cedric pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=3bba0dc870622ded9e9bdd9d7fc8378560d8dc7b

commit 3bba0dc870622ded9e9bdd9d7fc8378560d8dc7b
Author: Sung-Taek Hong <sth253.h...@samsung.com>
Date:   Wed Jul 29 20:20:20 2015 +0200

    elm_radio: enable state change when radio is disabled
    
    Summary:
    Currently, radio is set EINA_FALSE when radio is disabled.
    This causes unexpected behavior when the radio is selected and
    get disabled. Using elm_radio_value_get() API will return
    the value of disabled radio. This is not consistent with setting
    EINA_FALSE when radio is disabled. Thus, disabled radio should
    also have selected and unselected states.
    
    Reviewers: woohyun, smohanty, Hermet, cedric
    
    Reviewed By: cedric
    
    Differential Revision: https://phab.enlightenment.org/D2880
    
    Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/elm_radio.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/lib/elm_radio.c b/src/lib/elm_radio.c
index 715b5a8..e921e9d 100644
--- a/src/lib/elm_radio.c
+++ b/src/lib/elm_radio.c
@@ -50,7 +50,7 @@ _state_set(Evas_Object *obj, Eina_Bool state)
 {
    ELM_RADIO_DATA_GET(obj, sd);
 
-   if ((state != sd->state) && (!elm_widget_disabled_get(obj)))
+   if (state != sd->state)
      {
         sd->state = state;
         if (sd->state)
@@ -199,7 +199,7 @@ _elm_radio_elm_widget_theme_apply(Eo *obj, Elm_Radio_Data 
*sd)
    if (sd->state) elm_layout_signal_emit(obj, "elm,state,radio,on", "elm");
    else elm_layout_signal_emit(obj, "elm,state,radio,off", "elm");
 
-   if (elm_widget_disabled_get(obj) && sd->state) _state_set(obj, EINA_FALSE);
+   if (sd->state) _state_set(obj, EINA_FALSE);
 
    edje_object_message_signal_process(wd->resize_obj);
 
@@ -220,8 +220,6 @@ _elm_radio_elm_widget_disable(Eo *obj, Elm_Radio_Data *sd)
    eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_disable());
    if (!int_ret) return EINA_FALSE;
 
-   if (elm_widget_disabled_get(obj) && sd->state) _state_set(obj, EINA_FALSE);
-
    return EINA_TRUE;
 }
 

-- 


Reply via email to