summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-01-12 17:19:14 +0100
committerFlorent Le Coz <louiz@louiz.org>2011-01-12 17:19:14 +0100
commit22ad96e7aa06e03d380f35d66212cea713dff0f2 (patch)
tree543ccd14f1dd77478cf903471cea538149261331 /src
parent2aa799fc26bf7e573553b367b37b985ad4a91ccb (diff)
downloadpoezio-22ad96e7aa06e03d380f35d66212cea713dff0f2.tar.gz
poezio-22ad96e7aa06e03d380f35d66212cea713dff0f2.tar.bz2
poezio-22ad96e7aa06e03d380f35d66212cea713dff0f2.tar.xz
poezio-22ad96e7aa06e03d380f35d66212cea713dff0f2.zip
Clean up the on_enter methods. fixed #2101
Diffstat (limited to 'src')
-rw-r--r--src/tabs.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/tabs.py b/src/tabs.py
index 845b50a8..92b6f9c5 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -95,7 +95,7 @@ class Tab(object):
return True
return False
- def on_enter(self, provided_text=None):
+ def execute_command(self, provided_text):
"""
Execute the command in the input and return False if
the input didn't contain a command
@@ -246,7 +246,7 @@ class ChatTab(Tab):
def on_enter(self):
txt = self.input.key_enter()
- if not Tab.on_enter(self, txt):
+ if not self.execute_command(txt):
self.command_say(txt)
def command_say(self, line):
@@ -306,6 +306,9 @@ class InfoTab(ChatTab):
self.input.do_command(key)
return False
+ def on_enter(self):
+ self.execute_command(self.input_enter_key())
+
def on_lose_focus(self):
self.color_state = theme.COLOR_TAB_NORMAL
@@ -915,7 +918,7 @@ class RosterInfoTab(Tab):
def execute_slash_command(self, txt):
if txt.startswith('/'):
- Tab.on_enter(self, txt)
+ self.execute_command(txt)
return self.reset_help_message()
def on_lose_focus(self):