| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
|
| |
The item filters now apply to both appointments and TODO items. Also,
add a new type mask "todo" and the following new filter options:
* --filter-priority
* --filter-completed
* --filter-uncompleted
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
This adds a new item filter option --filter-pattern and removes the
whole -S parameter logic, while making -S an alias for --filter-pattern.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds the following filter options that allow for restricting the
set of items that are read from the appointments file:
* --filter-type
* --filter-start-from
* --filter-start-to
* --filter-start-after
* --filter-start-before
* --filter-end-from
* --filter-end-to
* --filter-end-after
* --filter-end-before
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
| |
Avoid preallocating buffers on the stack, use dynamic memory allocation
instead. Also, change the semantics of new_tempfile() so that it returns
the full name of the temporary file and fix all call sites.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
| |
The new utils.c functions vasprintf() and asprintf() are analogs to
sprintf() and vsprintf(). However, instead of requiring a buffer that is
large enough to hold the output data, the functions allocate a string
and return a pointer to it.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
Make use of the general key binding context switching implementation for
the configuration main menu.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
Store key binding contexts using another data structure to optimize
space usage and execution time.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
If the backup file and the data file are equal, there is no need to run
the merge tool.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
| |
Split wins_status_bar() into wins_set_bindings(), wins_update_bindings()
and wins_status_bar(). This allows for using wins_set_bindings() to set
custom key bindings to be displayed.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
| |
Allow for passing an arbitrary number of arguments. This also allows us
to remove wins_launch_external2() and use wins_launch_external() at all
call sites instead.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
| |
This allows for merging the (unsaved) items with the items from the data
files when invoking the reload operation. To this end, an external merge
tool (defaults to vimdiff) is used.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
Since the reload operation overwrites all changes, warn before reloading
if there are unsaved modifications.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
This allows for reloading the appointment and todo item files without
having to restart calcurse.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
| |
When switching to the generic linked list implementation for recurring
events in 9fab248 (Use generic lists for recurring apointments and
events., 2011-04-16), no initialization routine for the list of
recurring events was added. Fix this and properly initialize the list on
startup.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
This adds some more accurate checks to avoid a segmentation fault that
occurred when accessing a nonexistent item.
Fixes GitHub issue #7.
Reported-by: Bromind <martin.vassor@hotmail.fr>
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>
|
|
|
|
|
|
|
| |
Rewrite the panel resize code and remove the code that reinitializes the
caption and the selected item when the window is resized.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
| |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
This re-introduces the heading (showing the POM and the current date) as
well as the separating line between events and appointments.
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>
|
|
|
|
|
|
|
|
|
|
| |
Use the generic list box implementation for the appointments panel. This
results in some major changes to how the items are printed.
Note that this temporarily removes the heading showing the POM and the
date as well as the separating line between events and appointments.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
| |
This allows for more efficient access to items at specific positions.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
| |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
This allows for drawing selected scroll windows and list boxes with a
highlighted border.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
Do not update the main windows when resizing the terminal in the general
options menu or in the notification options menu.
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>
|
|
|
|
|
|
|
|
|
|
| |
This complete rewrite of the scroll window implementation decouples
scroll windows from every other window abstraction layer we use. Note
that this leads to some code duplication. The long-term purpose of this
rewrite, however, is to eventually make every panel use scroll windows.
This makes for a huge cleanup of the UI code.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
This allows for drawing appointment panels for days other than the
current day.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
Use an algorithm similar to gettext's locale resolution to find an
appropriate translation to display. Fall back to the English version.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
Reintroduce help.c and move the online help code into a new function
display_help().
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
| |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
| |
Remove the old online help system and change the generic help key to do
the same thing as ":help".
This also removes some context-sensitive help. We should think about
re-adding support for this later.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
| |
This adds support for vim-style command mode. The command mode can be
entered with pressing ":" (by default, the key binding is configurable).
Currently, no command is supported. Support for various commands will be
added later.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
| |
Adds the -l/--limit command line option. Limits the number of appointments
and/or ToDo items displayed.
Signed-off-by: William Pettersson <william.pettersson@gmail.com>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
| |
Use following macro instead of "sizeof(x) / sizeof(x[0])" everywhere:
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
Split date/time validation into separate functions check_date() and
check_time(). These will be used to validate date/time information when
reading items from the appointments file.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
| |
This is needed in "ui-todo.c" now.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
| |
This unit belongs to the presentation layer -- rename the file
accordingly.
Also, rename calendar_*() to ui_calendar_*().
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
* Move UI-related functions to "ui-todo.c".
* Rename UI-related functions to ui_todo_*().
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
| |
* Move UI-related functions to "ui-day.c".
* Rename UI-related functions to ui_day_*().
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
| |
* Rename "interaction.c" to "ui-day.c" since it no longer contains
todo-related UI functions.
* Rename appointment/event-related UI functions to ui_day_*().
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Add 2013 to the copyright range for all source and documentation files.
Reported-by: Frederic Culot <frederic@culot.org>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
| |
| |
| |
| | |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|