diff options
author | mathieui <mathieui@mathieui.net> | 2014-04-30 21:34:09 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2014-04-30 21:34:09 +0200 |
commit | bbdc14aaa5a47e77ad46d1ad7b4465ac065d6677 (patch) | |
tree | 190e961ea1c516ad0127e1c82cddb5fee263e565 /src/tabs/privatetab.py | |
parent | d859ec2ea19654603075b556094c6b59aad8e73a (diff) | |
download | poezio-bbdc14aaa5a47e77ad46d1ad7b4465ac065d6677.tar.gz poezio-bbdc14aaa5a47e77ad46d1ad7b4465ac065d6677.tar.bz2 poezio-bbdc14aaa5a47e77ad46d1ad7b4465ac065d6677.tar.xz poezio-bbdc14aaa5a47e77ad46d1ad7b4465ac065d6677.zip |
Remove Tab.get_name() and use Tab.name instead
(keep a get_name() fallback just in case for now)
Diffstat (limited to 'src/tabs/privatetab.py')
-rw-r--r-- | src/tabs/privatetab.py | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/tabs/privatetab.py b/src/tabs/privatetab.py index a88e9060..b8699bd2 100644 --- a/src/tabs/privatetab.py +++ b/src/tabs/privatetab.py @@ -66,7 +66,7 @@ class PrivateTab(ChatTab): @property def general_jid(self): - return self.get_name() + return self.name @property def nick(self): @@ -84,7 +84,7 @@ class PrivateTab(ChatTab): del PrivateTab.additional_informations[plugin_name] def load_logs(self, log_nb): - logs = logger.get_logs(safeJID(self.get_name()).full.replace('/', '\\'), log_nb) + logs = logger.get_logs(safeJID(self.name).full.replace('/', '\\'), log_nb) def log_message(self, txt, nickname, time=None, typ=1): """ @@ -121,7 +121,7 @@ class PrivateTab(ChatTab): def command_say(self, line, attention=False, correct=False): if not self.on: return - msg = self.core.xmpp.make_message(self.get_name()) + msg = self.core.xmpp.make_message(self.name) msg['type'] = 'chat' msg['body'] = line # trigger the event BEFORE looking for colors. @@ -137,7 +137,7 @@ class PrivateTab(ChatTab): 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.get_name()): + if config.get_by_tabname('group_corrections', True, 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) @@ -181,13 +181,13 @@ class PrivateTab(ChatTab): if message is not '': self.command_say(message, attention=True) else: - msg = self.core.xmpp.make_message(self.get_name()) + msg = self.core.xmpp.make_message(self.name) msg['type'] = 'chat' msg['attention'] = True msg.send() def check_attention(self): - self.core.xmpp.plugin['xep_0030'].get_info(jid=self.get_name(), block=False, timeout=5, callback=self.on_attention_checked) + self.core.xmpp.plugin['xep_0030'].get_info(jid=self.name, block=False, timeout=5, callback=self.on_attention_checked) def on_attention_checked(self, iq): if 'urn:xmpp:attention:0' in iq['disco_info'].get_features(): @@ -274,9 +274,6 @@ class PrivateTab(ChatTab): self.info_header.refresh(self.name, self.text_win, self.chatstate, PrivateTab.additional_informations) self.input.refresh() - def get_name(self): - return self.name - def get_nick(self): return safeJID(self.name).resource @@ -376,6 +373,6 @@ class PrivateTab(ChatTab): self.add_message(txt=reason, typ=2) def matching_names(self): - return [(3, safeJID(self.get_name()).resource), (4, self.get_name())] + return [(3, safeJID(self.name).resource), (4, self.name)] |