summaryrefslogtreecommitdiff
path: root/%2525253fid%2525253d31b02513aa4616879f2146df49a6261b5f983b81%25253fid%25253d6...
diff options
context:
space:
mode:
authorLars Henriksen <LarsHenriksen@get2net.dk>2019-01-27 19:22:50 +0100
committerLukas Fleischer <lfleischer@calcurse.org>2019-05-22 01:56:59 -0400
commitf9cf5fb0c1528c006697a23813be72f69458d53d (patch)
tree3aff65b726eed45f523a73854b36fdfddfddc3e5 /%2525253fid%2525253d31b02513aa4616879f2146df49a6261b5f983b81%25253fid%25253d62fe506e526d8c2d0ae6d8d89d2cddfb3ef040d1%253fid%253dd15f1e9242f77d9021af8c4b45eec96eb82a8eb6%3fid%3d4db9677119f412fd38440e5591afbfb631a11b3d?id=f9cf5fb0c1528c006697a23813be72f69458d53d
parent80ce812effec8190bfbb1986dced1b143162a4c8 (diff)
Derive selected day from selected item
Previously, with only one day visible at a time, the appointments panel displayed the details of the day selected in the calendar (slctd_day); information required for operations on items (day_items) can often be derived from the selected day. The items available are derived from the selected day. In particular, the selected item is derived from the selected day. With multiple days in the APP panel, the relation between selected day (in the calendar) and the selected item (in the APP panel) has, in a way, been turned around. The selected item may now be moved between days without explicitly changing the selected day. Implicitly it is changed when the target day of a move is unavailable. This commit draws the full consequence: the selected day in the calendar is always (set to) the day of the selected item in the APP panel. The static variable 'struct date slctd_day' lives in ui_calendar.c and is accessible through various public functions. To these are added ui_calendar_set_slctd_day() which sets slctd_day directly. The selected day retains its significance for load of the day vector (in day_store_items()): the range of loaded days begins with the selected day. Movements (up/down) in the APP panel will change the selected day as the selected item moves among the already loaded days. Only when the target of a movement is unreachable, will further days be loaded. On the other hand, if the same range of days must be reloaded because of a changed item, the selected item - and with it the selected day - must be reset to the first day item (see do_storage()). Movements in the calendar (generic-next-day, etc.) are not affected and behave as previously, i.e. they will cause a range of days to be loaded with the selected day as the first and the selected item as the first of the selected day. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to '%2525253fid%2525253d31b02513aa4616879f2146df49a6261b5f983b81%25253fid%25253d62fe506e526d8c2d0ae6d8d89d2cddfb3ef040d1%253fid%253dd15f1e9242f77d9021af8c4b45eec96eb82a8eb6%3fid%3d4db9677119f412fd38440e5591afbfb631a11b3d?id=f9cf5fb0c1528c006697a23813be72f69458d53d')
0 files changed, 0 insertions, 0 deletions