diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-06-26 13:54:52 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-06-30 14:34:35 +0200 |
commit | 318e685ffe73587a01049d92aa0f60a46c1cfb16 (patch) | |
tree | 3e523f07c69b3ffb20fa94f888dd98e4d2ea3eaa /src/calcurse.c | |
parent | 02c90ba53a658686bad5cb5f88c555d9eef06399 (diff) | |
download | calcurse-318e685ffe73587a01049d92aa0f60a46c1cfb16.zip |
Add an item parameter to various day_*() 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 <calcurse@cryptocrack.de>
Diffstat (limited to 'src/calcurse.c')
-rw-r--r-- | src/calcurse.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/calcurse.c b/src/calcurse.c index 43d00fc..962f665 100644 --- a/src/calcurse.c +++ b/src/calcurse.c @@ -219,7 +219,7 @@ int main(int argc, char **argv) case KEY_VIEW_ITEM: if ((wins_slctd() == APP) && (apoint_hilt() != 0)) - day_popup_item(); + day_popup_item(day_get_item(apoint_hilt())); else if ((wins_slctd() == TOD) && (todo_hilt() != 0)) item_in_popup(NULL, NULL, todo_saved_mesg(), _("To do :")); wins_update(FLAG_ALL); @@ -311,7 +311,7 @@ int main(int argc, char **argv) case KEY_FLAG_ITEM: if (wins_slctd() == APP && apoint_hilt() != 0) { - day_item_switch_notify(); + day_item_switch_notify(day_get_item(apoint_hilt())); inday = do_storage(0); wins_update(FLAG_APP); } else if (wins_slctd() == TOD && todo_hilt() != 0) { @@ -342,7 +342,7 @@ int main(int argc, char **argv) case KEY_EDIT_NOTE: if (wins_slctd() == APP && apoint_hilt() != 0) { - day_edit_note(conf.editor); + 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); @@ -351,7 +351,7 @@ int main(int argc, char **argv) case KEY_VIEW_NOTE: if (wins_slctd() == APP && apoint_hilt() != 0) - day_view_note(conf.pager); + day_view_note(day_get_item(apoint_hilt()), conf.pager); else if (wins_slctd() == TOD && todo_hilt() != 0) todo_view_note(conf.pager); wins_update(FLAG_ALL); |