summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-02-14parse_duration(): Bail out early in final stateLukas Fleischer
Bail out early if we are reading a character while being in a final state. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-02-14ui-day.c: Several minor simplificationsLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-02-14ui-todo.c: Refactor ui_todo_chg_priority()Lukas Fleischer
Add the new item *before* deleting the old one and get rid of temporary buffers for the item message and note. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-02-14Mark todo_get_position() publicLukas Fleischer
This is needed in "ui-todo.c" now. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-02-14calendar.c: Rename to "ui-calendar.c"Lukas Fleischer
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>
2013-02-14todo.c: Split out UI-related functionsLukas Fleischer
* Move UI-related functions to "ui-todo.c". * Rename UI-related functions to ui_todo_*(). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-02-14apoint.c: Split out UI-related functionsLukas Fleischer
* Move UI-related functions to "ui-day.c". * Rename UI-related functions to ui_day_*(). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-02-14Rename appointment/event-related UI functionsLukas Fleischer
* 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>
2013-02-14Split out UI functions for todo itemsLukas Fleischer
* 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>
2013-02-09Merge branch 'maint'Lukas Fleischer
2013-02-09Release 3.1.4v3.1.4Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-02-05Do not ignore "--datarootdir" in "po/Makefile.in.in"Lukas Fleischer
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>
2013-02-04Merge branch 'maint'Lukas Fleischer
2013-02-04Update copyright rangesLukas Fleischer
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>
2013-02-04Close key binding window when reassigning the same keyMichael Smith
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>
2013-02-03Do not prompt for a todo after adding an appointmentLukas Fleischer
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>
2013-02-02Release 3.1.3v3.1.3Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-02-02Merge branch 'maint'Lukas Fleischer
2013-02-01day_process_storage(): Remove redundant parameterLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-02-01Properly skip spaces after exception listLukas Fleischer
Skip whitespace after obtaining the list of exceptions instead of skipping the next character unconditionally. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-02-01Skip start time update if prompt is canceledLukas Fleischer
See commit 217e66729a249a638863a9cc2ff93b8368cd6094 for details. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-02-01Skip duration update if the prompt is canceledLukas Fleischer
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>
2013-01-30Delete TODO fileLukas Fleischer
This is outdated and has been migrated to the bug tracker which turned out to be a much better way of keeping track of tickets. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-01-30Use strncasecmp() for case-insensitive comparisonLukas Fleischer
Instead of converting everything to upper case and then using strncmp(), use strncasecmp() which does case-insensitive comparison out of the box. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-01-30Remove unused function mystrtol()Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-01-30custom.c: Fix sidebar configuration help textLukas Fleischer
* Use a format string instead of the TOSTRING() macro. * Remove "xgettext:no-c-format" hack and use "%%" instead. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2012-12-22test/: Use `faketime -f`Lukas Fleischer
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>
2012-12-22test/: Do not error out if libfaketime is missingLukas Fleischer
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>
2012-12-16Release 3.1.2v3.1.2Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2012-12-16do_storage(): Unset highlighted item if list is emptyLukas Fleischer
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>
2012-12-16Display correct startup messagesLukas Fleischer
These messages have been swapped accidentally during refactoring. Regression introduced in 691f8a6015bafcf6ed4f99a3649d428fb7a8e915. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2012-12-16Add hidden key handler windowLukas Fleischer
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>
2012-12-06Release 3.1.1v3.1.1Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2012-12-06Fix two enumeration types in function signaturesLukas Fleischer
Spotted with clang and "-Wconversion". Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2012-12-06keys.c: Remove several unneeded assertionsLukas Fleischer
Seen when compiling with clang and "-Wtautological-compare". Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2012-12-06wins_show(): Fix size of the slave window arrayLukas Fleischer
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>
2012-12-05Release 3.1.0v3.1.0Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2012-12-05io_load_keys(): Skip legacy entryLukas Fleischer
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>
2012-12-05keys_save_bindings(): Skip unset key bindingsLukas Fleischer
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>
2012-12-05po/: Translation updates from TransifexLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2012-12-05test/Makefile.am: Add missing files to EXTRA_DISTLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2012-11-29Merge branch 'maint'Lukas Fleischer
2012-11-28Ignore signals during command executionLukas Fleischer
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>
2012-11-26run-test.c: Return failure if actual output is too shortLukas Fleischer
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>
2012-11-26test/: Add a couple of tests for recurrent itemsLukas Fleischer
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>
2012-11-26Merge branch 'maint'Lukas Fleischer
2012-11-26day.c: Fix weekly viewLukas Fleischer
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>
2012-11-26io_check_*()/io_file_exist(): Fix signaturesLukas Fleischer
This was broken in commit 87fb8cfec0d8e8fc901746095458bd316314b6ee. Fix function signatures and update all invocations accordingly. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2012-11-26po/: Add MakevarsLukas Fleischer
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>
2012-11-26autogen.sh: Add missing autopoint(1) commandLukas Fleischer
autopoint(1) is needed to create the gettext infrastructure. This was forgotten in 7e7987575a4d5228137dba649813307c381c5034. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>