hermet pushed a commit to branch elementary-1.9. http://git.enlightenment.org/core/elementary.git/commit/?id=c3413c3387dd71f34e9453f1af39cc557ab594a6
commit c3413c3387dd71f34e9453f1af39cc557ab594a6 Author: Jaeun Choi <[email protected]> Date: Thu Apr 17 11:51:47 2014 +0900 spinner: fixed odd behavior of the spinner Summary: when multiple key down is coming while increase/decrease the spinner values, the speed acceleration will be reset by the new key down. Instead, it stops the increase/decrease the spinner values behavior. @fix Test Plan: None Reviewers: Hermet, raster CC: seoz Differential Revision: https://phab.enlightenment.org/D749 Conflicts: src/lib/elm_spinner.c --- src/lib/elm_spinner.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/lib/elm_spinner.c b/src/lib/elm_spinner.c index 2f62fff..8d89535 100644 --- a/src/lib/elm_spinner.c +++ b/src/lib/elm_spinner.c @@ -508,22 +508,15 @@ _elm_spinner_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list) (!strcmp(ev->key, "KP_Enter")) || (!strcmp(ev->key, "space"))) { - _entry_toggle_cb(NULL, obj, NULL, NULL); + if (sd->spin_timer) _val_dec_stop(obj); + else _entry_toggle_cb(NULL, obj, NULL, NULL); } + else if (sd->spin_timer) _val_dec_stop(obj); } else if (type == EVAS_CALLBACK_KEY_UP) { - if (!strcmp(ev->key, "Right") || - ((!strcmp(ev->key, "KP_Right")) && (!ev->string)) || - !strcmp(ev->key, "Up") || - ((!strcmp(ev->key, "KP_Up")) && (!ev->string))) - _val_inc_stop(obj); - else if (!strcmp(ev->key, "Left") || - ((!strcmp(ev->key, "KP_Left")) && (!ev->string)) || - !strcmp(ev->key, "Down") || - ((!strcmp(ev->key, "KP_Down")) && (!ev->string))) - _val_dec_stop(obj); - else return; + if (sd->spin_timer) _val_dec_stop(obj); + else return EINA_FALSE; goto success; } --
