summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-11-15 13:16:30 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-11-15 13:16:30 +0000
commit0216ac29dbcf49865e145db42d9fbcfcd2bebd19 (patch)
tree93057b75c33fe756a88b4543c345aab8e841916b /src
parentf4d4a205f136c6373c415657dd35b4f078f25c69 (diff)
downloadpoezio-0216ac29dbcf49865e145db42d9fbcfcd2bebd19.tar.gz
poezio-0216ac29dbcf49865e145db42d9fbcfcd2bebd19.tar.bz2
poezio-0216ac29dbcf49865e145db42d9fbcfcd2bebd19.tar.xz
poezio-0216ac29dbcf49865e145db42d9fbcfcd2bebd19.zip
Do not refresh the screen on each input
Diffstat (limited to 'src')
-rw-r--r--src/buffers.py1
-rw-r--r--src/connection.py1
-rw-r--r--src/core.py8
-rw-r--r--src/room.py2
-rw-r--r--src/tab.py14
5 files changed, 16 insertions, 10 deletions
diff --git a/src/buffers.py b/src/buffers.py
index d4af680d..31e227dc 100644
--- a/src/buffers.py
+++ b/src/buffers.py
@@ -491,6 +491,7 @@ class TextWin(Win):
if txt.startswith('\n'):
txt = txt[1:]
first = False
+ log.debug('%s built\n' % len(lines))
return lines
return lines[-len(messages):] # return only the needed number of lines
diff --git a/src/connection.py b/src/connection.py
index 2f016901..e313af37 100644
--- a/src/connection.py
+++ b/src/connection.py
@@ -26,7 +26,6 @@ import sleekxmpp
from config import config
from logger import logger
-from handler import Handler
class Connection(sleekxmpp.ClientXMPP):
"""
diff --git a/src/core.py b/src/core.py
index ce271613..2d595cb3 100644
--- a/src/core.py
+++ b/src/core.py
@@ -822,8 +822,8 @@ class Core(object):
body = message['body']
if body:
date = date if delayed == True else None
- if not delayed:
- logger.groupchat(room_from, nick_from, body)
+ # if not delayed:
+ # logger.groupchat(room_from, nick_from, body)
self.add_message_to_text_buffer(room, body, date, nick_from)
self.refresh_window()
self.doupdate()
@@ -1344,7 +1344,9 @@ class Core(object):
if not key:
return
res = self.current_tab().on_input(key)
- self.refresh_window()
+ if res:
+ log.debug('RES is true')
+ self.refresh_window()
def on_roster_enter_key(self, roster_row):
"""
diff --git a/src/room.py b/src/room.py
index 8a755e18..5325373a 100644
--- a/src/room.py
+++ b/src/room.py
@@ -96,7 +96,7 @@ class Room(TextBuffer):
when we receive an history message said by someone who is not
in the room anymore
"""
- self.log_message(txt, time, nickname)
+ # self.log_message(txt, time, nickname)
if txt.startswith('/me '):
txt = "* " + nickname + ' ' + txt[4:]
nickname = None
diff --git a/src/tab.py b/src/tab.py
index bef42be8..17e51476 100644
--- a/src/tab.py
+++ b/src/tab.py
@@ -254,8 +254,10 @@ class MucTab(Tab):
"\n": self.on_enter
}
if key in key_func:
- return key_func[key]()
- return self.input.do_command(key)
+ key_func[key]()
+ return False
+ self.input.do_command(key)
+ return False
def completion(self):
"""
@@ -373,7 +375,8 @@ class PrivateTab(Tab):
"\n": self.on_enter
}
if key in key_func:
- return key_func[key]()
+ key_func[key]()
+ return False
return self.input.do_command(key)
def on_enter(self):
@@ -471,7 +474,7 @@ class RosterInfoTab(Tab):
}
res = self.input.do_command(key)
if res:
- return res
+ return False
if key in key_commands:
return key_commands[key]()
@@ -621,7 +624,8 @@ class ConversationTab(Tab):
"\n": self.on_enter
}
if key in key_func:
- return key_func[key]()
+ key_func[key]()
+ return False
return self.input.do_command(key)