12 Commits

Author SHA1 Message Date
Lukas Fleischer
46d260a438 Warn when reloading with unsaved modifications
Since the reload operation overwrites all changes, warn before reloading
if there are unsaved modifications.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-07-16 20:05:21 +02:00
Lukas Fleischer
e33f53aad5 Do not highlight items on inactive windows
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-07-09 00:38:51 +02:00
Lukas Fleischer
cac973fee3 Load todo items on startup
Reload (and show) items into the list box after reading data files.

Reported-by: BARE Willy sprl <barewillysprl@euphonynet.be>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-07-09 00:33:01 +02:00
Lukas Fleischer
2a15531bb9 Add support for caption rows in list boxes
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>
2014-05-18 11:07:27 +02:00
Lukas Fleischer
cf1565648b ui-calendar: Use scroll window implementation
Make use of the generic scroll window implementation for the calendar
view. Note that this is useful despite the panel not needing a scroll
bar, since the scroll window functions can be used to draw the panel
border and take care of relative positions.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-18 11:03:13 +02:00
Lukas Fleischer
655218b7df ui-todo: Large-scale refactoring
This is a complete overhaul of the TODO list user interface. The new
implementation uses the generic list box panel.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-05-18 11:03:10 +02:00
Lukas Fleischer
a3d43ead87 Fix a couple of translatable strings
* Remove space before punctuation.
* Use "TODO" instead of "ToDo".
* Strip some formats to make sure lines are <=80 characters wide.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-05-14 12:03:04 +02:00
Lukas Fleischer
694d28eb78 Use tabs instead of spaces for indentation
This completes our switch to the Linux kernel coding style. Note that we
still use deeply nested constructs at some places which need to be fixed
up later.

Converted using the `Lindent` script from the Linux kernel code base,
along with some manual fixes.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-04-14 00:19:01 +02:00
Lukas Fleischer
a363cb9b91 Fix braces in if-else statements
From the Linux kernel coding guidelines:

    Do not unnecessarily use braces where a single statement will do.
    [...] This does not apply if one branch of a conditional statement
    is a single statement. Use braces in both branches.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-02-17 09:19:04 +01:00
Lukas Fleischer
abca2f10b5 ui-todo.c: Refactor ui_todo_chg_priority()
Add the new item *before* deleting the old one and get rid of temporary
buffers for the item message and note.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-02-14 11:49:15 +01:00
Lukas Fleischer
971df8d215 todo.c: Split out UI-related functions
* Move UI-related functions to "ui-todo.c".
* Rename UI-related functions to ui_todo_*().

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-02-14 11:08:03 +01:00
Lukas Fleischer
267bf0fc1c Split out UI functions for todo items
* Move todo-related UI functions from "interaction.c" to a new
  compilation unit "ui-todo.c".

* Rename all todo-related UI functions to todo_ui_*().

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-02-14 10:28:31 +01:00