summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaeun Choi <jaeun12.choi@samsung.com>2014-04-17 11:51:47 +0900
committerChunEon Park <hermet@hermet.pe.kr>2014-04-17 12:01:55 +0900
commitc3413c3387dd71f34e9453f1af39cc557ab594a6 (patch)
tree5f3475a088ef2c7c1ad6aaa0acc5d01008e1ca58
parentc95c9ac129402be1cf6d8e46aaf4d9f04d74a7bf (diff)
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
-rw-r--r--src/lib/elm_spinner.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/lib/elm_spinner.c b/src/lib/elm_spinner.c
index 2f62fff03..8d89535c9 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)
508 (!strcmp(ev->key, "KP_Enter")) || 508 (!strcmp(ev->key, "KP_Enter")) ||
509 (!strcmp(ev->key, "space"))) 509 (!strcmp(ev->key, "space")))
510 { 510 {
511 _entry_toggle_cb(NULL, obj, NULL, NULL); 511 if (sd->spin_timer) _val_dec_stop(obj);
512 else _entry_toggle_cb(NULL, obj, NULL, NULL);
512 } 513 }
514 else if (sd->spin_timer) _val_dec_stop(obj);
513 } 515 }
514 else if (type == EVAS_CALLBACK_KEY_UP) 516 else if (type == EVAS_CALLBACK_KEY_UP)
515 { 517 {
516 if (!strcmp(ev->key, "Right") || 518 if (sd->spin_timer) _val_dec_stop(obj);
517 ((!strcmp(ev->key, "KP_Right")) && (!ev->string)) || 519 else return EINA_FALSE;
518 !strcmp(ev->key, "Up") ||
519 ((!strcmp(ev->key, "KP_Up")) && (!ev->string)))
520 _val_inc_stop(obj);
521 else if (!strcmp(ev->key, "Left") ||
522 ((!strcmp(ev->key, "KP_Left")) && (!ev->string)) ||
523 !strcmp(ev->key, "Down") ||
524 ((!strcmp(ev->key, "KP_Down")) && (!ev->string)))
525 _val_dec_stop(obj);
526 else return;
527 520
528 goto success; 521 goto success;
529 } 522 }