diff options
author | mathieui <mathieui@mathieui.net> | 2015-06-18 21:11:58 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2015-06-18 21:11:58 +0200 |
commit | d9050e9565e8c7a3e5ad101f9998c72f7d812baa (patch) | |
tree | ca25dea085eaf72a390f5e756c6fbd77d818109c | |
parent | 43ef5fd949b0c6632b0a4277a0d379a1e3b8f88c (diff) | |
download | poezio-d9050e9565e8c7a3e5ad101f9998c72f7d812baa.tar.gz poezio-d9050e9565e8c7a3e5ad101f9998c72f7d812baa.tar.bz2 poezio-d9050e9565e8c7a3e5ad101f9998c72f7d812baa.tar.xz poezio-d9050e9565e8c7a3e5ad101f9998c72f7d812baa.zip |
Add a show_jid_in_conversations option
To hide or show the JID of the contact in conversation tabs.
-rw-r--r-- | data/default_config.cfg | 3 | ||||
-rw-r--r-- | doc/source/configuration.rst | 7 | ||||
-rw-r--r-- | src/config.py | 1 | ||||
-rw-r--r-- | src/windows/info_wins.py | 4 |
4 files changed, 14 insertions, 1 deletions
diff --git a/data/default_config.cfg b/data/default_config.cfg index c9196979..519dafb1 100644 --- a/data/default_config.cfg +++ b/data/default_config.cfg @@ -305,6 +305,9 @@ show_muc_jid = true # poezio will only show: toto (2) show_roster_jids = true +# Show JIDs in conversation tabs +show_jid_in_conversations = true + # show s2s errors in the roster show_s2s_errors = true diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst index db2a843f..c910b0e5 100644 --- a/doc/source/configuration.rst +++ b/doc/source/configuration.rst @@ -710,6 +710,13 @@ or the way messages are displayed. the contact names). If there is no contact name, the JID will still be displayed. + show_jid_in_conversations + + **Default value:** ``true`` + + If ``false``, the JID of the contact will not be displayed in the information + window in conversation tags. + show_s2s_errors **Default value:** ``true`` diff --git a/src/config.py b/src/config.py index a6f1417e..701bfaad 100644 --- a/src/config.py +++ b/src/config.py @@ -108,6 +108,7 @@ DEFAULT_CONFIG = { 'server': 'anon.jeproteste.info', 'show_composing_tabs': 'direct', 'show_inactive_tabs': True, + 'show_jid_in_conversations': True, 'show_muc_jid': True, 'show_roster_jids': True, 'show_roster_subscriptions': '', diff --git a/src/windows/info_wins.py b/src/windows/info_wins.py index 80af4602..f6aebd35 100644 --- a/src/windows/info_wins.py +++ b/src/windows/info_wins.py @@ -7,6 +7,7 @@ import logging log = logging.getLogger(__name__) from common import safeJID +from config import config from . import Win from . funcs import truncate_nick @@ -136,7 +137,8 @@ class ConversationInfoWin(InfoWin): # resource can now be a Resource: user is in the roster and online # or resource is None: user is in the roster but offline self._win.erase() - self.write_contact_jid(jid) + if config.get('show_jid_in_conversations'): + self.write_contact_jid(jid) self.write_contact_informations(contact) self.write_resource_information(resource) self.print_scroll_position(window) |