summaryrefslogtreecommitdiff
path: root/src/calcurse.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2012-06-12 23:12:51 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2012-06-13 00:12:32 +0200
commitcabc22e032b933a84335da9acbbf0721eed9c63f (patch)
tree3a4915b68672986d1a3fb1228d78e40cc80b103c /src/calcurse.c
parent42c486d30d8e6f82d27651e19029e332af86cba3 (diff)
downloadcalcurse-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/calcurse.c')
-rw-r--r--src/calcurse.c24
1 files changed, 24 insertions, 0 deletions
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);