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/help.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/help.c') diff --git a/src/help.c b/src/help.c index 2cae3cc..c61a4e0 100644 --- a/src/help.c +++ b/src/help.c @@ -120,6 +120,10 @@ help_write_pad(struct window *win, char *title, char *text, enum key action) case KEY_GENERIC_NEXT_DAY: case KEY_GENERIC_PREV_WEEK: case KEY_GENERIC_NEXT_WEEK: + case KEY_GENERIC_PREV_MONTH: + case KEY_GENERIC_NEXT_MONTH: + case KEY_GENERIC_PREV_YEAR: + case KEY_GENERIC_NEXT_YEAR: case KEY_GENERIC_GOTO_TODAY: case KEY_GENERIC_CREDITS: case KEY_GENERIC_CUT: @@ -216,6 +220,10 @@ static int wanted_page(int ch) case KEY_GENERIC_NEXT_DAY: case KEY_GENERIC_PREV_WEEK: case KEY_GENERIC_NEXT_WEEK: + case KEY_GENERIC_PREV_MONTH: + case KEY_GENERIC_NEXT_MONTH: + case KEY_GENERIC_PREV_YEAR: + case KEY_GENERIC_NEXT_YEAR: case KEY_GENERIC_GOTO_TODAY: page = HELP_GENERAL; break; @@ -694,6 +702,10 @@ void help_screen(void) " '%s' : +1 Day -> move to next day\n" " '%s' : -1 Week -> move to previous week\n" " '%s' : +1 Week -> move to next week\n" + " '%s' : -1 Month -> move to previous month\n" + " '%s' : +1 Month -> move to next month\n" + " '%s' : -1 Year -> move to previous year\n" + " '%s' : +1 Year -> move to next year\n" " '%s' : Goto today -> move to current day\n" "\nThe '%s' and '%s' keys are used to scroll text upward or downward\n" "when inside specific screens such the help screens for example.\n" @@ -706,6 +718,10 @@ void help_screen(void) keys_action_firstkey(KEY_GENERIC_NEXT_DAY), keys_action_firstkey(KEY_GENERIC_PREV_WEEK), keys_action_firstkey(KEY_GENERIC_NEXT_WEEK), + keys_action_firstkey(KEY_GENERIC_PREV_MONTH), + keys_action_firstkey(KEY_GENERIC_NEXT_MONTH), + keys_action_firstkey(KEY_GENERIC_PREV_YEAR), + keys_action_firstkey(KEY_GENERIC_NEXT_YEAR), keys_action_firstkey(KEY_GENERIC_GOTO_TODAY), keys_action_firstkey(KEY_GENERIC_SCROLL_UP), keys_action_firstkey(KEY_GENERIC_SCROLL_DOWN)); -- cgit v1.2.3-54-g00ecf