summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShilpa Singh <shilpa.singh@samsung.com>2015-10-30 06:26:31 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-10-30 07:05:12 +0100
commitc1bda995f5bb6596173a1960c69f0b638adfe196 (patch)
tree73f16f975fa734d7022ef3a5c687f18ad59bcdfc
parent4990dd88492de3ce76fc21f1bfa42b345887728f (diff)
multibuttonentry: when item is clicked/selected, select function not called issue fix.
Summary: The select function set in item_append does not get called on item selection issue fix. As per documentation, the function has to get called. @fix Test Plan: elementary_test is updated with the demo Reviewers: navnbeet, Hermet, CHAN, cedric Reviewed By: cedric Differential Revision: https://phab.enlightenment.org/D3158 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/bin/test_multibuttonentry.c8
-rw-r--r--src/lib/elc_multibuttonentry.c3
2 files changed, 11 insertions, 0 deletions
diff --git a/src/bin/test_multibuttonentry.c b/src/bin/test_multibuttonentry.c
index 98000db0e..f66fc8c3f 100644
--- a/src/bin/test_multibuttonentry.c
+++ b/src/bin/test_multibuttonentry.c
@@ -171,6 +171,13 @@ _format_change_btn_add(Evas_Object *mbe)
171 return btn; 171 return btn;
172} 172}
173 173
174void
175_select_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
176{
177 Elm_Object_Item *it = (Elm_Object_Item *)event_info;
178 printf("select function called, item = %s\n", elm_object_item_text_get(it));
179}
180
174static Evas_Object* 181static Evas_Object*
175_add_multibuttonentry(Evas_Object *parent) 182_add_multibuttonentry(Evas_Object *parent)
176{ 183{
@@ -190,6 +197,7 @@ _add_multibuttonentry(Evas_Object *parent)
190 evas_object_size_hint_weight_set(mbe, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 197 evas_object_size_hint_weight_set(mbe, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
191 evas_object_size_hint_align_set(mbe, EVAS_HINT_FILL, EVAS_HINT_FILL); 198 evas_object_size_hint_align_set(mbe, EVAS_HINT_FILL, EVAS_HINT_FILL);
192 elm_object_content_set(scr, mbe); 199 elm_object_content_set(scr, mbe);
200 elm_multibuttonentry_item_append(mbe, "mbe", _select_cb, NULL);
193 201
194 // Add item verify callback to Multibuttonentry 202 // Add item verify callback to Multibuttonentry
195 elm_multibuttonentry_item_filter_append(mbe, _item_filter_cb, data); 203 elm_multibuttonentry_item_filter_append(mbe, _item_filter_cb, data);
diff --git a/src/lib/elc_multibuttonentry.c b/src/lib/elc_multibuttonentry.c
index 4df92c94e..99305b164 100644
--- a/src/lib/elc_multibuttonentry.c
+++ b/src/lib/elc_multibuttonentry.c
@@ -464,6 +464,9 @@ _item_select(Evas_Object *obj,
464 if (it) 464 if (it)
465 { 465 {
466 _current_item_change(obj, EO_OBJ(it)); 466 _current_item_change(obj, EO_OBJ(it));
467
468 if (it->func) it->func((void *)(WIDGET_ITEM_DATA_GET(EO_OBJ(it))), WIDGET(it), EO_OBJ(it));
469
467 if (elm_widget_focus_get(obj)) 470 if (elm_widget_focus_get(obj))
468 { 471 {
469 elm_object_focus_set(sd->entry, EINA_FALSE); 472 elm_object_focus_set(sd->entry, EINA_FALSE);