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>
This commit is contained in:
Lukas Fleischer
2012-06-12 23:12:51 +02:00
parent 42c486d30d
commit cabc22e032
6 changed files with 88 additions and 4 deletions

View File

@@ -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);