summaryrefslogtreecommitdiff
path: root/src/tabs/privatetab.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2014-10-20 20:03:16 +0200
committermathieui <mathieui@mathieui.net>2014-10-20 21:20:43 +0200
commit7b01c62e07612a123f3ffe94583f51099e470c3b (patch)
tree3f0e5976fdaa5e9da2ad057c6dfa4051b823b060 /src/tabs/privatetab.py
parentece9b2082b9d092541d867211924bc2802f878ad (diff)
downloadpoezio-7b01c62e07612a123f3ffe94583f51099e470c3b.tar.gz
poezio-7b01c62e07612a123f3ffe94583f51099e470c3b.tar.bz2
poezio-7b01c62e07612a123f3ffe94583f51099e470c3b.tar.xz
poezio-7b01c62e07612a123f3ffe94583f51099e470c3b.zip
Change the API of Config.get_by_tabname
Make the "default" parameter optional and thus move it to the end of the command with the other optional parameters. And change all the calls.
Diffstat (limited to 'src/tabs/privatetab.py')
-rw-r--r--src/tabs/privatetab.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/tabs/privatetab.py b/src/tabs/privatetab.py
index c1e8c8e5..f4fa10cf 100644
--- a/src/tabs/privatetab.py
+++ b/src/tabs/privatetab.py
@@ -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)