summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-03-11 01:18:35 +0100
committerFlorent Le Coz <louiz@louiz.org>2011-03-11 01:18:35 +0100
commit8ab4af108217957ae1d17dc8bb0a9a0882142715 (patch)
treebdcbde5e6595d9a204a4db4d87494304134d5d92 /src
parent59969d2f6e697b5e426bd7663c86ec89b4acd596 (diff)
downloadpoezio-8ab4af108217957ae1d17dc8bb0a9a0882142715.tar.gz
poezio-8ab4af108217957ae1d17dc8bb0a9a0882142715.tar.bz2
poezio-8ab4af108217957ae1d17dc8bb0a9a0882142715.tar.xz
poezio-8ab4af108217957ae1d17dc8bb0a9a0882142715.zip
Send chatstate composing if we are starting our message with //
Diffstat (limited to 'src')
-rw-r--r--src/tabs.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tabs.py b/src/tabs.py
index ffafc322..adb4ddae 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -632,9 +632,9 @@ class MucTab(ChatTab):
if key in self.key_func:
self.key_func[key]()
return False
- empty_before = self.input.get_text() == '' or self.input.get_text().startswith('/')
+ empty_before = self.input.get_text() == '' or (self.input.get_text().startswith('/') and not self.input.get_text().startswith('//'))
self.input.do_command(key)
- empty_after = self.input.get_text() == '' or self.input.get_text().startswith('/')
+ empty_after = self.input.get_text() == '' or (self.input.get_text().startswith('/') and not self.input.get_text().startswith('//'))
self.send_composing_chat_state(empty_before, empty_after)
return False
@@ -966,9 +966,9 @@ class PrivateTab(ChatTab):
if key in self.key_func:
self.key_func[key]()
return False
- empty_before = self.input.get_text() == '' or self.input.get_text().startswith('/')
+ empty_before = self.input.get_text() == '' or (self.input.get_text().startswith('/') and not self.input.get_text().startswith('//'))
self.input.do_command(key)
- empty_after = self.input.get_text() == '' or self.input.get_text().startswith('/')
+ empty_after = self.input.get_text() == '' or (self.input.get_text().startswith('/') and not self.input.get_text().startswith('//'))
self.send_composing_chat_state(empty_before, empty_after)
return False
@@ -1390,9 +1390,9 @@ class ConversationTab(ChatTab):
if key in self.key_func:
self.key_func[key]()
return False
- empty_before = self.input.get_text() == '' or self.input.get_text().startswith('/')
+ empty_before = self.input.get_text() == '' or (self.input.get_text().startswith('/') and not self.input.get_text().startswith('//'))
self.input.do_command(key)
- empty_after = self.input.get_text() == '' or self.input.get_text().startswith('/')
+ empty_after = self.input.get_text() == '' or (self.input.get_text().startswith('/') and not self.input.get_text().startswith('//'))
self.send_composing_chat_state(empty_before, empty_after)
return False