summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add day_pipe_item() functionLukas Fleischer2011-07-052-0/+56
| | | | | | | | Serializes an appointment or an event, prompts for a shell command and executes that command in a new process, piping serialized item data to its stdin. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Add press_any_key() functionLukas Fleischer2011-07-052-0/+13
| | | | | | | Displays "Press any key to continue..." in shell terminal mode and waits for a key stroke. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Move endwin() down in wins_prepare_external()Lukas Fleischer2011-07-051-1/+1
| | | | | | | | Invoke endwin() *after* calling any other curses functions, such as refresh(). Calling refresh() after endwin() might restore curses mode which is a bad thing for a terminal mode initialization routine. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Refactor wins_launch_external()Lukas Fleischer2011-07-022-20/+27
| | | | | | | | | * Do window preparation and restoring in separate functions wins_prepare_external() and wins_unprepare_external(). * Use fork_exec() and child_wait() instead of system(). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Add shell_exec() functionLukas Fleischer2011-07-022-0/+9
| | | | | | Can be used to execute an external program in a shell. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Add child_wait() functionLukas Fleischer2011-07-022-0/+17
| | | | | | Can be used to wait for the termination of a child process. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Add fork_exec() functionLukas Fleischer2011-07-022-0/+72
| | | | | | | Can be used to execute an external program. Provides the possibility to optionally create a pipe to the new process. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Make recur_*_write() publicLukas Fleischer2011-07-022-2/+4
| | | | | | | This allows one to serialize and send recurrent items to arbitrary output streams. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Refactor out todo item serializationLukas Fleischer2011-07-023-4/+11
| | | | | | | | Add a todo_write() function that allows one to serialize todo items and write serialized data to an output stream in a fashion similar to apoint_write() and event_write(). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* doc/manual.txt: Remove note on missing UTF-8 supportLukas Fleischer2011-07-021-2/+1
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* TODO: Remove UTF-8 support from TODO listLukas Fleischer2011-07-021-1/+0
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* utf8_width() performance improvementsLukas Fleischer2011-07-021-39/+50
| | | | | | | | | * Sort character width lookup table by character ranges. * Use binary search instead of linear search for UTF-8 character width lookups which will speed up utf8_width() (O(log n) instead of O(n)). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Avoid segfault in getstr_fixscr()Lukas Fleischer2011-07-021-2/+2
| | | | | | | | Avoid a segfault that may occur if getstr_fixscr() changes the scroll offset to something outside the input boundaries (e.g. if a word that is only partly visible is killed via backward-kill-word). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Use constant for maximum UTF-8 character sizeLukas Fleischer2011-07-024-4/+6
| | | | | | | Introduce a UTF8_MAXLEN constant instead of using the literal value "6" at various places. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Refactor getstring codeLukas Fleischer2011-07-021-53/+65
| | | | | | | | | | * Rename static showstring() function to getstr_print(), rename ins_char() to getstr_ins_char() and del_char() to getstr_del_char(). * Refactor out getstring data structure initialization and window scrolling routines. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Make display_todo_item() UTF-8 compatibleLukas Fleischer2011-07-021-5/+14
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Make display_item() UTF-8 compatibleLukas Fleischer2011-06-291-6/+15
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Make getstring() UTF-8 compatibleLukas Fleischer2011-06-291-54/+120
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Split line editing functions into separate fileLukas Fleischer2011-06-294-185/+225
| | | | | | | Move getstring() related stuff into a separate file as a first step on our way to UTF-8 support for line editing helpers. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Add basic UTF-8 helper functionsLukas Fleischer2011-06-293-0/+338
| | | | | | | | | | Add utf8_width() and utf8_strwidth() which can be used to calculate the display width of a single character or a string, respectively. A lookup table is used to spot double width characters, as well as composing characters. There currently isn't any code to deal with ambigious characters. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* src/calcurse.h: Add UTF-8 related macrosLukas Fleischer2011-06-291-0/+8
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Enable arrow key navigation by defaultLukas Fleischer2011-06-291-4/+4
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* doc/manual.txt: Document backward-kill-wordLukas Fleischer2011-06-291-0/+3
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Handle resize properly in the sidebar config menuLukas Fleischer2011-06-291-5/+16
| | | | | | | | | There used to be no resize handler in custom_sidebar_config() which resulted in a messed up screen if the terminal was resized during sidebar configuration. Doing a simple wins_reset() if the terminal was resized works around this problem. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Do not try to display items with negative widthLukas Fleischer2011-06-281-0/+3
| | | | | | | Don't display anything rather than segfault if the appointment panel becomes too small (e.g. during a terminal resize). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Always work with new window dimensions on resizeLukas Fleischer2011-06-281-35/+27
| | | | | | | | | | | | This one came up after improving resizing behaviour in commit fec37db06bbbdff79bc9816046a76e0b29e173b4. We used to use outdated width and height values at various places without noticing it due to the resize algorithm being called several times on every resize. This patch ensures we retrieve the new window dimensions *before* doing any layout calculations. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Avoid redundant redraws on resizeLukas Fleischer2011-06-287-77/+106
| | | | | | | | | | 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>
* doc/Makefile.am: Fix "--without-asciidoc"Lukas Fleischer2011-06-201-3/+7
| | | | | | | Do not try to distribute man page and manual files if documentation generation is disabled. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* src/llist.c: Use stable insertion algorithmLukas Fleischer2011-06-201-2/+2
| | | | | | | Ensure the relative order of elements with equal keys is maintained when inserting into a sorted list. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Fix whitespace issuesLukas Fleischer2011-06-095-17/+17
| | | | | | Strip trailing whitespaces in all source files. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* src/utils.c: Make bell() staticLukas Fleischer2011-06-071-1/+1
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Release 2.9.0.v2.9.0Lukas Fleischer2011-05-242-1/+38
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* build-aux/git-version-gen: Ignore timestamps.Lukas Fleischer2011-05-241-0/+1
| | | | | | Do not declare the working tree dirty if only a timestamp has changed. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Add version information to distribution tarball.Lukas Fleischer2011-05-241-0/+3
| | | | | | | We somehow forgot this when adding Git version string support in commit c5e4187590f37e9524a8e3fcb2bccb20f2e8b4eb. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* README: Add missing translators.Lukas Fleischer2011-05-241-0/+2
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Translation updates from Transifex.Lukas Fleischer2011-05-247-3903/+1129
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* .tx/config: Add EOL character to the last line.Lukas Fleischer2011-05-181-0/+1
| | | | | | | | | Be a little more consistent here. Also, transifex-client will automatically add a newline character to the last line of its config file unless it is already there. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Add missing llist header files to "_SOURCES".Lukas Fleischer2011-05-171-0/+2
| | | | | | | | We forgot to add those to the "_SOURCES" variable in commit 0eb1da8dd7fa3ae9d95e12df6058fb41a5ec1c11 and d668963e2056027526374098efe2869a0d389b92. Spotted by `make distcheck`. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Add iCalendar keywords TODO entry.Lukas Fleischer2011-04-221-0/+2
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Update copyright notices in source files, documentation and "COPYING".Lukas Fleischer2011-04-2228-31/+31
| | | | | | | | | * 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>
* TODO overhaul.Lukas Fleischer2011-04-221-27/+24
| | | | | | | | | | * Use AsciiDoc style formatting. * Fix some wording. Use "we" instead of "I" and "us" instead of "me". * Update mail addresses. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* README overhaul.Lukas Fleischer2011-04-221-26/+24
| | | | | | | | | | | | | | * Use AsciiDoc style formatting. * Remove outdated information on the "ChangeLog" file (removed that in commit b9fa5bdbb17f507ba756fe38a14d5993e522bb6c). * Replace references to language specific manual files by "doc/manual.html". * Update author roles. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Ignore daemon lock file if the daemon process died.Lukas Fleischer2011-04-221-1/+1
| | | | | | | Do this in a fashion similar to what was done in commit 6ff95238766656c5ea9d5c65c35d3aef93499f60. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Be a bit more fail-safe in "build-aux/git-version-gen".Lukas Fleischer2011-04-221-2/+3
| | | | | | | | The existence of a ".git" directory is not a sufficient condition to be sure we are in a Git repository. Only overwrite the version information file if `git describe` returns a non-empty string. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Return -1 in io_file_is_empty() if file cannot be accessed.Lukas Fleischer2011-04-223-3/+3
| | | | | | | Ensure files don't appear as empty if fopen() fails (e.g. on temporary EACCES failures). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Documentation Makefile overhaul.Lukas Fleischer2011-04-221-3/+11
| | | | | | | | | * Add documentation input and output files to distribution tarballs. * Use a more generic rule to generate man pages instead of the hardcoded "calcurse.1" target. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Add Git version string support.Lukas Fleischer2011-04-224-1/+32
| | | | | | | | Introduce a script to auto-generate version strings. Use `git describe` to create descriptive version strings when building from a Git checkout, use ".version" files for release tarballs. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Use "event" structure when iterating over events in app_arg().Lukas Fleischer2011-04-221-1/+1
| | | | | | | Regression introduced in commit 5b174ba5d46c256f41c1cfb952d46f49a088db8a. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Add comments to linked list functions.Lukas Fleischer2011-04-221-0/+39
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* llist.c: Nullify pointers after free()'ing.Lukas Fleischer2011-04-221-1/+6
| | | | | | | | | | | | | * Set all data members to "NULL" in llist_free_inner() after freeing them. Altough we normally shouldn't continue working with a list that already went through llist_free_inner(), this will protect against dangling pointer bugs in case anyone will ever come up with the idea of doing so. * Set list head to "NULL" in llist_free(), basically to put the list into an initialized state. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>