summaryrefslogtreecommitdiff
path: root/src/tabs/basetabs.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/basetabs.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/basetabs.py')
-rw-r--r--src/tabs/basetabs.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/tabs/basetabs.py b/src/tabs/basetabs.py
index c2efc9bc..0fde624c 100644
--- a/src/tabs/basetabs.py
+++ b/src/tabs/basetabs.py
@@ -592,8 +592,8 @@ class ChatTab(Tab):
if not self.is_muc or self.joined:
if state in ('active', 'inactive', 'gone') and self.inactive and not always_send:
return
- 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):
msg = self.core.xmpp.make_message(self.get_dest_jid())
msg['type'] = self.message_type
msg['chat_state'] = state
@@ -607,7 +607,8 @@ class ChatTab(Tab):
on the the current status of the input
"""
name = self.general_jid
- if config.get_by_tabname('send_chat_states', True, name, True) and self.remote_wants_chatstates:
+ if (config.get_by_tabname('send_chat_states', name)
+ and self.remote_wants_chatstates):
needed = 'inactive' if self.inactive else 'active'
self.cancel_paused_delay()
if not empty_after:
@@ -622,7 +623,7 @@ class ChatTab(Tab):
we create a timed event that will put us to paused
in a few seconds
"""
- if not config.get_by_tabname('send_chat_states', True, self.general_jid, True):
+ if not config.get_by_tabname('send_chat_states', self.general_jid):
return
if self.timed_event_paused:
# check the weakref