aboutsummaryrefslogtreecommitdiffstats
path: root/src/help.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2011-06-29 19:26:29 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2011-07-07 07:05:48 +0200
commit309fa84cb7439221c01f8526fcbc67b6004a95d1 (patch)
tree02b1f0aa6925e578b827474f595c92ef54b1234e /src/help.c
parent9e60084262e3e85900a42001ca11876e5c452d32 (diff)
downloadcalcurse-309fa84cb7439221c01f8526fcbc67b6004a95d1.tar.gz
calcurse-309fa84cb7439221c01f8526fcbc67b6004a95d1.zip
Add key binding for pipe-item command
This removes the need of reading the whole data file and find matching entries if we want to parse appointments in external programs. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/help.c')
-rw-r--r--src/help.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/help.c b/src/help.c
index 3f4f7c7..7c43d44 100644
--- a/src/help.c
+++ b/src/help.c
@@ -56,6 +56,7 @@ typedef enum
HELP_EXPORT,
HELP_DISPLACEMENT,
HELP_VIEW,
+ HELP_PIPE,
HELP_TAB,
HELP_GOTO,
HELP_DELETE,
@@ -296,6 +297,10 @@ wanted_page (int ch)
page = HELP_VIEW;
break;
+ case KEY_PIPE_ITEM:
+ page = HELP_PIPE;
+ break;
+
case KEY_RAISE_PRIORITY:
case KEY_LOWER_PRIORITY:
page = HELP_PRIORITY;
@@ -451,6 +456,14 @@ help_screen (void)
"Calcurse screen."),
keys_action_firstkey (KEY_VIEW_ITEM));
+ hscr[HELP_PIPE].title = _("Pipe\n");
+ (void)snprintf (hscr[HELP_PIPE].text, HELPTEXTSIZ,
+ _("Pipe the selected item to an external program.\n"
+ "\nPress the '%s' key to pipe the currently selected appointment or\n"
+ "todo entry to an external program.\n"
+ "\nYou will be driven back to calcurse as soon as the program exits.\n"),
+ keys_action_firstkey (KEY_PIPE_ITEM));
+
hscr[HELP_TAB].title = _("Tab\n");
(void)snprintf (hscr[HELP_TAB].text, HELPTEXTSIZ,
_("Switch between panels.\n"