summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2011-11-13 14:31:11 +0100
committermathieui <mathieui@mathieui.net>2011-11-13 14:31:11 +0100
commit30b9827a2766725f146a04bf00735748cde91fec (patch)
tree04b348f97b1c866882d44ae43bb9bb67a5e71158 /src
parent6dfc2ef9b5bb05cce00964ca7bace635e47f38be (diff)
downloadpoezio-30b9827a2766725f146a04bf00735748cde91fec.tar.gz
poezio-30b9827a2766725f146a04bf00735748cde91fec.tar.bz2
poezio-30b9827a2766725f146a04bf00735748cde91fec.tar.xz
poezio-30b9827a2766725f146a04bf00735748cde91fec.zip
Move /clear to the chattab instead of the muctab
Diffstat (limited to 'src')
-rw-r--r--src/tabs.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/tabs.py b/src/tabs.py
index 28bb90d2..5987007b 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -303,6 +303,8 @@ class ChatTab(Tab):
_("""Usage: /say <message>\nSay: Just send the message.
Useful if you want your message to begin with a '/'."""), None)
self.commands['xhtml'] = (self.command_xhtml, _("Usage: /xhtml <custom xhtml>\nXHTML: Send custom XHTML."), None)
+ self.commands['clear'] = (self.command_clear,
+ _('Usage: /clear\nClear: Clear the current buffer.'), None)
self.chat_state = None
self.update_commands()
@@ -357,6 +359,15 @@ class ChatTab(Tab):
self.refresh()
msg.send()
+ def command_clear(self, args):
+ """
+ /clear
+ """
+ self._text_buffer.messages = []
+ self.text_win.rebuild_everything(self._text_buffer)
+ self.refresh()
+ self.core.doupdate()
+
def send_chat_state(self, state, always_send=False):
"""
Send an empty chatstate message
@@ -476,8 +487,6 @@ class MucTab(ChatTab):
self.commands['configure'] = (self.command_configure, _('Usage: /configure\nConfigure: Configure the current room, through a form.'), None)
self.commands['version'] = (self.command_version, _('Usage: /version <jid or nick>\nVersion: Get the software version of the given JID or nick in room (usually its XMPP client and Operating System).'), None)
self.commands['names'] = (self.command_names, _('Usage: /names\nNames: Get the list of the users in the room, and the list of the people assuming the different roles.'), None)
- self.commands['clear'] = (self.command_clear,
- _('Usage: /clear\nClear: Clear the current buffer.'), None)
self.resize()
self.update_commands()
@@ -526,15 +535,6 @@ class MucTab(ChatTab):
self.core.xmpp.plugin['xep_0045'].configureRoom(self.get_name(), form)
self.core.close_tab()
- def command_clear(self, args):
- """
- /clear
- """
- self._text_buffer.messages = []
- self.text_win.rebuild_everything(self._text_buffer)
- self.refresh()
- self.core.doupdate()
-
def command_cycle(self, arg):
if self.joined:
muc.leave_groupchat(self.core.xmpp, self.get_name(), self.own_nick, arg)