summaryrefslogtreecommitdiffstats
path: root/src/custom.c
Commit message (Collapse)AuthorAgeFilesLines
* Return error status in custom_set_conf()Lukas Fleischer2011-07-211-14/+16
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Rename custom_load_color() to conf_parse_color()Lukas Fleischer2011-07-211-21/+16
| | | | | | | Also, temporarily remove all error messages and return an error status instead. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Declare foreground and background variables globalLukas Fleischer2011-07-211-6/+6
| | | | | | Removes the need to pass the terminal's default background color round. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Refactor out integer variable parsingLukas Fleischer2011-07-211-6/+26
| | | | | | | Introduce conf_parse_unsigned() and conf_parse_int() similar to conf_parse_bool(). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Refactor conf_parse_bool()Lukas Fleischer2011-07-211-19/+21
| | | | | | | | | | | | | * Increase size argument for strncmp() comparisons by one to include the terminating null-character (otherwise "yesfoo" would be parsed as "yes", "nobar" as "no"). * Pass destination address as an additional argument and return success/failure status to allow for better error handling. * Temporarily remove error handling (will be fixed later). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Rename fill_config_var() to conf_parse_bool()Lukas Fleischer2011-07-211-10/+10
| | | | | | | This is a much better name as it implicitly describes that this function parses boolean configuration values only. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Refactor out configuration variable settingLukas Fleischer2011-07-211-75/+82
| | | | | | | | Move configuration variable assignments to a new function, custom_set_conf(). This improves code readability and allows for setting configuration variables outside the configuration file loading function. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Parse single-line configuration variablesLukas Fleischer2011-07-151-25/+33
| | | | | | | Include a fallback branch that accepts multi-line comments as well (backward compatibility). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Be stricter when parsing the configuration fileLukas Fleischer2011-07-151-11/+6
| | | | | | | | Throw an error message if there is a line that contains an invalid configuration line (e.g. a non-empty line that neither contains a key nor a value). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Refactor custom_load_conf()Lukas Fleischer2011-07-151-63/+49
| | | | | | | | Read key and value of each configuration setting in one loop cycle to facilitate adjustments of the configuration setting format. Also, this allows us to get rid of all the redundant variable resetting. 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>
* 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-281-31/+41
| | | | | | | | | | 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>
* 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>
* Fix bad use of unsigned integers.Lukas Fleischer2011-04-051-2/+3
| | | | | | | | Unsigned values should never be compared to values less than zero. Detected with "find_unsigned.cocci" spatch from http://coccinelle.lip6.fr/impact_linux.php. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Compare pointers to "NULL" instead of "0".Lukas Fleischer2011-04-051-1/+1
| | | | | | "bad_zero.cocci" spatch from http://coccinelle.lip6.fr/impact_linux.php. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Overall indentation fixes.Lukas Fleischer2011-03-141-397/+397
| | | | | | | 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
|
* Exit menu item added to sidebar configuration screen (thanks Doug for ↵Frederic Culot2010-03-291-2/+3
| | | | reporting this).
* Online help added for side bar configuration screen.Frederic Culot2010-03-211-20/+24
|
* Avoid concurrent screen refreshes.Frederic Culot2010-03-211-9/+9
|
* More work on sidebar customization.Frederic Culot2010-03-211-6/+14
|
* Work on sidebar width user-customization.Frederic Culot2010-03-201-15/+63
|
* All headers gathered into a single one. Typedefs suppressed.Frederic Culot2010-03-201-55/+75
|
* Code to save the calendar default view in the configuration file.Frederic Culot2009-10-281-2/+8
|
* conf_set_scrsize not static any more (moved to custom_set_swsiz)Frederic Culot2009-08-021-6/+6
|
* Save and restore daemon configuration options.Frederic Culot2009-08-011-3/+15
|
* bugfixesFrederic Culot2009-07-291-4/+4
|
* calcurse version removed from menu titlesFrederic Culot2009-07-121-8/+5
|
* stdbool header removed, unsigned type used insteadFrederic Culot2009-07-121-8/+8
|
* Switch to BSD license.Frederic Culot2009-07-051-14/+26
|
* Bugfix: avoid a possible freeze under OpenBSD when changing color from ↵Frederic Culot2009-06-201-3/+12
| | | | within the configuration screen.
* make it possible to use KEY_HOME and KEY_END to define new key bindings, and ↵Frederic Culot2009-01-241-8/+24
| | | | prevent user from assigning a non-recgnized key
* iso date format addedFrederic Culot2009-01-051-5/+7
|
* more code cleanupFrederic Culot2009-01-031-2/+5
|
* code cleanupFrederic Culot2009-01-021-14/+17
|
* Automatic periodic saves implementedFrederic Culot2008-12-281-31/+81
|
* Added wrappers around libc's memory management functions, to easily debug ↵Frederic Culot2008-12-281-21/+29
| | | | memory usage
* new layout configuration menuFrederic Culot2008-12-201-23/+160
|
* small bugfixes and code cleanupFrederic Culot2008-12-141-36/+19
|
* color configuration menu adapted to handle user-defined key bindingsFrederic Culot2008-12-081-25/+39
|
* Checks added while loading key bindings configuration.Frederic Culot2008-12-071-9/+9
|
* User-defined keys are now saved to file.Frederic Culot2008-11-251-5/+2
|
* Building configuration menu to assign keybindingsFrederic Culot2008-11-231-18/+231
|
* More work on implementing user-definable keybindingsFrederic Culot2008-11-161-8/+9
|
* Loading of user-configurable keys implementedFrederic Culot2008-11-091-2/+2
|
* import flag and 'i' keybinding addedFrederic Culot2008-09-211-4/+4
|