patch 564fe5aa95af90b3fb9e3d522c114fecd249b914
Author: Enrique D. Bosch <presidev@AT@gmail.com>
Date: Fri Aug 31 00:48:30 CEST 2018
* Set some defaults for missing config options
hunk ./idlebiff 33
+proc check_conf_and_set_default { opt default } \
+{
+ variable ::shared::conf
+
+ if {![ info exists conf($opt) ]} { set conf($opt) $default }
+}
+
hunk ./idlebiff 63
- variable criteria
hunk ./idlebiff 190
- variable ::shared::conf
- variable ::shared::criteria
hunk ./idlebiff 192
- if {[ info exists conf(criteria) ]} { if {[ ne $conf(criteria) {} ]} { set criteria $conf(criteria) } } \
- else { set criteria UNSEEN }
+ check_conf_and_set_default criteria UNSEEN
+ check_conf_and_set_default nodecor 1
+ check_conf_and_set_default tip 0
+ check_conf_and_set_default tls 0
+ check_conf_and_set_default tls_validate_cert 1
+ check_conf_and_set_default initial_noop 0
+ check_conf_and_set_default imap_trace 0
hunk ./idlebiff 207
- variable ::shared::criteria
+ variable ::shared::conf
hunk ./idlebiff 211
- set search "SEARCH RETURN (COUNT) $criteria"
+ set search "SEARCH RETURN (COUNT) $conf(criteria)"
hunk ./idlebiff 216
- set search "SEARCH $criteria"
+ set search "SEARCH $conf(criteria)"
hunk ./idlebiff 609
-} [_$_]
+}