hermet pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=8cad71506bcbc0d4493f8fb1b886677f0f8de879

commit 8cad71506bcbc0d4493f8fb1b886677f0f8de879
Author: Jaeun Choi <jaeun12.c...@samsung.com>
Date:   Fri Apr 18 11:53:27 2014 +0900

    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
---
 src/lib/elm_slider.c | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/src/lib/elm_slider.c b/src/lib/elm_slider.c
index 02a6d7f..3faf69b 100644
--- a/src/lib/elm_slider.c
+++ b/src/lib/elm_slider.c
@@ -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)
      {

-- 


Reply via email to