help page added to describe the cut and paste feature

This commit is contained in:
Frederic Culot 2009-01-04 10:22:10 +00:00
parent 936b6fe373
commit 21abed5f48
2 changed files with 31 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2009-01-04 Frederic Culot <frederic@culot.org>
* src/help.c (help_screen): help page added to describe the cut
and paste feature
2009-01-03 Frederic Culot <frederic@culot.org> 2009-01-03 Frederic Culot <frederic@culot.org>
* src/day.c (day_saved_item_init, day_saved_item_free): suppressed * src/day.c (day_saved_item_init, day_saved_item_free): suppressed

View File

@ -1,8 +1,8 @@
/* $calcurse: help.c,v 1.37 2009/01/03 21:32:11 culot Exp $ */ /* $calcurse: help.c,v 1.38 2009/01/04 10:22:10 culot Exp $ */
/* /*
* Calcurse - text-based organizer * Calcurse - text-based organizer
* Copyright (c) 2004-2008 Frederic Culot * Copyright (c) 2004-2009 Frederic Culot
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -52,6 +52,7 @@ typedef enum
HELP_GOTO, HELP_GOTO,
HELP_DELETE, HELP_DELETE,
HELP_ADD, HELP_ADD,
HELP_CUT_PASTE,
HELP_EDIT, HELP_EDIT,
HELP_ENOTE, HELP_ENOTE,
HELP_VNOTE, HELP_VNOTE,
@ -116,6 +117,8 @@ help_write_pad (window_t *win, char *title, char *text, keys_e action)
case KEY_GENERIC_PREV_WEEK: case KEY_GENERIC_PREV_WEEK:
case KEY_GENERIC_GOTO_TODAY: case KEY_GENERIC_GOTO_TODAY:
case KEY_GENERIC_CREDITS: case KEY_GENERIC_CREDITS:
case KEY_GENERIC_CUT:
case KEY_GENERIC_PASTE:
break; break;
default: default:
bindings = keys_action_allkeys (action); bindings = keys_action_allkeys (action);
@ -246,6 +249,11 @@ wanted_page (int ch)
page = HELP_DELETE; page = HELP_DELETE;
break; break;
case KEY_GENERIC_CUT:
case KEY_GENERIC_PASTE:
page = HELP_CUT_PASTE;
break;
case KEY_EDIT_ITEM: case KEY_EDIT_ITEM:
page = HELP_EDIT; page = HELP_EDIT;
break; break;
@ -506,6 +514,22 @@ help_screen (void)
keys_action_firstkey (KEY_ADD_ITEM), keys_action_firstkey (KEY_ADD_ITEM),
keys_action_firstkey (KEY_ADD_ITEM)); keys_action_firstkey (KEY_ADD_ITEM));
hscr[HELP_CUT_PASTE].title = _("Cut and Paste\n");
(void)snprintf (hscr[HELP_CUT_PASTE].text, HELPTEXTSIZ,
_("Cut and paste the currently selected item. This is useful to quickly\n"
"move an item from one date to another.\n"
"To do so, one must first highlight the item that needs to be moved,\n"
"then press '%s' to cut this item. It will be removed from the panel.\n"
"Once the new date is chosen in the calendar, the appointment panel must\n"
"be selected and the '%s' key must be pressed to paste the item.\n"
"The item will appear again in the appointment panel, assigned to the\n"
"newly selected date.\n\n"
"Be careful that if two cuts are performed successively without pasting\n"
"between them, the item that was cut at first will be lost, together\n"
"with its associated note if it had one."),
keys_action_firstkey (KEY_GENERIC_CUT),
keys_action_firstkey (KEY_GENERIC_PASTE));
hscr[HELP_EDIT].title = _("Edit Item\n"); hscr[HELP_EDIT].title = _("Edit Item\n");
(void)snprintf (hscr[HELP_EDIT].text, HELPTEXTSIZ, (void)snprintf (hscr[HELP_EDIT].text, HELPTEXTSIZ,
_("Edit the item which is currently selected.\n" _("Edit the item which is currently selected.\n"