Refactor todo_chg_priority()

Instead of passing a key, pass the number of steps to increase the
priority by.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer
2012-11-18 21:50:15 +01:00
parent f2dca7de3e
commit 8fd6640caf
2 changed files with 9 additions and 19 deletions

View File

@@ -221,7 +221,8 @@ static inline void key_pipe_item(int key)
static inline void key_change_priority(int key)
{
if (wins_slctd() == TOD && todo_hilt() != 0) {
todo_chg_priority(todo_get_item(todo_hilt()), key);
todo_chg_priority(todo_get_item(todo_hilt()),
key == KEY_RAISE_PRIORITY ? 1 : -1);
if (todo_hilt_pos() < 0)
todo_set_first(todo_hilt());
else if (todo_hilt_pos() >= win[TOD].h - 4)