diff options
author | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-12-15 22:13:38 +0000 |
---|---|---|
committer | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-12-15 22:13:38 +0000 |
commit | 56dee2c7eea20942f7df41298b658338616272ad (patch) | |
tree | 9b7e55e39f7fad14a7a3c5854f9ad5590239ad53 | |
parent | 23aa5542b2189ec2ced42aef8e60762eaa27047e (diff) | |
download | poezio-56dee2c7eea20942f7df41298b658338616272ad.tar.gz poezio-56dee2c7eea20942f7df41298b658338616272ad.tar.bz2 poezio-56dee2c7eea20942f7df41298b658338616272ad.tar.xz poezio-56dee2c7eea20942f7df41298b658338616272ad.zip |
fix the issue of first private message received
-rw-r--r-- | src/core.py | 9 | ||||
-rw-r--r-- | src/windows.py | 4 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/core.py b/src/core.py index 199bf237..ac456704 100644 --- a/src/core.py +++ b/src/core.py @@ -429,7 +429,7 @@ class Core(object): # Differentiate both type of messages, and call the appropriate handler. jid_from = message['from'] for tab in self.tabs: - if tab.get_name() == jid_from.full: + if tab.get_name() == jid_from.bare: if message['type'] == 'error': return self.room_error(message, tab.get_room().name) else: @@ -599,7 +599,8 @@ class Core(object): """ for tab in self.tabs: if (isinstance(tab, tabs.MucTab) or - isinstance(tab, tabs.PrivateTab)) and tab.get_name() == name: + isinstance(tab, tabs.PrivateTab) or + isinstance(tab, tabs.ConversationTab)) and tab.get_name() == name: return tab.get_room() return None @@ -757,7 +758,7 @@ class Core(object): if isinstance(tab, tabs.PrivateTab): if tab.get_name() == complete_jid: self.command_win('%s' % tab.nb) - return + return tag.get_room() # create the new tab room = self.get_room_by_name(room_name) if not room: @@ -950,7 +951,6 @@ class Core(object): # we are writing the resource: complete the node if not the_input.last_completion: response = self.xmpp.plugin['xep_0030'].getItems(jid.server) - log.debug('HEY: %s\n' % response) if response: items = response['disco_items'].getItems() else: @@ -960,7 +960,6 @@ class Core(object): the_input.key_backspace() else: items = [] - log.debug('%s\n' % items) the_input.auto_completion(items, '') else: # we are writing the server: complete the server diff --git a/src/windows.py b/src/windows.py index b137406d..f4524ff1 100644 --- a/src/windows.py +++ b/src/windows.py @@ -936,8 +936,8 @@ class Input(Win): def do_command(self, key, reset=True): if key in self.key_func: return self.key_func[key]() - # if not key or len(key) > 1: - # return False # ignore non-handled keyboard shortcuts + if not key or len(key) > 1: + return False # ignore non-handled keyboard shortcuts self.reset_completion() self.text = self.text[:self.pos+self.line_pos]+key+self.text[self.pos+self.line_pos:] (y, x) = self._win.getyx() |