summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2016-01-30Update copyright rangesLukas Fleischer
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-28Fix behavior of --todo with an optional argumentLukas Fleischer
The previous behavior of --todo was to always only list uncompleted items, unless zero was specified as additional argument. Restore and document this behavior. Also, fix two tests that failed because the --todo output is now sorted. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-28args.c: Revise help/usage/version outputLukas Fleischer
Remove obsolete options from the help text, add new options, clean everything up, cut translatable strings into atomic chunks. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-28Add a --daemon command-line parameterLukas Fleischer
When specifying --daemon, calcurse immediately forks and runs the notification daemon in the background. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-27Display priority todo items above regular itemsLukas Fleischer
We now support todo items with undefined priority and currently display them above todo items with a strictly positive priority. Change this and always list items with a priority greater than zero first. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-27Support sending notifications for all appointmentsLukas Fleischer
In 45417bc (Add configuration option to notify all appointments, 2011-07-31), we added an option that allows for choosing whether the user receives notifications only for flagged or only for unflagged appointments. Convert this setting into a three-state option and allow the user to additionally enable notifications for *all* appointments. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-26sigs.c: Suppress compiler warningLukas Fleischer
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-26Support SIGUSR1 in daemon modeLukas Fleischer
In commit 7f62fb1 (Let SIGUSR1 trigger a reload, 2014-10-10), we added support for reloading the data files by sending SIGUSR1 to an interactive calcurse process. Add the same functionality to the daemon mode. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-18Make automatic selection of todo items smarterLukas Fleischer
* Automatically focus new todo items after adding them to the list. * Keep selection when an item is moved (e.g. by changing its priority). * Focus the next item in the list when an item is removed. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-18Improve ordering of todo itemsLukas Fleischer
* Show uncompleted items first. * Order uncompleted and completed items by priority. * Order items with the same priority alphabetically. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-18Hide "0." prefix of todo items with undefined priorityLukas Fleischer
In the todo panel, all uncompleted items are currently prefixed with their priorities. Drop this prefix from items with priority 0, i.e. undefined priority. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-18Save active view on the todo panelLukas Fleischer
Add a configuration option appearance.todoview and use it to automatically save the currently active todo panel view and restore it when restarting calcurse. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-18Support todo items with an undefined priorityLukas Fleischer
In addition to priorities 1-9, support todo items without any specific priority, internally represented by priority 0. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-18Use a separate field for the completed statusLukas Fleischer
Add a new field that indicates whether a todo item is completed or not instead of encoding completed todo items by negative priorities. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-18Add a "hide completed" view to the todo panelLukas Fleischer
Add a second view to the todo panel that hides all completed items. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-16Fix segfault when running hooks in non-interactive modeLukas Fleischer
Do not run wins_prepare_external() and wins_unprepare_external() before and after running hooks in non-interactive mode. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-15Run pre-save and post-save hooks on reloadLukas Fleischer
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-15Export item UIDs upon requestLukas Fleischer
Add a new --export-uid command line option that adds each item's hash to the UID property when exporting. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-15Import data from stdin when the import file is "-"Lukas Fleischer
Support "-" as file name to the -i/--import option and read from stdin when that file is specified. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-13ical: Handle items without an end date gracefullyLukas Fleischer
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-13ical: Refactor item date/time parserLukas Fleischer
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-13Reimplement ical_unformat_line() using dynamic stringsLukas Fleischer
Use the new dynamic string utility functions instead of relying on a fixed-size buffer. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-13ical: Export completed todo items properlyLukas Fleischer
Do not skip completed todo items when exporting to an iCal file. Instead, mark them as "STATUS:COMPLETED". Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-13ical: Honor completed status of todo itemsLukas Fleischer
When importing todo items from an iCal file, mark completed items as completed. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-13Hide import statistics in quiet modeLukas Fleischer
Do not show the import summary when system dialogs are disabled or when the --quiet option is specified, even if calcurse is executed in non-interactive mode. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-13Add --list-imported command line optionLukas Fleischer
When this option is used together with -i/--import, the object identifiers of imported objects are printed to stdout. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-13Add command line option to suppress dialogsLukas Fleischer
Implement a -q/--quiet command line option to disable system dialogs temporarily. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-13Implement filter modeLukas Fleischer
Add a new -F mode that is identical to -G but writes the result back to the calcurse data files instead of stdout. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-13Add an option to filter by object hashLukas Fleischer
Implement a new --filter-hash option to filter by object identifiers. Each object having an identifier that has the specified pattern as a prefix is matched. Patterns starting with an exclamation mark (!) are interpreted as negative patterns. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-13Add long format specifiers "raw" and "hash"Lukas Fleischer
Add new format specifiers to print the raw item representation or an object's hash value. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-13Implement recur_{apoint,event}_tostr()Lukas Fleischer
Add functions to serialize recurrent items without immediately writing them to stdout. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-13Implement {apoint,event,todo}_tostr()Lukas Fleischer
Add functions to serialize non-recurrent objects without immediately writing them to stdout. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-13Reimplement asprintf() using dynamic stringsLukas Fleischer
Use the new string implementation to simplify asprintf(). Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-13Implement utility functions for dynamic stringsLukas Fleischer
Introduce support for strings which support concatenating the current value with a printf-style formatted value, thereby growing in size dynamically. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-10Reset status page when opening configurationLukas Fleischer
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-10Add pre-load and post-load hooksLukas Fleischer
Potential use case: Synchronize data with some server before loading. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-07Add pre-save and post-save hooksLukas Fleischer
This adds support for hooks which are executed before/after saving calcurse data. Hooks can be placed under hooks/pre-save and hooks/post-save in the data directory and need to be executable. Potential use cases include: * Automatically commit any changes to the data files using a VCS. * Automatically sync with some sever component on data file changes. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-07custom.c: Display missing optionsLukas Fleischer
Also, determine the number of displayed options on the general configuration screen automatically (statically) instead of hard-coding the value to prevent from future fallouts. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2015-05-20Add support for --filter-end-* to eventsLukas Fleischer
A natural convention is to specify the end time of an event as 23:59:59 on the day it is scheduled. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2015-04-15Make the generic-credits key binding work againLukas Fleischer
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2015-04-15Show an error message on missing documentationLukas Fleischer
Show a warning when the user presses the generic-help binding and the main help document is not available. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2015-04-11Do not mark slice of end time busyLukas Fleischer
In weekly view, when computing busy slices, do not fill a slot that is only hit by the end time of an appointment. Suggested-by: Håkan Jerning <jerning@home.se> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-04-10Fix range checks in day_chk_busy_slices()Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-04-10Highlight week number when the calendar is selectedLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-04-10Show week numbers in the monthly viewLukas Fleischer
Suggested-by: Håkan Jerning <jerning@home.se> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-04-10Split out code for drawing week numbersLukas Fleischer
This allows for easily adding week numbers to other panel modes, such as the monthly view. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-04-10Fix slice computation of recurring appointmentsLukas Fleischer
Reported-by: Håkan Jerning <jerning@home.se> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-25ical.c: Small refactoringLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-24Simplify code in status_ask_choice()Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-24Use time_t instead of long in several placesLukas Fleischer
Start converting some variables and return values to store times from long to time_t. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>