summaryrefslogtreecommitdiff
path: root/src/custom.c
AgeCommit message (Collapse)Author
2011-07-21Declare foreground and background variables globalLukas Fleischer
Removes the need to pass the terminal's default background color round. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-07-21Refactor out integer variable parsingLukas Fleischer
Introduce conf_parse_unsigned() and conf_parse_int() similar to conf_parse_bool(). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-07-21Refactor conf_parse_bool()Lukas Fleischer
* 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>
2011-07-21Rename fill_config_var() to conf_parse_bool()Lukas Fleischer
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>
2011-07-21Refactor out configuration variable settingLukas Fleischer
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>
2011-07-15Parse single-line configuration variablesLukas Fleischer
Include a fallback branch that accepts multi-line comments as well (backward compatibility). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-07-15Be stricter when parsing the configuration fileLukas Fleischer
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>
2011-07-15Refactor custom_load_conf()Lukas Fleischer
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>
2011-06-29Handle resize properly in the sidebar config menuLukas Fleischer
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>
2011-06-28Always work with new window dimensions on resizeLukas Fleischer
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>
2011-06-28Avoid redundant redraws on resizeLukas Fleischer
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>
2011-04-22Update copyright notices in source files, documentation and "COPYING".Lukas Fleischer
* 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>
2011-04-05Fix bad use of unsigned integers.Lukas Fleischer
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>
2011-04-05Compare pointers to "NULL" instead of "0".Lukas Fleischer
"bad_zero.cocci" spatch from http://coccinelle.lip6.fr/impact_linux.php. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-14Overall indentation fixes.Lukas Fleischer
Use spaces instead of tabs for source code indentation only, strip trailing whitespaces from lines. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-04Update website links to match the new URL.Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-04Update mail addresses to match the new mailing lists.Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-03Remove CVS "$Id" headers.Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-03Fixed file permissions.Lukas Fleischer
2010-03-29Exit menu item added to sidebar configuration screen (thanks Doug for ↵Frederic Culot
reporting this).
2010-03-21Online help added for side bar configuration screen.Frederic Culot
2010-03-21Avoid concurrent screen refreshes.Frederic Culot
2010-03-21More work on sidebar customization.Frederic Culot
2010-03-20Work on sidebar width user-customization.Frederic Culot
2010-03-20All headers gathered into a single one. Typedefs suppressed.Frederic Culot
2009-10-28Code to save the calendar default view in the configuration file.Frederic Culot
2009-08-02conf_set_scrsize not static any more (moved to custom_set_swsiz)Frederic Culot
2009-08-01Save and restore daemon configuration options.Frederic Culot
2009-07-29bugfixesFrederic Culot
2009-07-12calcurse version removed from menu titlesFrederic Culot
2009-07-12stdbool header removed, unsigned type used insteadFrederic Culot
2009-07-05Switch to BSD license.Frederic Culot
2009-06-20Bugfix: avoid a possible freeze under OpenBSD when changing color from ↵Frederic Culot
within the configuration screen.
2009-01-24make it possible to use KEY_HOME and KEY_END to define new key bindings, and ↵Frederic Culot
prevent user from assigning a non-recgnized key
2009-01-05iso date format addedFrederic Culot
2009-01-03more code cleanupFrederic Culot
2009-01-02code cleanupFrederic Culot
2008-12-28Automatic periodic saves implementedFrederic Culot
2008-12-28Added wrappers around libc's memory management functions, to easily debug ↵Frederic Culot
memory usage
2008-12-20new layout configuration menuFrederic Culot
2008-12-14small bugfixes and code cleanupFrederic Culot
2008-12-08color configuration menu adapted to handle user-defined key bindingsFrederic Culot
2008-12-07Checks added while loading key bindings configuration.Frederic Culot
2008-11-25User-defined keys are now saved to file.Frederic Culot
2008-11-23Building configuration menu to assign keybindingsFrederic Culot
2008-11-16More work on implementing user-definable keybindingsFrederic Culot
2008-11-09Loading of user-configurable keys implementedFrederic Culot
2008-09-21import flag and 'i' keybinding addedFrederic Culot
2008-04-19some memory leaks fixed using valgrind and some minor code cleanupFrederic Culot
2008-04-19Scrollbar added in general configuration menuFrederic Culot