From cabc22e032b933a84335da9acbbf0721eed9c63f Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 12 Jun 2012 23:12:51 +0200 Subject: Add key bindings to go to the previous/next month/year In addition to generic key bindings for moving one day (week) forward/backward, define similar bindings for moving a month or a year. Of course, count prefixes are allowed here as well. Also add status bar hints and help texts. Signed-off-by: Lukas Fleischer --- src/calcurse.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/calcurse.c') diff --git a/src/calcurse.c b/src/calcurse.c index e80e9dc..09baab5 100644 --- a/src/calcurse.c +++ b/src/calcurse.c @@ -460,6 +460,30 @@ int main(int argc, char **argv) } break; + case KEY_GENERIC_PREV_MONTH: + calendar_move(MONTH_PREV, count); + inday = do_storage(1); + wins_update(FLAG_CAL | FLAG_APP); + break; + + case KEY_GENERIC_NEXT_MONTH: + calendar_move(MONTH_NEXT, count); + inday = do_storage(1); + wins_update(FLAG_CAL | FLAG_APP); + break; + + case KEY_GENERIC_PREV_YEAR: + calendar_move(YEAR_PREV, count); + inday = do_storage(1); + wins_update(FLAG_CAL | FLAG_APP); + break; + + case KEY_GENERIC_NEXT_YEAR: + calendar_move(YEAR_NEXT, count); + inday = do_storage(1); + wins_update(FLAG_CAL | FLAG_APP); + break; + case KEY_START_OF_WEEK: if (wins_slctd() == CAL) { calendar_move(WEEK_START, count); -- cgit v1.2.3-54-g00ecf