summaryrefslogtreecommitdiff
path: root/src/wins.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/wins.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/wins.c')
-rw-r--r--src/wins.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/wins.c b/src/wins.c
index 7d2f8a2..d518377 100644
--- a/src/wins.c
+++ b/src/wins.c
@@ -601,6 +601,10 @@ void wins_status_bar(void)
struct binding gnday = { _("+1 Day"), KEY_GENERIC_NEXT_DAY };
struct binding gpweek = { _("-1 Week"), KEY_GENERIC_PREV_WEEK };
struct binding gnweek = { _("+1 Week"), KEY_GENERIC_NEXT_WEEK };
+ struct binding gpmonth = { _("-1 Month"), KEY_GENERIC_PREV_MONTH };
+ struct binding gnmonth = { _("+1 Month"), KEY_GENERIC_NEXT_MONTH };
+ struct binding gpyear = { _("-1 Year"), KEY_GENERIC_PREV_YEAR };
+ struct binding gnyear = { _("+1 Year"), KEY_GENERIC_NEXT_YEAR };
struct binding today = { _("Today"), KEY_GENERIC_GOTO_TODAY };
struct binding nview = { _("Nxt View"), KEY_GENERIC_SCROLL_DOWN };
struct binding pview = { _("Prv View"), KEY_GENERIC_SCROLL_UP };
@@ -626,19 +630,22 @@ void wins_status_bar(void)
struct binding *bindings_cal[] = {
&help, &quit, &save, &chgvu, &nview, &pview, &up, &down, &left, &right,
&togo, &import, &export, &weekb, &weeke, &appt, &todo, &gpday, &gnday,
- &gpweek, &gnweek, &draw, &today, &conf
+ &gpweek, &gnweek, &gpmonth, &gnmonth, &gpyear, &gnyear, &draw, &today,
+ &conf
};
struct binding *bindings_apoint[] = {
&help, &quit, &save, &chgvu, &import, &export, &add, &del, &edit, &view,
&pipe, &draw, &rept, &flag, &enote, &vnote, &up, &down, &gpday, &gnday,
- &gpweek, &gnweek, &togo, &today, &conf, &appt, &todo, &cut, &paste
+ &gpweek, &gnweek, &gpmonth, &gnmonth, &gpyear, &gnyear, &togo, &today,
+ &conf, &appt, &todo, &cut, &paste
};
struct binding *bindings_todo[] = {
&help, &quit, &save, &chgvu, &import, &export, &add, &del, &edit, &view,
&pipe, &flag, &rprio, &lprio, &enote, &vnote, &up, &down, &gpday, &gnday,
- &gpweek, &gnweek, &togo, &today, &conf, &appt, &todo, &draw
+ &gpweek, &gnweek, &gpmonth, &gnmonth, &gpyear, &gnyear, &togo, &today,
+ &conf, &appt, &todo, &draw
};
enum win active_panel = wins_slctd();