slider: removed unnecessary key value check in case of key up event

Summary:
This patch removes unnecessary codes.
There is no need to check key value in case of key up event,
since any other key down event except direction keys will cancel sliding.
Instead, hide popup if the popup is visible at that point.

Test Plan: None

Reviewers: Hermet, raster

Reviewed By: Hermet

Differential Revision: https://phab.enlightenment.org/D760
This commit is contained in:
Jaeun Choi 2014-04-18 11:53:27 +09:00 committed by ChunEon Park
parent f8a26ed1fa
commit fcd6880b6c
1 changed files with 3 additions and 14 deletions

View File

@ -393,20 +393,9 @@ _elm_slider_elm_widget_event(Eo *obj, Elm_Slider_Data *sd, Evas_Object *src, Eva
}
else if (type == EVAS_CALLBACK_KEY_UP)
{
Evas_Event_Key_Up *ev_up = event_info;
if ((!ev_up->string) &&
((!strcmp(ev_up->key, "Left")) ||
(!strcmp(ev_up->key, "KP_Left")) ||
(!strcmp(ev_up->key, "Right")) ||
(!strcmp(ev_up->key, "KP_Right")) ||
(!strcmp(ev_up->key, "Up")) ||
(!strcmp(ev_up->key, "KP_Up")) ||
(!strcmp(ev_up->key, "Down")) ||
(!strcmp(ev_up->key, "KP_Down"))))
_popup_hide(obj, NULL, NULL, NULL);
return EINA_FALSE;
if (evas_object_visible_get(sd->popup))
_popup_hide(obj, NULL, NULL, NULL);
return EINA_FALSE;
}
else if (type == EVAS_CALLBACK_MOUSE_WHEEL)
{