diff options
author | mathieui <mathieui@mathieui.net> | 2016-11-06 18:54:45 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2016-11-06 18:54:45 +0100 |
commit | 474966c5f71db2e94c397165406a47724beed49b (patch) | |
tree | cd83ddd62f43b764128421d5449404e566b9a94d /poezio | |
parent | e708f818260aefbbeb96fd79e2d56769df833708 (diff) | |
parent | 62a04803f0201cf06a21c835dccc219e682e6f3b (diff) | |
download | poezio-474966c5f71db2e94c397165406a47724beed49b.tar.gz poezio-474966c5f71db2e94c397165406a47724beed49b.tar.bz2 poezio-474966c5f71db2e94c397165406a47724beed49b.tar.xz poezio-474966c5f71db2e94c397165406a47724beed49b.zip |
Merge branch 'popup_filters' of https://github.com/LukeMarlin/poezio
Diffstat (limited to 'poezio')
-rw-r--r-- | poezio/config.py | 1 | ||||
-rw-r--r-- | poezio/core/core.py | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/poezio/config.py b/poezio/config.py index f2002382..ade9f740 100644 --- a/poezio/config.py +++ b/poezio/config.py @@ -74,6 +74,7 @@ DEFAULT_CONFIG = { 'ignore_certificate': False, 'ignore_private': False, 'information_buffer_popup_on': 'error roster warning help info', + 'information_buffer_type_filter': '', 'jid': '', 'keyfile': '', 'lang': 'en', diff --git a/poezio/core/core.py b/poezio/core/core.py index f2341ba3..35d50b65 100644 --- a/poezio/core/core.py +++ b/poezio/core/core.py @@ -1405,10 +1405,14 @@ class Core(object): """ Displays an informational message in the "Info" buffer """ + filter_types = config.get('information_buffer_type_filter').split(':') + if typ.lower() in filter_types: + log.debug('Did not show the message:\n\t%s> %s \n\tdue to information_popup_type_filter configuration', typ, msg) + return False filter_messages = config.get('filter_info_messages').split(':') for words in filter_messages: if words and words in msg: - log.debug('Did not show the message:\n\t%s> %s', typ, msg) + log.debug('Did not show the message:\n\t%s> %s \n\tdue to filter_info_messages configuration', typ, msg) return False colors = get_theme().INFO_COLORS color = colors.get(typ.lower(), colors.get('default', None)) |