diff options
author | Timo Sirainen <cras@irssi.org> | 2002-12-28 17:54:13 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-12-28 17:54:13 +0000 |
commit | bd6fe052bce57849a7a850c0c5bee0ad896b9460 (patch) | |
tree | 95f3cb743874913a6dc1ff1314264b88989a4b60 /src/fe-common/core/fe-queries.c | |
parent | 9c18cb00e7d096e46f5853f802724da4c59c2857 (diff) | |
download | irssi-bd6fe052bce57849a7a850c0c5bee0ad896b9460.zip |
Added time, size and level setting types. Breaks some settings - I'll add
automatic converter to these settings later. Meanwhile you CVS users can
fix your config files yourself :)
Time settings allow using "days", "hours", "minutes", "seconds" and
"milliseconds" or several of their abbreviations. For example "5d 4h
5msecs".
Size settings allow using "gbytes", "mbytes", "kbytes" and "bytes" or their
abbrevations. For example "5MB".
Level settings are currently handled pretty much the way they were before.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3080 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/core/fe-queries.c')
-rw-r--r-- | src/fe-common/core/fe-queries.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fe-common/core/fe-queries.c b/src/fe-common/core/fe-queries.c index 8345d52f..f48e37e9 100644 --- a/src/fe-common/core/fe-queries.c +++ b/src/fe-common/core/fe-queries.c @@ -340,8 +340,8 @@ static void sig_message_private(SERVER_REC *server, const char *msg, static void read_settings(void) { - querycreate_level = level2bits(settings_get_str("autocreate_query_level")); - query_auto_close = settings_get_int("autoclose_query"); + querycreate_level = settings_get_level("autocreate_query_level"); + query_auto_close = settings_get_time("autoclose_query")/1000; if (query_auto_close > 0 && queryclose_tag == -1) queryclose_tag = g_timeout_add(5000, (GSourceFunc) sig_query_autoclose, NULL); else if (query_auto_close <= 0 && queryclose_tag != -1) { @@ -352,9 +352,9 @@ static void read_settings(void) void fe_queries_init(void) { - settings_add_str("lookandfeel", "autocreate_query_level", "MSGS DCCMSGS"); + settings_add_level("lookandfeel", "autocreate_query_level", "MSGS DCCMSGS"); settings_add_bool("lookandfeel", "autocreate_own_query", TRUE); - settings_add_int("lookandfeel", "autoclose_query", 0); + settings_add_time("lookandfeel", "autoclose_query", "0"); queryclose_tag = -1; read_settings(); |