From 954e3fd8ee08054e79013e6af69c8026bce929a7 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 26 Jun 2012 14:07:14 +0200 Subject: Add an item parameter to various todo_*() functions These functions operate on arbitrary items. Pull out the code that gets the currently selected item, get the current selection when one of the functions is called and pass it as a parameter. Signed-off-by: Lukas Fleischer --- src/calcurse.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/calcurse.c') diff --git a/src/calcurse.c b/src/calcurse.c index 962f665..3708236 100644 --- a/src/calcurse.c +++ b/src/calcurse.c @@ -315,7 +315,7 @@ int main(int argc, char **argv) inday = do_storage(0); wins_update(FLAG_APP); } else if (wins_slctd() == TOD && todo_hilt() != 0) { - todo_flag(); + todo_flag(todo_get_item(todo_hilt())); wins_update(FLAG_TOD); } break; @@ -331,7 +331,7 @@ int main(int argc, char **argv) case KEY_RAISE_PRIORITY: case KEY_LOWER_PRIORITY: if (wins_slctd() == TOD && todo_hilt() != 0) { - todo_chg_priority(key); + todo_chg_priority(todo_get_item(todo_hilt()), key); if (todo_hilt_pos() < 0) todo_set_first(todo_hilt()); else if (todo_hilt_pos() >= win[TOD].h - 4) @@ -345,7 +345,7 @@ int main(int argc, char **argv) day_edit_note(day_get_item(apoint_hilt()), conf.editor); inday = do_storage(0); } else if (wins_slctd() == TOD && todo_hilt() != 0) - todo_edit_note(conf.editor); + todo_edit_note(todo_get_item(todo_hilt()), conf.editor); wins_update(FLAG_ALL); break; @@ -353,7 +353,7 @@ int main(int argc, char **argv) if (wins_slctd() == APP && apoint_hilt() != 0) day_view_note(day_get_item(apoint_hilt()), conf.pager); else if (wins_slctd() == TOD && todo_hilt() != 0) - todo_view_note(conf.pager); + todo_view_note(todo_get_item(todo_hilt()), conf.pager); wins_update(FLAG_ALL); break; -- cgit v1.2.3-54-g00ecf