aboutsummaryrefslogtreecommitdiffstats
path: root/src/wins.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Add key bindings to go to the previous/next month/yearLukas Fleischer2012-06-131-3/+10
| | | | | | | | | | In addition to generic key bindings for moving one day (week) forward/backward, define similar bindings for moving a month or a year. Of course, count prefixes are allowed here as well. Also add status bar hints and help texts. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Rename displacement enumeration elementsLukas Fleischer2012-06-131-8/+8
| | | | | | | | | | * Rename "LEFT" to "DAY_PREV", "RIGHT" to "DAY_NEXT", "UP" to "WEEK_PREV" and "DOWN" to "WEEK_NEXT" to reflect the semantics of these operations. Remove the unneeded "MOVES" element. * Reorder code to improve consistency. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Switch to Linux kernel coding styleLukas Fleischer2012-05-211-426/+359
| | | | | | | | | | | | | | Convert our code base to adhere to Linux kernel coding style using Lindent, with the following exceptions: * Use spaces, instead of tabs, for indentation. * Use 2-character indentations (instead of 8 characters). Rationale: We currently have too much levels of indentation. Using 8-character tabs would make huge code parts unreadable. These need to be cleaned up before we can switch to 8 characters. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* src/wins.c: Run editor and pager in a shellLukas Fleischer2012-05-161-1/+1
| | | | | | | | | This allows for specifying an editor or a pager with additional command line parameters, such as "vim -e". Instead of interpreting "vim -e" as an executable file, we leave it to the shell to tokenize and parse the editor command now. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Declare several parameters/variables constantLukas Fleischer2012-05-081-2/+2
| | | | | | | | | | | | Add the "const" keyword to parameters and variables that are never modified. Most of these were spotted by "-Wwrite-strings". We cast the second parameter to execvp() explicitly as it expects a "char *const[]" where it should expect a "const char *const[]" (according to the documentation, this is due to compatibility reasons). This should be changed once we come up with a better solution. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Various code cleanupBaptiste Jonglez2012-05-021-11/+3
| | | | | | | | Remove obsolete bits of code that weren't thrown away by b5c1981; simplify some others areas of the code. Signed-off-by: Baptiste Jonglez <baptiste--git@jonglez.org> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Use percentage-based width for the sidebarLukas Fleischer2012-04-121-23/+14
| | | | | | | | | | Use percentage-based widths internally. This slightly impairs (user) feedback but brings the sidebar configuration menu closer to the actual configuration format (the user now configures percentage-based widths, not absolute width values). As a bonus, the sidebar is now resized automatically on each window resize (based on the percentage values). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Update copyright rangesLukas Fleischer2012-03-261-1/+1
| | | | | | Add 2012 to the copyright range for all source and documentation files. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Do not strncpy() strings returned by gettext()Lukas Fleischer2012-03-121-9/+4
| | | | | | | | 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>
* Revamp key bindings displayLukas Fleischer2012-03-021-28/+46
| | | | | | | | | | | | | Refactor the logic inside keys_display_bindings_bar() and remove the need to place the "show next page" key binding at the right positions. This used to be a pain to maintain, since we always had to move key bindings around when introducing a new key. Fix this by passing the actual key bindings in an array and using a separate parameter for the "show next page" key binding (which is automatically inserted at the right places from now on). 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>
* Do not cast unused return values to voidLukas Fleischer2011-11-021-4/+4
| | | | | | | | | | | | | | | | | | | | 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-3/+3
| | | | | | | | | | | | | | | | 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 window updatesLukas Fleischer2011-10-061-30/+34
| | | | | | | | Add a window bitmask to wins_update() and only update windows that might actually require an update in our main loop. This improves response times of the user interface a bit. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Add key binding for pipe-item commandLukas Fleischer2011-07-071-7/+9
| | | | | | | This removes the need of reading the whole data file and find matching entries if we want to parse appointments in external programs. 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-021-19/+24
| | | | | | | | | * 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>
* 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>
* Remove some more dead assignments spotted by clang-analyzer.Lukas Fleischer2011-04-121-1/+0
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Compare pointers to "NULL" instead of "0".Lukas Fleischer2011-04-051-2/+2
| | | | | | "bad_zero.cocci" spatch from http://coccinelle.lip6.fr/impact_linux.php. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Remove unused variables from wins_show().Lukas Fleischer2011-04-031-4/+1
| | | | | | Seen with "-Wunused-but-set-variable". Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Overall indentation fixes.Lukas Fleischer2011-03-141-22/+22
| | | | | | | 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
|
* Check added to avoid problems in case side bar width is not found in ↵Frederic Culot2010-03-231-2/+4
| | | | configuration file.
* Avoid concurrent screen refreshes.Frederic Culot2010-03-211-6/+74
|
* More work on sidebar customization.Frederic Culot2010-03-211-17/+87
|
* Work on sidebar width user-customization.Frederic Culot2010-03-201-8/+22
|
* All headers gathered into a single one. Typedefs suppressed.Frederic Culot2010-03-201-58/+51
|
* Key bindings for changing calendar view added to the status bar.Frederic Culot2009-10-281-7/+8
|
* Make use of calendar window attributes instead of constants.Frederic Culot2009-08-251-16/+19
|
* stdbool header removed, unsigned type used insteadFrederic Culot2009-07-121-2/+2
|
* Switch to BSD license.Frederic Culot2009-07-051-14/+26
|
* Flag command added in todo panelFrederic Culot2009-06-261-4/+4
|
* more code cleanupFrederic Culot2009-01-031-3/+137
|
* code cleanupFrederic Culot2009-01-021-4/+4
|
* Automatic periodic saves implementedFrederic Culot2008-12-281-2/+2
|
* Added wrappers around libc's memory management functions, to easily debug ↵Frederic Culot2008-12-281-8/+9
| | | | memory usage
* code cleanupFrederic Culot2008-12-121-8/+4
|
* Building configuration menu to assign keybindingsFrederic Culot2008-11-231-5/+5
|
* More work on ical import. Macros to handle errors and to display messages in ↵Frederic Culot2008-09-201-1/+6
| | | | both command-line and curses mode added
* some memory leaks fixed using valgrind and some minor code cleanupFrederic Culot2008-04-191-4/+4
|
* Scrollbar added in general configuration menuFrederic Culot2008-04-191-2/+17
|
* Generic functions to handle scrolling windows createdFrederic Culot2008-04-181-1/+49
|
* Yet another style for source code. GNU style now used (I am fed up with tabs...)Frederic Culot2008-04-121-279/+294
|
* proper cvs tag usedFrederic Culot2008-02-141-1/+1
|
* manpage updatedFrederic Culot2008-02-131-2/+3
| | | | | | | NOTESIZ shortened to be 6 characters long, as only 6 'X' are used in the glibc version of mkstemp(3). bugfix: wrong calculated len in wins_launch_external(), which lead to erroneus note file name
* memory leak fixed in notify_thread_app()Frederic Culot2008-02-101-4/+9
| | | | | | check for limits.h header added asprintf() call replaced in wins_launch_external() as it is not fully portable