summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-05-23 09:31:50 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-05-23 09:31:50 -0400
commit0d8856b24a4ec3cff2bcf7e99cd4c5669305f71b (patch)
tree6a2def5f6e5845289c3a91894346e7ac78db4b19
parentbca846d846e1e225ac506a0a50b27c967710a62d (diff)
elm_color_class: use legacy event for genlist selection
Summary: this fixes the selection callback and makes the widget work again @fix Reviewers: bu5hm4n Reviewed By: bu5hm4n Subscribers: bu5hm4n, cedric, #reviewers, #committers Tags: #efl_widgets Differential Revision: https://phab.enlightenment.org/D8913
-rw-r--r--src/lib/elementary/elm_color_class.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/elementary/elm_color_class.c b/src/lib/elementary/elm_color_class.c
index 9f90ae6baf..cd85f52175 100644
--- a/src/lib/elementary/elm_color_class.c
+++ b/src/lib/elementary/elm_color_class.c
@@ -152,14 +152,14 @@ _colorclass_changed(void *data, const Efl_Event *event EINA_UNUSED)
152} 152}
153 153
154static void 154static void
155_colorclass_reset(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) 155_colorclass_reset(void *data, const Efl_Event *event EINA_UNUSED)
156{ 156{
157 Colorclass_UI *cc = data; 157 Colorclass_UI *cc = data;
158 Colorclass color; 158 Colorclass color;
159 159
160 if (!cc->current) 160 if (!cc->current)
161 { 161 {
162 efl_event_callback_stop(obj); 162 efl_event_callback_stop(event->object);
163 return; 163 return;
164 } 164 }
165 //if (cc->winid && remote_iface) 165 //if (cc->winid && remote_iface)
@@ -194,10 +194,10 @@ _colorclass_reset(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
194} 194}
195 195
196static void 196static void
197_colorclass_activate(void *data, const Efl_Event *event) 197_colorclass_activate(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
198{ 198{
199 Colorclass_UI *cc = data; 199 Colorclass_UI *cc = data;
200 Elm_Object_Item *it = event->info; 200 Elm_Object_Item *it = event_info;
201 Edje_Color_Class *ecc; 201 Edje_Color_Class *ecc;
202 Colorclass *lcc; 202 Colorclass *lcc;
203 Eina_List *l; 203 Eina_List *l;
@@ -742,15 +742,15 @@ elm_color_class_editor_add(Evas_Object *obj)
742 elm_scroller_policy_set(gl, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO); 742 elm_scroller_policy_set(gl, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO);
743 elm_genlist_mode_set(gl, ELM_LIST_COMPRESS); 743 elm_genlist_mode_set(gl, ELM_LIST_COMPRESS);
744 elm_object_part_content_set(ly, "elm.swallow.list", gl); 744 elm_object_part_content_set(ly, "elm.swallow.list", gl);
745 efl_event_callback_add 745 evas_object_smart_callback_add(gl, "selected", _colorclass_activate, cc);
746 (gl, EFL_UI_EVENT_ITEM_SELECTED, _colorclass_activate, cc);
747 746
748 cc->reset = bt = elm_button_add(ly); 747 cc->reset = bt = elm_button_add(ly);
749 elm_object_style_set(bt, "colorclass"); 748 elm_object_style_set(bt, "colorclass");
750 /* FIXME: translate */ 749 /* FIXME: translate */
751 elm_object_text_set(bt, "Reset"); 750 elm_object_text_set(bt, "Reset");
752 elm_object_part_content_set(ly, "elm.swallow.reset", bt); 751 elm_object_part_content_set(ly, "elm.swallow.reset", bt);
753 evas_object_smart_callback_add(bt, "clicked", _colorclass_reset, cc); 752 efl_event_callback_add
753 (bt, EFL_UI_EVENT_CLICKED, _colorclass_reset, cc);
754 754
755 cc->cs = cs = elm_colorselector_add(ly); 755 cc->cs = cs = elm_colorselector_add(ly);
756 elm_colorselector_mode_set(cs, ELM_COLORSELECTOR_COMPONENTS); 756 elm_colorselector_mode_set(cs, ELM_COLORSELECTOR_COMPONENTS);