summaryrefslogtreecommitdiff
path: root/src/notify.c
AgeCommit message (Collapse)Author
2012-03-26Update copyright rangesLukas Fleischer
Add 2012 to the copyright range for all source and documentation files. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2012-03-12Do not strncpy() strings returned by gettext()Lukas Fleischer
Translated strings returned by gettext() are statically allocated. There's no need to copy them to a buffer, we can use the pointers returned by gettext() instead. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-11-11Merge branch 'maint'Lukas Fleischer
Conflicts: src/calcurse.h src/io.c
2011-11-02Remove parentheses from return statementsLukas Fleischer
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>
2011-11-02Make use of the NULL macroLukas Fleischer
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>
2011-11-02Do not cast unused return values to voidLukas Fleischer
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>
2011-11-02Avoid use of printf()/fprintf()Lukas Fleischer
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>
2011-10-21Avoid unnecessary start time calculationsLukas Fleischer
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>
2011-10-21Pass item durations to recur_item_inday()Lukas Fleischer
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>
2011-10-04Cleanup joinable threads on terminationLukas Fleischer
Always invoke pthread_join() when we blow up a thread via pthread_cancel() (avoid zombie threads). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-07-31Add configuration option to notify all appointmentsLukas Fleischer
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>
2011-07-29Fix notify_check_repeated()Lukas Fleischer
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>
2011-07-29Add "force" parameter to notify_check_next_app()Lukas Fleischer
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>
2011-06-28Avoid redundant redraws on resizeLukas Fleischer
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>
2011-04-22Update copyright notices in source files, documentation and "COPYING".Lukas Fleischer
* 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>
2011-04-22Use generic lists for recurring item exceptions.Lukas Fleischer
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>
2011-04-03Remove dead assignments spotted by clang-analyzer.Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-14Overall indentation fixes.Lukas Fleischer
Use spaces instead of tabs for source code indentation only, strip trailing whitespaces from lines. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-04Update website links to match the new URL.Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-04Update mail addresses to match the new mailing lists.Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-03Remove CVS "$Id" headers.Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-03Fixed file permissions.Lukas Fleischer
2010-03-21Avoid concurrent screen refreshes.Frederic Culot
2010-03-20All headers gathered into a single one. Typedefs suppressed.Frederic Culot
2010-02-14Avoid a segfault when txt_max_len becomes too small. Reported by Thorsten, ↵Frederic Culot
thanks.
2009-08-17Do not send notifications when running in background mode if user did not ↵Frederic Culot
flag its appointment.
2009-08-13Possible deadlock fixed, thanks Henrik for reporting it.Frederic Culot
2009-08-09notify_thread_app rewrittenFrederic Culot
2009-08-02Notification configuration menu rewritten to handle scrolling.Frederic Culot
2009-08-01Improved how the daemon checks for appointments to remind.Frederic Culot
2009-08-01More work on implementing the daemon.Frederic Culot
2009-07-20Beginning of work on implementing calcurse daemon.Frederic Culot
2009-07-12calcurse version removed from menu titlesFrederic Culot
2009-07-05Switch to BSD license.Frederic Culot
2009-06-21Fixed a memory leak caused by a wrong usage of the notify_app structureFrederic Culot
2009-06-21Free memory associated with structure used for appointments notification.Frederic Culot
2009-01-22bugfix: avoid possible segfault if notify_stop_main_thread is called before ↵Frederic Culot
thread was launched (thanks Jan for reporting this)
2009-01-03more code cleanupFrederic Culot
2009-01-02code cleanupFrederic Culot
2008-12-28Added wrappers around libc's memory management functions, to easily debug ↵Frederic Culot
memory usage
2008-12-18memory leak due to wrong thread usage fixedFrederic Culot
2008-12-12code cleanupFrederic Culot
2008-12-07Checks added while loading key bindings configuration.Frederic Culot
2008-11-23Building configuration menu to assign keybindingsFrederic Culot
2008-11-16More work on implementing user-definable keybindingsFrederic Culot
2008-04-20no need to allocate tmp_app on heap in notify_thread_appFrederic Culot
2008-04-19some memory leaks fixed using valgrind and some minor code cleanupFrederic Culot
2008-04-12Yet another style for source code. GNU style now used (I am fed up with tabs...)Frederic Culot
2008-02-10memory leak fixed in notify_thread_app()Frederic Culot
check for limits.h header added asprintf() call replaced in wins_launch_external() as it is not fully portable
2007-12-30Ability to attach notes to todo items addedFrederic Culot