summaryrefslogtreecommitdiff
path: root/src/tabs/privatetab.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2014-10-31 19:15:57 +0100
committermathieui <mathieui@mathieui.net>2014-10-31 19:16:44 +0100
commit1c1ab3cb839e5509db52770e10c7190f844eb2e5 (patch)
treeb331060b3dc42651e61e4ccb2dfe6af5e2e97752 /src/tabs/privatetab.py
parentcedc5a6ec80a46437f42464415fd1806049c593d (diff)
parentea2b703bfd07d293ba9fdd85ac657275d43da2a7 (diff)
downloadpoezio-1c1ab3cb839e5509db52770e10c7190f844eb2e5.tar.gz
poezio-1c1ab3cb839e5509db52770e10c7190f844eb2e5.tar.bz2
poezio-1c1ab3cb839e5509db52770e10c7190f844eb2e5.tar.xz
poezio-1c1ab3cb839e5509db52770e10c7190f844eb2e5.zip
Merge branch 'master' of git.poez.io:poezio into slix
Conflicts: src/bookmark.py src/config.py src/connection.py src/core/commands.py src/core/core.py src/core/handlers.py src/windows/info_bar.py src/windows/muc.py src/windows/roster_win.py src/windows/text_win.py src/xhtml.py
Diffstat (limited to 'src/tabs/privatetab.py')
-rw-r--r--src/tabs/privatetab.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/tabs/privatetab.py b/src/tabs/privatetab.py
index c1e8c8e5..4c01cd70 100644
--- a/src/tabs/privatetab.py
+++ b/src/tabs/privatetab.py
@@ -109,7 +109,7 @@ class PrivateTab(OneToOneTab):
compare_users = lambda x: x.last_talked
word_list = [user.nick for user in sorted(self.parent_muc.users, key=compare_users, reverse=True)\
if user.nick != self.own_nick]
- after = config.get('after_completion', ',')+" "
+ after = config.get('after_completion') + ' '
input_pos = self.input.pos
if ' ' not in self.input.get_text()[:input_pos] or (self.input.last_completion and\
self.input.get_text()[:input_pos] == self.input.last_completion + after):
@@ -139,7 +139,7 @@ class PrivateTab(OneToOneTab):
replaced = False
if correct or msg['replace']['id']:
msg['replace']['id'] = self.last_sent_message['id']
- if config.get_by_tabname('group_corrections', True, self.name):
+ if config.get_by_tabname('group_corrections', self.name):
try:
self.modify_message(msg['body'], self.last_sent_message['id'], msg['id'],
user=user, jid=self.core.xmpp.boundjid, nickname=self.own_nick)
@@ -153,7 +153,8 @@ class PrivateTab(OneToOneTab):
msg.enable('html')
msg['html']['body'] = xhtml.poezio_colors_to_html(msg['body'])
msg['body'] = xhtml.clean_text(msg['body'])
- if config.get_by_tabname('send_chat_states', True, self.general_jid, True) and self.remote_wants_chatstates is not False:
+ if (config.get_by_tabname('send_chat_states', self.general_jid) and
+ self.remote_wants_chatstates is not False):
needed = 'inactive' if self.inactive else 'active'
msg['chat_state'] = needed
if attention and self.remote_supports_attention:
@@ -278,9 +279,8 @@ class PrivateTab(OneToOneTab):
self.text_win.remove_line_separator()
self.text_win.add_line_separator(self._text_buffer)
tab = self.core.get_tab_by_name(safeJID(self.name).bare, MucTab)
- if tab and tab.joined and config.get_by_tabname(
- 'send_chat_states', True, self.general_jid, True) and\
- not self.input.get_text() and self.on:
+ if tab and tab.joined and config.get_by_tabname('send_chat_states',
+ self.general_jid) and not self.input.get_text() and self.on:
self.send_chat_state('inactive')
self.check_scrolled()
@@ -288,9 +288,8 @@ class PrivateTab(OneToOneTab):
self.state = 'current'
curses.curs_set(1)
tab = self.core.get_tab_by_name(safeJID(self.name).bare, MucTab)
- if tab and tab.joined and config.get_by_tabname(
- 'send_chat_states', True, self.general_jid, True) and\
- not self.input.get_text() and self.on:
+ if tab and tab.joined and config.get_by_tabname('send_chat_states',
+ self.general_jid,) and not self.input.get_text() and self.on:
self.send_chat_state('active')
def on_info_win_size_changed(self):
@@ -334,7 +333,8 @@ class PrivateTab(OneToOneTab):
self.check_features()
tab = self.core.get_tab_by_name(safeJID(self.name).bare, MucTab)
color = 3
- if tab and config.get_by_tabname('display_user_color_in_join_part', '', self.general_jid, True):
+ if tab and config.get_by_tabname('display_user_color_in_join_part',
+ self.general_jid):
user = tab.get_user_by_name(nick)
if user:
color = dump_tuple(user.color)