summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Do not ignore "--datarootdir" in "po/Makefile.in.in"Lukas Fleischer2013-02-051-0/+5
| | | | | | | | | This fixes the "--datarootdir" warning seen with autotools >=2.59c. Note that this is a workaround for a bug in autopoint(1). Inspired by util-linux commit cc3c3fdd29719883605687fc0d11391386ab46c6. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Update copyright rangesLukas Fleischer2013-02-0448-62/+62
| | | | | | | 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>
* Close key binding window when reassigning the same keyMichael Smith2013-02-041-0/+6
| | | | | | | | | | This allows for canceling a key reassignment. We cannot use a static key here since every key could potentially be used in a binding. Instead, just cancel if we are trying to reassign a key that has already been used for that action before. Signed-off-by: Michael Smith <crazedpsyc@mail4us.net> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Do not prompt for a todo after adding an appointmentLukas Fleischer2013-02-031-0/+1
| | | | | | | | | | We effectively turned the addition of an appointment into a fall through case by deleting the break statement during refactoring. Revert this deletion to skip the second prompt. Regression introduced in f2dca7de3e8b164a4b3af3d58dde2f6776bfbee6. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Release 3.1.3v3.1.3Lukas Fleischer2013-02-022-1/+12
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Properly skip spaces after exception listLukas Fleischer2013-02-011-2/+4
| | | | | | | Skip whitespace after obtaining the list of exceptions instead of skipping the next character unconditionally. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Skip start time update if prompt is canceledLukas Fleischer2013-02-011-1/+2
| | | | | | See commit 217e66729a249a638863a9cc2ff93b8368cd6094 for details. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Skip duration update if the prompt is canceledLukas Fleischer2013-02-011-2/+2
| | | | | | | | | Do not update an appointment's duration if the user cancels the prompt at day_edit_duration(). Note that day_edit_duration() does not touch the buffer if the prompt was canceled or an invalid value was entered, resulting in the buffer variable being uninitialized in these cases. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* test/: Use `faketime -f`Lukas Fleischer2012-12-227-7/+11
| | | | | | | | | | | | Use the advanced timestamp specification format for libfaketime. Before using that, some tests failed on 32-bit systems due to integer overflows. It seems like faketime translates absolute dates to relative dates by default. Moreover, libfaketime is not able to handle relative dates that exceed the maximum value of a signed integer. Using "-f" skips the conversion to relative dates. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* test/: Do not error out if libfaketime is missingLukas Fleischer2012-12-228-8/+8
| | | | | | | | If the faketime library is missing, show a warning and skip the test. However, do not error out to make sure the test suite is able to terminate successfully on systems without libfaketime. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Release 3.1.2v3.1.2Lukas Fleischer2012-12-162-1/+10
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* do_storage(): Unset highlighted item if list is emptyLukas Fleischer2012-12-161-2/+6
| | | | | | | | | Check if the appointment panel contains any items and unset the highlight counter if it doesn't. Not doing this resulted in core dumps if the edit command was invoked after switching to a day without any appointments/events. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Display correct startup messagesLukas Fleischer2012-12-161-2/+2
| | | | | | | These messages have been swapped accidentally during refactoring. Regression introduced in 691f8a6015bafcf6ed4f99a3649d428fb7a8e915. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Add hidden key handler windowLukas Fleischer2012-12-1610-31/+41
| | | | | | | | | | | | | | | | | | | | | | | | | After BUG#6 had apparently been closed with the screen locks introduced in commit a80f8dcf2c6eb3b54658218bc081ee9694204dd5, some people still had problems with random characters appearing in the notification bar. This was obviously caused by wgetch() refreshing the screen if the status panel was changed. From wgetch(3): If the window is not a pad, and it has been moved or modified since the last call to wrefresh, wrefresh will be called before another character is read. Since the wgetch(3) isn't thread-safe, there were race conditions between the notification bar thread drawing to the notification bar and wgetch() updating the screen. Introduce a (hidden) window that handles all key presses and never gets changed in order to avoid this. Also, call wins_wrefresh() explicitly in status_mesg(), since we can no longer rely on wgetch() updating windows automatically. Fixes reopened BUG#6. Note that this is a hotfix -- FR#26 has been opened to ensure we fix this properly in the next major release. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Release 3.1.1v3.1.1Lukas Fleischer2012-12-062-1/+8
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Fix two enumeration types in function signaturesLukas Fleischer2012-12-062-2/+2
| | | | | | Spotted with clang and "-Wconversion". Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* keys.c: Remove several unneeded assertionsLukas Fleischer2012-12-061-3/+3
| | | | | | Seen when compiling with clang and "-Wtautological-compare". Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* wins_show(): Fix size of the slave window arrayLukas Fleischer2012-12-061-1/+1
| | | | | | | | | | | The slave window array was just big enough to hold a single element, whereas two elements are written/accessed. Fix this off-by-one error in the array declaration. Note that this messed up the panel layout when using clang as a compiler. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Release 3.1.0v3.1.0Lukas Fleischer2012-12-052-4/+39
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* io_load_keys(): Skip legacy entryLukas Fleischer2012-12-051-0/+5
| | | | | | | This binding was used pre-3.1.0. Simply ignore it and avoid showing a needlessly complicated error message. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* keys_save_bindings(): Skip unset key bindingsLukas Fleischer2012-12-051-2/+6
| | | | | | | Saving unset key bindings currently results in a segmentation fault or invalid key specifiers being stored. Skip these entries to avoid this. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* po/: Translation updates from TransifexLukas Fleischer2012-12-058-1860/+1663
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* test/Makefile.am: Add missing files to EXTRA_DISTLukas Fleischer2012-12-051-1/+7
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Merge branch 'maint'Lukas Fleischer2012-11-293-0/+20
|\
| * Ignore signals during command executionLukas Fleischer2012-11-283-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | Disable signal handlers in wins_prepare_external() and reactivate them in wins_unprepare_external(). Before, it was possible that resizing the window during editor/pager mode resulted in the calcurse main screen appearing on top. Addresses BUG#9. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | run-test.c: Return failure if actual output is too shortLukas Fleischer2012-11-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We always terminated run-test when reached the end of the expected output and returned success if actual output and expected output were the same up to this point. This resulted in run-test always returning successfully if the actual output was a prefix of the expected output, even if it was a proper prefix. Check if the expected output contains more data after string comparison has finished to ensure we only return successfully if both outputs are actually equal. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | test/: Add a couple of tests for recurrent itemsLukas Fleischer2012-11-267-1/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds tests for following features/scenarios: * Recurrent appointments and events of all (repetition) types. * Recurrent appointments with a duration of more than 24 hours. * Overlapping recurrent appointments. * Recurrent items and leap years. * Recurrent items with an end date. * Recurrent items with exceptions. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | Merge branch 'maint'Lukas Fleischer2012-11-261-0/+9
|\|
| * day.c: Fix weekly viewLukas Fleischer2012-11-261-0/+9
| | | | | | | | | | | | | | Calculate busy slices correctly if (recurrent) appointments with a duration of more than 24 hours are used. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | io_check_*()/io_file_exist(): Fix signaturesLukas Fleischer2012-11-263-22/+22
| | | | | | | | | | | | | | This was broken in commit 87fb8cfec0d8e8fc901746095458bd316314b6ee. Fix function signatures and update all invocations accordingly. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | po/: Add MakevarsLukas Fleischer2012-11-263-5/+41
| | | | | | | | | | | | | | | | Add project-specific gettext settings to "po/Makevars". Also, remove the "AM_XGETTEXT_OPTION" autoconf macro and use "XGETTEXT_OPTIONS" Makevars instead. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | autogen.sh: Add missing autopoint(1) commandLukas Fleischer2012-11-262-0/+2
| | | | | | | | | | | | | | autopoint(1) is needed to create the gettext infrastructure. This was forgotten in 7e7987575a4d5228137dba649813307c381c5034. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | io.c: Several minor simplificationsLukas Fleischer2012-11-251-43/+31
| | | | | | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | args.c: Several minor simplificationsLukas Fleischer2012-11-251-27/+13
| | | | | | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | Replace switch block in layout calculationLukas Fleischer2012-11-251-77/+24
| | | | | | | | | | | | Remove the huge layout switch block and use simple calculations instead. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | Add compact panels supportLukas Fleischer2012-11-257-15/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | Add a configuration option that allows for switching to compact panel mode. In this mode, all window labels are hidden, so that there's more space for actual information. This patch doesn't add a configuration menu entry and doesn't add any documentation. Implements FR#7. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | Avoid core dump if window is too smallLukas Fleischer2012-11-251-0/+3
| | | | | | | | | | | | | | Avoid setting the maximum number of items to a negative number (which eventually results in a core dump). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | Add configuration option to set a default panelLukas Fleischer2012-11-254-10/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | This allows for customizing the panel that is selected by default when calcurse is started. Note that this patch doesn't add any documentation. Also, this configuration option currently cannot be configured using the configuration menu. Implements FR#19. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | Remove wins_slctd_init()Lukas Fleischer2012-11-253-8/+1
| | | | | | | | | | | | | | We only call this once. Remove the wrapper and directly call the wrapped function instead. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | calcurse.pot: Update message catalogLukas Fleischer2012-11-231-197/+183
| | | | | | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | io_load_*(): Add line numbers to error messagesLukas Fleischer2012-11-231-12/+26
| | | | | | | | | | | | | | | | Currently, error messages for (syntax) errors do not contain any line number information. Add the file name and line number to allow users for easily locating any errors in the corresponding data files. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | Merge branch 'maint'Lukas Fleischer2012-11-2312-160/+244
|\| | | | | | | | | | | Conflicts: src/day.c src/recur.c
| * Release screen mutex if thread diesLukas Fleischer2012-11-234-32/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We did not setup a thread cleanup procedure which resulted in calcurse freezing if a thread tried to draw on the screen after another thread was canceled while locking the screen. Note that this kind of cleanup handlers should be added to other mutexes as well. This patch just removes the most common case of triggering a deadlock. Also note that we cannot move pthread_cleanup_push() and pthread_cleanup_pop() into the locking/unlocking functions since both pthread_cleanup_push() and pthread_cleanup_pop() may be implemented as macros that must be used in pairs within the same lexical scope. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
| * Lock screen when drawing on the calendar/notification panelLukas Fleischer2012-11-234-3/+61
| | | | | | | | | | | | | | | | | | | | | | | | Lock the screen if either the calendar panel or the notification bar is updated to avoid race conditions. Addresses BUG#6. Note that we currently always use a screen-level lock, even if only one window is affected. This is to be changed in the future. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
| * Do not display a mark when files are auto-savedLukas Fleischer2012-11-232-23/+2
| | | | | | | | | | | | | | | | | | | | This is kind of useless since users are not able to react to an auto-save notification. It also causes all kinds of problems if the status bar is in a non-standard mode (message, prompt, ...) and is prone to race conditions if the status bar is updated by another thread at the same time. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
| * Replace localtime() with localtime_r()Lukas Fleischer2012-11-2210-126/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the result of localtime() is stored in a statically allocated structure, data was overwritten when a context switch occurred during (or shortly after) the execution of localtime(), potentially resulting in critical data corruption. BUG#7 and BUG#8 are likely related. This patch converts all usages of localtime() with localtime_r(), which is thread-safe. Reported-by: Baptiste Jonglez <baptiste@jonglez.org> Reported-by: Erik Saule <esaule@bmi.osu.edu> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | Use status_ask_choice() for the export dialogLukas Fleischer2012-11-183-39/+14
| | | | | | | | | | | | | | | | Remove the export bar and use a simple status_ask_choice() dialog instead. This reduces code complexity and replaces another unnecessary menu by the well-tested dialog feature that is used everywhere else. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | Remove unused parameter from key handlersLukas Fleischer2012-11-181-46/+46
| | | | | | | | | | | | | | This is no longer needed since different keys use different handlers now. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | calcurse.c: Pull out key_move_*()Lukas Fleischer2012-11-181-22/+40
| | | | | | | | | | | | | | | | | | | | | | Supersedes the "key" parameter from following functions: * key_generic_prev_day() * key_generic_next_day() * key_generic_prev_week() * key_generic_next_week() Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* | calcurse.c: Break up key_change_priority()Lukas Fleischer2012-11-181-5/+14
| | | | | | | | | | | | | | | | Split up key_change_priority() into key_raise_priority(), key_lower_priority() which are wrappers around a new convenience function change_priority(). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>