summaryrefslogtreecommitdiff
path: root/src/config.py
AgeCommit message (Collapse)Author
2014-10-20Remove the (sometimes wrong) default values in the config.get() callsmathieui
2014-10-20Change the API of Config.get_by_tabnamemathieui
Make the "default" parameter optional and thus move it to the end of the command with the other optional parameters. And change all the calls.
2014-10-20Keep the default config options in a dict and make the “default” ↵mathieui
parameter of config.get() optional the Config object now also optionally takes a dict of default values in its constructor.
2014-10-16Extract XHTML-IM inline imags by defaultmathieui
- Add two new options: tmp_image_dir and extract_inline_images - tmp_image_dir is $XDG_CACHE_HOME(usually ~/.cache)/poezio/images if unset - Name the images from a SHA-1 of their data and their mimetype - Output file:// links inside the message
2014-04-24Fix a bug in the config._parse_file function (traceback when parsing empty ↵mathieui
files)
2014-04-22Add a way to remove options from the config filemathieui
(still surgically, without touching comments or anything else)
2014-04-21Split the config.write_in_file method to be more modular and cleanermathieui
Will also allow a remove_in_file or whatever to remove options instead of blanking them.
2014-04-11Do not traceback when unable to read the config filemathieui
2014-04-06Code cleanupmathieui
fixes whitespace issues, some builtin overrides, and some enormous lines might make poezio run nanoseconds faster!
2014-04-06Do not instantiate the Config at module loadmathieui
delayed execution is cleaner and less error-prone
2014-04-05Fix a bug introduced in ca0950dmathieui
2014-04-04Remove unused importsmathieui
(thanks eijebong)
2014-03-28Returning the value fetched with RawconfigParser.getint is actually quite usefulmathieui
…………………………
2014-03-24Use RawConfigParser.get{int,bool,float} whenever possiblemathieui
config.get('option', 'value').lower() == 'value' is just ugly and stupid, especially for bool. One if in basetabs:556 was also missing a comparison, leading to True whenever the option was set.
2014-02-01Date the log records (error.log or debug logs)mathieui
2013-12-28Fix #2414 (don’t use /tmp/dummy in the logging config)mathieui
2013-12-04Write the config to a tmp file before a final copyMathieu Pasquet
(should prevent some conditions leading to config corruption happenning when poezio cannot write anymore)
2013-08-03Logs errors by default, in a dedicated filemathieui
- log_errors option, true by default - errors go in log_dir/errors.log (so $XDG_DATA_HOME/errors.log by default) This should help a lot for debugging, and provide a way for people to easily give debug traces without useless or personal infos.
2013-06-19Revert 9eaffe1369f2be177576402f20edcd114a1eaa9d because of 3.1 compatmathieui
2013-06-18Trigger config_change handlers when the config has changed using a USR1 signalFlorent Le Coz
2013-06-16Fail properly when the config can’t be parsed.mathieui
2013-06-09Fix the os.makedirs calls so that they don’t traceback for nothingmathieui
2013-05-29Small workaround for the default config locationmathieui
2013-05-26Update setup.py to use distutilsmathieui
(use new default directory, install the plugins as a separate python module…)
2013-05-06Fix #2286mathieui
Also fix the copy of the default config if -f is used
2013-04-05Handle I/O errors bettermathieui
- Do not crash because of low disk space - Notify the user whenever it happens - A few functions now return a boolean instead of nothing - Config.silent_set is Config.set_and_save without toggle and returning strings. It is used whenever we don’t need set_and_save - Config.set_and_save now returns a tuple (that can be passed directly to core.information()) TODO: display the precise error to the user (instead of “unable to…”)
2013-03-04Fix #2126 (per-server configuration sections)mathieui
(also move replace_key_with_bound() to core.py, to prevent having common.py depending of config.py)
2013-01-29make the options in the config files case sensitive.Florent Le Coz
2012-12-15Fix a TB on python < 3.2mathieui
2012-12-15Add support for /set <option> toggle, which toggles the current valueFlorent Le Coz
fix #2184
2012-09-13Fix TBs when the system is not in utf-8 by defaultmathieui
(force every file opening to be with the utf-8 encoding)
2012-08-06Add a fallback to optparse if argparse is not foundmathieui
2012-08-05Use the revision/date for the poezio version if a .git is foundmathieui
2012-08-05Move from optparse (deprecated) to argparsemathieui
2012-07-26Small non-impacting modificationsmathieui
- Write the config with “option = value” instead of “option= value” - Docstring for sighup_handler - Optimize a join() in the main loop - Rename the verbose get_error_message_from_error_stanza() with get_error_message() - Remove the unused Tab.just_before_refresh() which is litterally used nowhere in poezio
2012-05-09Allow a config to be set & created directlymathieui
2012-04-18Adda config.getl to return a lowercase valuemathieui
2012-03-30Should fix the refresh issuemathieui
2012-03-08Fix a bug in the configuration writermathieui
2012-02-09Config.write_in_file() now works as expectedmathieui
(can add sections, add inexistant options, and edit in place)
2012-01-26We can now configure each conversation independently, for some options.Florent Le Coz
Fixed #2039.
2011-09-11Change license to zlib (MIT sucks :()Florent Le Coz
2011-09-10Added a help message for the first runmathieui
2011-09-06Change license to MITFlorent Le Coz
2011-07-05Check that all needed config sections are there at startup, and create them ↵Florent Le Coz
if not
2011-06-04some path.join forgotten causing the config file to be overwritten an not ↵mathieui
taken into account…
2011-06-04fix the display of the action 'emptying the status', and some few minor changesmathieui
2011-01-13Fix copy of default config fileFlorent Le Coz
2011-01-01update copyright datelouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13
2010-12-17Also catch errors on config savelouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13