summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgodly.talias <godly.talias@samsung.com>2015-11-10 15:15:29 -0800
committerCedric BAIL <cedric@osg.samsung.com>2015-11-10 15:15:31 -0800
commit178fad6d1c0435dfc724a7eea95423e362a7789d (patch)
tree67b2288fb63740d85a2a80d0b78de89b17f525e2
parentff8cf9a5037e4c30de0a668c75b15bf190906f0a (diff)
hoversel: add item disabling support.
Summary: Hoversel items can be disabled using elm_object_item_disabled_set @feature Test Plan: elementary_test Reviewers: prince.dubey, shilpasingh, raster, Hermet, conr2d, cedric Subscribers: poornima.srinivasan, rajeshps Differential Revision: https://phab.enlightenment.org/D3122 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--data/themes/edc/elm/button.edc5
-rw-r--r--src/bin/test_hoversel.c2
-rw-r--r--src/lib/elc_hoversel.c11
-rw-r--r--src/lib/elm_hoversel_item.eo1
4 files changed, 19 insertions, 0 deletions
diff --git a/data/themes/edc/elm/button.edc b/data/themes/edc/elm/button.edc
index f560a2aaa..92b026b04 100644
--- a/data/themes/edc/elm/button.edc
+++ b/data/themes/edc/elm/button.edc
@@ -1197,6 +1197,11 @@ group { name: "elm/button/base/hoversel_vertical_entry/default";
1197 visible: 1; 1197 visible: 1;
1198 } 1198 }
1199 } 1199 }
1200 rect { name: "block_events";
1201 desc { "default";
1202 color: 0 0 0 0;
1203 }
1204 }
1200 rect { name: "event"; 1205 rect { name: "event";
1201 desc { "default"; 1206 desc { "default";
1202 color: 0 0 0 0; 1207 color: 0 0 0 0;
diff --git a/src/bin/test_hoversel.c b/src/bin/test_hoversel.c
index 3e39ad009..15d420382 100644
--- a/src/bin/test_hoversel.c
+++ b/src/bin/test_hoversel.c
@@ -171,6 +171,8 @@ test_hoversel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
171 elm_hoversel_item_add(hoversel, "Item 2", NULL, ELM_ICON_NONE, NULL, NULL); 171 elm_hoversel_item_add(hoversel, "Item 2", NULL, ELM_ICON_NONE, NULL, NULL);
172 elm_hoversel_item_add(hoversel, "Item 3", NULL, ELM_ICON_NONE, NULL, NULL); 172 elm_hoversel_item_add(hoversel, "Item 3", NULL, ELM_ICON_NONE, NULL, NULL);
173 elm_hoversel_item_add(hoversel, "Item 4 - Long Label Here", "close", ELM_ICON_STANDARD, NULL, NULL); 173 elm_hoversel_item_add(hoversel, "Item 4 - Long Label Here", "close", ELM_ICON_STANDARD, NULL, NULL);
174 it = elm_hoversel_item_add(hoversel, "Item 5 - Disabled", NULL, ELM_ICON_NONE, NULL, NULL);
175 elm_object_item_disabled_set(it, EINA_TRUE);
174 evas_object_smart_callback_add(hoversel, "clicked", 176 evas_object_smart_callback_add(hoversel, "clicked",
175 _hoversel_clicked_cb, NULL); 177 _hoversel_clicked_cb, NULL);
176 evas_object_smart_callback_add(hoversel, "selected", 178 evas_object_smart_callback_add(hoversel, "selected",
diff --git a/src/lib/elc_hoversel.c b/src/lib/elc_hoversel.c
index 9f8ef4f31..d45b6873a 100644
--- a/src/lib/elc_hoversel.c
+++ b/src/lib/elc_hoversel.c
@@ -96,6 +96,8 @@ _elm_hoversel_elm_widget_theme_apply(Eo *obj, Elm_Hoversel_Data *sd)
96 ELM_HOVERSEL_ITEM_DATA_GET(eo_item, item); 96 ELM_HOVERSEL_ITEM_DATA_GET(eo_item, item);
97 elm_object_style_set(VIEW(item), buf); 97 elm_object_style_set(VIEW(item), buf);
98 elm_object_text_set(VIEW(item), item->label); 98 elm_object_text_set(VIEW(item), item->label);
99 elm_widget_disabled_set
100 (VIEW(item), eo_do_ret(eo_item, int_ret, elm_wdg_item_disabled_get()));
99 } 101 }
100 102
101 eina_stringshare_del(style); 103 eina_stringshare_del(style);
@@ -457,6 +459,15 @@ _on_parent_del(void *data,
457 elm_hoversel_hover_parent_set(data, NULL); 459 elm_hoversel_hover_parent_set(data, NULL);
458} 460}
459 461
462EOLIAN static void
463_elm_hoversel_item_elm_widget_item_disable(Eo *eo_hoversel_it,
464 Elm_Hoversel_Item_Data *hoversel_it EINA_UNUSED)
465{
466 Eina_Bool tmp;
467 elm_widget_disabled_set
468 (VIEW(hoversel_it), eo_do_ret(eo_hoversel_it, tmp, elm_wdg_item_disabled_get()));
469}
470
460static void 471static void
461_elm_hoversel_item_elm_widget_item_part_text_set(Eo *eo_it EINA_UNUSED, 472_elm_hoversel_item_elm_widget_item_part_text_set(Eo *eo_it EINA_UNUSED,
462 Elm_Hoversel_Item_Data *it, 473 Elm_Hoversel_Item_Data *it,
diff --git a/src/lib/elm_hoversel_item.eo b/src/lib/elm_hoversel_item.eo
index 39d076578..04efc85e7 100644
--- a/src/lib/elm_hoversel_item.eo
+++ b/src/lib/elm_hoversel_item.eo
@@ -20,6 +20,7 @@ class Elm.Hoversel_Item(Elm.Widget_Item)
20 implements { 20 implements {
21 Eo.Base.constructor; 21 Eo.Base.constructor;
22 Eo.Base.destructor; 22 Eo.Base.destructor;
23 Elm.Widget_Item.disable;
23 Elm.Widget_Item.signal_emit; 24 Elm.Widget_Item.signal_emit;
24 Elm.Widget_Item.part_text.set; 25 Elm.Widget_Item.part_text.set;
25 Elm.Widget_Item.part_text.get; 26 Elm.Widget_Item.part_text.get;