| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
| |
Make sure the visible region is updated after loading items, e.g. when
the users switches from the full todo list to the "uncompleted items
only" view.
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
|
|
| |
Make sure that listbox_fix_visible_region() always updates the visible
region to show the entire list if it fits into the box. Also, reuse
listbox_fix_visible_region() in listbox_resize() instead of duplicating
the code.
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
|
|
|
| |
Use mem_*() wrappers instead of directly accessing libc functions when
allocating/deallocating memory.
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
| |
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
|
|
|
|
| |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
| |
Since commit 80a7267 (Fix selection in listbox_load_items(),
2014-07-18), listbox_fix_sel() is called if the selection is out of
range after loading the new set of items. However, we should *always*
fix the selection to make sure the selection doesn't move to a caption
row when reloading items.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
Use mem_malloc() instead which automatically picks the right
implementation depending on whether memory debugging is enabled or not.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
Call listbox_fix_sel() after setting an initial selection in
listbox_load_items() to make sure we do not pick a caption row.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
If the selection is empty during listbox_load_items() and there is at
least one item in the list, automatically select the first item.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
Automatically scroll down the list box when resizing creates some blank
space below the list of items.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
| |
Only try to fix the visible region if an item is selected.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
This adds support for rows that cannot be selected. Such rows can be
used for section headings and the like.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
This allows for drawing selected scroll windows and list boxes with a
highlighted border.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
This adds a very generic list box implementation. List boxes with items
of different heights are supported. Two callback functions to determine
the height of every single item and to draw a specific item are used.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|