summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2012-06-05 12:21:17 +0000
committerChunEon Park <hermet@hermet.pe.kr>2012-06-05 12:21:17 +0000
commit03754367584f6d327e499157084ec71227d256da (patch)
treed6100697c8563f9f954c0c091c822f6e46aa8aaa /src
parentf161656713b99ed6daf7a7537352bd02437eefba (diff)
expedite - fixed indentations before fixing a bug
SVN revision: 71712
Diffstat (limited to 'src')
-rw-r--r--src/bin/ui.c45
1 files changed, 20 insertions, 25 deletions
diff --git a/src/bin/ui.c b/src/bin/ui.c
index 3dd05a5..d665561 100644
--- a/src/bin/ui.c
+++ b/src/bin/ui.c
@@ -435,13 +435,10 @@ _ui_mouse_down(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj __UNU
435 if (ev->button != 1) return; 435 if (ev->button != 1) return;
436 if (menu_active) 436 if (menu_active)
437 { 437 {
438 down_x = ev->canvas.x; 438 down_x = ev->canvas.x;
439 down_y = ev->canvas.y; 439 down_y = ev->canvas.y;
440 down++; 440 down++;
441 down_menu_sel = menu_sel; 441 down_menu_sel = menu_sel;
442 }
443 else
444 {
445 } 442 }
446} 443}
447 444
@@ -454,19 +451,19 @@ _ui_mouse_up(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj __UNUSE
454 if (ev->button != 1) return; 451 if (ev->button != 1) return;
455 if (menu_active) 452 if (menu_active)
456 { 453 {
457 Evas_Coord dx, dy; 454 Evas_Coord dx, dy;
458 455
459 dx = ev->canvas.x - down_x; 456 dx = ev->canvas.x - down_x;
460 dy = ev->canvas.y - down_y; 457 dy = ev->canvas.y - down_y;
461 if ((((dx * dx) + (dy * dy)) < (20 * 20)) && 458 if ((((dx * dx) + (dy * dy)) < (20 * 20)) &&
462 (menu_sel == down_menu_sel)) 459 (menu_sel == down_menu_sel))
463 _ui_select(); 460 _ui_select();
464 down--; 461 down--;
465 } 462 }
466 else 463 else
467 { 464 {
468 evas_event_feed_key_down(evas, "Escape", "Escape", NULL, NULL, 0, NULL); 465 evas_event_feed_key_down(evas, "Escape", "Escape", NULL, NULL, 0, NULL);
469 evas_event_feed_key_up(evas, "Escape", "Escape", NULL, NULL, 0, NULL); 466 evas_event_feed_key_up(evas, "Escape", "Escape", NULL, NULL, 0, NULL);
470 } 467 }
471} 468}
472 469
@@ -479,14 +476,12 @@ _ui_mouse_move(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj __UNU
479 if (!down) return; 476 if (!down) return;
480 if (menu_active) 477 if (menu_active)
481 { 478 {
482 menu_sel = down_menu_sel + ((ev->cur.canvas.x - down_x) / 25); 479 menu_sel = down_menu_sel + ((ev->cur.canvas.x - down_x) / 25);
483 /* scroll */ 480 /* scroll */
484 if (menu_sel < 0) menu_sel = 0; 481 if (menu_sel < 0) menu_sel = 0;
485 else if ((unsigned int)menu_sel >= eina_list_count(menu)) menu_sel = eina_list_count(menu) - 1; 482 else if ((unsigned int)menu_sel >= eina_list_count(menu))
486 menu_anim_sel = menu_sel; 483 menu_sel = eina_list_count(menu) - 1;
487 } 484 menu_anim_sel = menu_sel;
488 else
489 {
490 } 485 }
491} 486}
492 487