summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordivyesh purohit <div.purohit@samsung.com>2016-01-22 11:00:20 -0800
committerCedric BAIL <cedric@osg.samsung.com>2016-01-22 12:10:14 -0800
commit8800fbc8394547e2a5c904b696328d493faa644a (patch)
tree49511ec40d034e869fa96b480a865486b8e627ab /src
parent0f6e1a46a402fd9cf848ffb1bd47c6b406eb7ffa (diff)
combobox: "return" key handled correctly and removed unreachable code.
Summary: _key_action_activate was triggered when "return" was pressed, _key_action_move contained the "return" key handling, which is unreachable code. @fix T3075 (1st point). Signed-off-by: divyesh purohit <div.purohit@samsung.com> Test Plan: please run combobox example in elementary_test Reviewers: shilpasingh, cedric, raster Subscribers: rajeshps, govi Maniphest Tasks: T3075 Differential Revision: https://phab.enlightenment.org/D3599 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/lib/elc_combobox.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/lib/elc_combobox.c b/src/lib/elc_combobox.c
index cb2a835f1..3d1a80818 100644
--- a/src/lib/elc_combobox.c
+++ b/src/lib/elc_combobox.c
@@ -384,9 +384,7 @@ _key_action_move(Evas_Object *obj, const char *params)
384 const char *dir = params; 384 const char *dir = params;
385 if (!sd->hover) return EINA_FALSE; 385 if (!sd->hover) return EINA_FALSE;
386 386
387 if (!strcmp(dir, "return")) 387 if (!strcmp(dir, "up"))
388 eo_do(obj, eo_event_callback_call(ELM_COMBOBOX_EVENT_CLICKED, NULL));
389 else if (!strcmp(dir, "up"))
390 { 388 {
391 it = sd->item; 389 it = sd->item;
392 it = elm_genlist_item_prev_get(it); 390 it = elm_genlist_item_prev_get(it);
@@ -409,7 +407,15 @@ _key_action_move(Evas_Object *obj, const char *params)
409static Eina_Bool 407static Eina_Bool
410_key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED) 408_key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED)
411{ 409{
412 elm_combobox_hover_begin(obj); 410 ELM_COMBOBOX_DATA_GET(obj, sd);
411 if (!sd->expanded)
412 elm_combobox_hover_begin(obj);
413 else
414 {
415 eo_do(sd->genlist, eo_event_callback_call(EVAS_CLICKABLE_INTERFACE_EVENT_PRESSED,
416 sd->item));
417 elm_entry_cursor_end_set(sd->entry);
418 }
413 return EINA_TRUE; 419 return EINA_TRUE;
414} 420}
415 421