cedric pushed a commit to branch master.

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

commit fb7c19f9d6f4a3318a934d8c04261740599bdc05
Author: Subodh Kumar <s7158.ku...@samsung.com>
Date:   Wed Jan 6 11:26:18 2016 -0800

    segment_control: check item disable
    
    Summary:
    Elm segment_control: check item disable
    
    Signed-off by: @adrien
    
    Refer T2883
    
    @fix
    
    Test Plan: NA
    
    Reviewers: cedric
    
    Subscribers: adrien
    
    Projects: #elementary
    
    Differential Revision: https://phab.enlightenment.org/D3531
    
    Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/elm_segment_control.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/lib/elm_segment_control.c b/src/lib/elm_segment_control.c
index 68d46da..2b6452a 100644
--- a/src/lib/elm_segment_control.c
+++ b/src/lib/elm_segment_control.c
@@ -202,7 +202,8 @@ _update_list(Elm_Segment_Control_Data *sd)
         else
           edje_object_signal_emit(VIEW(it), "elm,state,segment,normal", "elm");
 
-        if (elm_widget_disabled_get(sd->obj))
+        if (elm_widget_disabled_get(sd->obj)
+            || elm_object_item_disabled_get(eo_it))
           edje_object_signal_emit(VIEW(it), "elm,state,disabled", "elm");
         else
           edje_object_signal_emit(VIEW(it), "elm,state,enabled", "elm");
@@ -309,6 +310,8 @@ _segment_on(Elm_Segment_Control_Item_Data *it)
 
    if (it == sd->selected_item) return;
 
+   if (elm_object_item_disabled_get(EO_OBJ(it))) return;
+
    if (sd->selected_item) _segment_off(sd->selected_item);
 
    edje_object_signal_emit(VIEW(it), "elm,state,segment,selected", "elm");

-- 


Reply via email to