summaryrefslogtreecommitdiffstats
path: root/src/notify.c
Commit message (Collapse)AuthorAgeFilesLines
...
| * Cleanup joinable threads on terminationLukas Fleischer2011-10-041-1/+4
| | | | | | | | | | | | | | Always invoke pthread_join() when we blow up a thread via pthread_cancel() (avoid zombie threads). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | Remove parentheses from return statementsLukas Fleischer2011-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | No reason to use "return (x);" here. Refer to the GNU coding guidelines for details. Created using following semantic patch: @@ expression expr; @@ - return (expr); + return expr; Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | Make use of the NULL macroLukas Fleischer2011-11-021-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use this constant everywhere when referring to a null pointer instead of casting 0 to various types of pointers. Created using following semantic patch: @@ type type; @@ - (type *)0 + NULL Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | Do not cast unused return values to voidLukas Fleischer2011-11-021-22/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A small style fix that removes all remaining "(void)" casts. Using these isn't encouraged in GNU coding guidelines and doesn't serve a certain purpose, except for satisfying a few static code analysis tools. We already nuked some of these in previous patches, but this semantic patch should fix what's left: @@ identifier func; @@ - (void)func ( + func ( ...); Long lines were re-formatted manually. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | Avoid use of printf()/fprintf()Lukas Fleischer2011-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use one of the following functions where appropriate: * puts() (whenever we print hard coded strings to stdout) * fputs() (whenever we print hard coded strings to a stream) * putchar() (whenever we print a single character to stdout) * fputc() (whenever we print a single character to a stream) * strncpy() (whenever we copy hard coded strings to a buffer) This removes the overhead introduced by the format string parser and reduces the number of false positive C-format strings spotted by xgettext(1)'s heuristics. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | Avoid unnecessary start time calculationsLukas Fleischer2011-10-211-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename recur_*_inday() to recur_*_find_occurrence() and use the new functions whenever we actually care about the start time of an occurrence. Reintroduce recur_*_inday() as wrappers to recur_*_find_occurrence() and pass NULL as start time buffer (which means "skip start time calculation"). Keep using these when we only want to know if a recurrent item belongs to a specific day but do not care about the actual start time. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | Pass item durations to recur_item_inday()Lukas Fleischer2011-10-211-4/+4
| | | | | | | | | | | | | | | | Having item's durations eventually allows for better parsing of recurrent appointments as we might be interested in how many days are covered by a multi-day appointment. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | Add configuration option to notify all appointmentsLukas Fleischer2011-07-311-5/+21
|/ | | | | | | | If "notify-all" is enabled, all non-flagged appointments will be notified (instead of flagged ones). This is useful for users that want to be notified of everything. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Fix notify_check_repeated()Lukas Fleischer2011-07-291-1/+1
| | | | | | | | | | Remove the "current_time" check from the first if condition. As "greater than" relations (">") have higher precedence than assignments ("=") in C, this caused "real_app_time" to always be one or zero which definitely isn't what we want here. Reading further down, it turns out that we don't even need this comparison here, so we should be fine removing it. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Add "force" parameter to notify_check_next_app()Lukas Fleischer2011-07-291-6/+8
| | | | | | | | This allows to force notify_check_next_app() to update the notification appointment, even if start times are equal (e.g. if the item description was changed). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Avoid redundant redraws on resizeLukas Fleischer2011-06-281-14/+19
| | | | | | | | | | Use a global flag to record whether the terminal was resized instead of redrawing everything each time a KEY_RESIZE is read. Add some additional checks to help_write_pad() as invalid actions may be passed now due to using signals instead of virtual key presses. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Update copyright notices in source files, documentation and "COPYING".Lukas Fleischer2011-04-221-1/+1
| | | | | | | | | * Update copyright dates (use 2004-2011 as date range everywhere). * Change copyright holder from "Frederic Culot" to "calcurse Development Team". Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Use generic lists for recurring item exceptions.Lukas Fleischer2011-04-221-2/+2
| | | | | | | | | Rename "days" structure to "excp" which seems to be a better name here. Use generic linked lists of excp structures instead of using the "days" structure which again contains a linked list implementation. Do some cleanups and invocation fixes. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Remove dead assignments spotted by clang-analyzer.Lukas Fleischer2011-04-031-4/+2
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Overall indentation fixes.Lukas Fleischer2011-03-141-179/+179
| | | | | | | Use spaces instead of tabs for source code indentation only, strip trailing whitespaces from lines. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Update website links to match the new URL.Lukas Fleischer2011-03-041-1/+1
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Update mail addresses to match the new mailing lists.Lukas Fleischer2011-03-041-1/+1
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Remove CVS "$Id" headers.Lukas Fleischer2011-03-031-2/+0
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Fixed file permissions.Lukas Fleischer2011-03-031-0/+0
|
* Avoid concurrent screen refreshes.Frederic Culot2010-03-211-2/+2
|
* All headers gathered into a single one. Typedefs suppressed.Frederic Culot2010-03-201-20/+21
|
* Avoid a segfault when txt_max_len becomes too small. Reported by Thorsten, ↵Frederic Culot2010-02-141-3/+6
| | | | thanks.
* Do not send notifications when running in background mode if user did not ↵Frederic Culot2009-08-171-2/+4
| | | | flag its appointment.
* Possible deadlock fixed, thanks Henrik for reporting it.Frederic Culot2009-08-131-4/+8
|
* notify_thread_app rewrittenFrederic Culot2009-08-091-9/+10
|
* Notification configuration menu rewritten to handle scrolling.Frederic Culot2009-08-021-42/+64
|
* Improved how the daemon checks for appointments to remind.Frederic Culot2009-08-011-6/+36
|
* More work on implementing the daemon.Frederic Culot2009-08-011-69/+134
|
* Beginning of work on implementing calcurse daemon.Frederic Culot2009-07-201-28/+67
|
* calcurse version removed from menu titlesFrederic Culot2009-07-121-3/+2
|
* Switch to BSD license.Frederic Culot2009-07-051-14/+26
|
* Fixed a memory leak caused by a wrong usage of the notify_app structureFrederic Culot2009-06-211-14/+23
|
* Free memory associated with structure used for appointments notification.Frederic Culot2009-06-211-1/+11
|
* bugfix: avoid possible segfault if notify_stop_main_thread is called before ↵Frederic Culot2009-01-221-2/+3
| | | | thread was launched (thanks Jan for reporting this)
* more code cleanupFrederic Culot2009-01-031-4/+4
|
* code cleanupFrederic Culot2009-01-021-157/+140
|
* Added wrappers around libc's memory management functions, to easily debug ↵Frederic Culot2008-12-281-44/+65
| | | | memory usage
* memory leak due to wrong thread usage fixedFrederic Culot2008-12-181-2/+8
|
* code cleanupFrederic Culot2008-12-121-8/+7
|
* Checks added while loading key bindings configuration.Frederic Culot2008-12-071-2/+2
|
* Building configuration menu to assign keybindingsFrederic Culot2008-11-231-2/+2
|
* More work on implementing user-definable keybindingsFrederic Culot2008-11-161-2/+3
|
* no need to allocate tmp_app on heap in notify_thread_appFrederic Culot2008-04-201-15/+13
|
* some memory leaks fixed using valgrind and some minor code cleanupFrederic Culot2008-04-191-3/+3
|
* Yet another style for source code. GNU style now used (I am fed up with tabs...)Frederic Culot2008-04-121-468/+490
|
* memory leak fixed in notify_thread_app()Frederic Culot2008-02-101-1/+4
| | | | | | check for limits.h header added asprintf() call replaced in wins_launch_external() as it is not fully portable
* Ability to attach notes to todo items addedFrederic Culot2007-12-301-3/+5
|
* notify_config_bar() updated to handle window resizingFrederic Culot2007-10-211-41/+39
|
* bugfix: do not stop thread in notify_config_bar() if it was not started beforeFrederic Culot2007-10-161-2/+2
|
* bugfix: extract_aptsfile() modified so that notify->apts_file is never setFrederic Culot2007-08-191-3/+10
| | | | to null