todo_edit_item() created
This commit is contained in:
parent
3ee9a76130
commit
cf1a0713e7
15
src/todo.c
15
src/todo.c
@ -1,4 +1,4 @@
|
|||||||
/* $calcurse: todo.c,v 1.5 2006/10/28 10:35:55 culot Exp $ */
|
/* $calcurse: todo.c,v 1.6 2006/11/02 13:43:36 culot Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Calcurse - text-based organizer
|
* Calcurse - text-based organizer
|
||||||
@ -45,7 +45,7 @@ int todo_new_item(int total, int colr)
|
|||||||
char todo_input[MAX_LENGTH] = "";
|
char todo_input[MAX_LENGTH] = "";
|
||||||
|
|
||||||
status_mesg(mesg, "");
|
status_mesg(mesg, "");
|
||||||
if (getstring(swin, colr, todo_input, 0, 1) == 0) {
|
if (getstring(swin, colr, todo_input, 2, 0, 1) == 0) {
|
||||||
while ( (ch < '1') || (ch > '9') ) {
|
while ( (ch < '1') || (ch > '9') ) {
|
||||||
status_mesg(mesg_id, "");
|
status_mesg(mesg_id, "");
|
||||||
ch = wgetch(swin);
|
ch = wgetch(swin);
|
||||||
@ -166,3 +166,14 @@ int todo_chg_priority(int action, int item_num)
|
|||||||
}
|
}
|
||||||
return new_position;
|
return new_position;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Edit the description of an already existing todo item. */
|
||||||
|
void todo_edit_item(int item_num, int colr)
|
||||||
|
{
|
||||||
|
struct todo_s *i;
|
||||||
|
char *mesg = _("Enter the new ToDo description :");
|
||||||
|
|
||||||
|
status_mesg(mesg, "");
|
||||||
|
i = todo_get_item(item_num);
|
||||||
|
updatestring(swin, colr, &i->mesg, 0, 1);
|
||||||
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $calcurse: todo.h,v 1.3 2006/08/31 18:49:05 culot Exp $ */
|
/* $calcurse: todo.h,v 1.4 2006/11/02 13:43:56 culot Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Calcurse - text-based organizer
|
* Calcurse - text-based organizer
|
||||||
@ -41,5 +41,6 @@ void todo_delete_bynum(unsigned num);
|
|||||||
struct todo_s *todo_get_item(int item_number);
|
struct todo_s *todo_get_item(int item_number);
|
||||||
int todo_get_position(struct todo_s *i);
|
int todo_get_position(struct todo_s *i);
|
||||||
int todo_chg_priority(int action, int item_num);
|
int todo_chg_priority(int action, int item_num);
|
||||||
|
void todo_edit_item(int item_num, int colr);
|
||||||
|
|
||||||
#endif /* CALCURSE_TODO_H */
|
#endif /* CALCURSE_TODO_H */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user