From 42c486d30d8e6f82d27651e19029e332af86cba3 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 12 Jun 2012 22:42:28 +0200 Subject: Rename displacement enumeration elements * Rename "LEFT" to "DAY_PREV", "RIGHT" to "DAY_NEXT", "UP" to "WEEK_PREV" and "DOWN" to "WEEK_NEXT" to reflect the semantics of these operations. Remove the unneeded "MOVES" element. * Reorder code to improve consistency. Signed-off-by: Lukas Fleischer --- src/calcurse.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/calcurse.c') diff --git a/src/calcurse.c b/src/calcurse.c index 9e42eee..e80e9dc 100644 --- a/src/calcurse.c +++ b/src/calcurse.c @@ -398,19 +398,19 @@ int main(int argc, char **argv) wins_update(FLAG_ALL); break; - case KEY_GENERIC_NEXT_DAY: - case KEY_MOVE_RIGHT: - if (wins_slctd() == CAL || key == KEY_GENERIC_NEXT_DAY) { - calendar_move(RIGHT, count); + case KEY_GENERIC_PREV_DAY: + case KEY_MOVE_LEFT: + if (wins_slctd() == CAL || key == KEY_GENERIC_PREV_DAY) { + calendar_move(DAY_PREV, count); inday = do_storage(1); wins_update(FLAG_CAL | FLAG_APP); } break; - case KEY_GENERIC_PREV_DAY: - case KEY_MOVE_LEFT: - if (wins_slctd() == CAL || key == KEY_GENERIC_PREV_DAY) { - calendar_move(LEFT, count); + case KEY_GENERIC_NEXT_DAY: + case KEY_MOVE_RIGHT: + if (wins_slctd() == CAL || key == KEY_GENERIC_NEXT_DAY) { + calendar_move(DAY_NEXT, count); inday = do_storage(1); wins_update(FLAG_CAL | FLAG_APP); } @@ -419,7 +419,7 @@ int main(int argc, char **argv) case KEY_GENERIC_PREV_WEEK: case KEY_MOVE_UP: if (wins_slctd() == CAL || key == KEY_GENERIC_PREV_WEEK) { - calendar_move(UP, count); + calendar_move(WEEK_PREV, count); inday = do_storage(1); wins_update(FLAG_CAL | FLAG_APP); } else if (wins_slctd() == APP) { @@ -441,7 +441,7 @@ int main(int argc, char **argv) case KEY_GENERIC_NEXT_WEEK: case KEY_MOVE_DOWN: if (wins_slctd() == CAL || key == KEY_GENERIC_NEXT_WEEK) { - calendar_move(DOWN, count); + calendar_move(WEEK_NEXT, count); inday = do_storage(1); wins_update(FLAG_CAL | FLAG_APP); } else if (wins_slctd() == APP) { -- cgit v1.2.3-54-g00ecf