diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-06-12 23:12:51 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-06-13 00:12:32 +0200 |
commit | cabc22e032b933a84335da9acbbf0721eed9c63f (patch) | |
tree | 3a4915b68672986d1a3fb1228d78e40cc80b103c /src/help.c | |
parent | 42c486d30d8e6f82d27651e19029e332af86cba3 (diff) | |
download | calcurse-cabc22e032b933a84335da9acbbf0721eed9c63f.zip |
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 <calcurse@cryptocrack.de>
Diffstat (limited to 'src/help.c')
-rw-r--r-- | src/help.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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)); |