diff --git a/src/roster_window.py b/src/roster_window.py index 080e60cfa..b688569ff 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -23,7 +23,6 @@ import pango import gobject import os import time -import Queue import common.sleepy import tabbed_chat_window @@ -1003,8 +1002,8 @@ class Roster_window: return #We save it in a queue if not self.plugin.queues[account].has_key(jid): - self.plugin.queues[account][jid] = Queue.Queue(50) - self.plugin.queues[account][jid].put((msg, tim, encrypted)) + self.plugin.queues[account][jid] = [] + self.plugin.queues[account][jid].append((msg, tim, encrypted)) self.nb_unread += 1 if (not autopopup or ( not autopopupaway and \ gajim.connections[account].connected > 2)) and not \ diff --git a/src/tabbed_chat_window.py b/src/tabbed_chat_window.py index 243f98f83..510c0c411 100644 --- a/src/tabbed_chat_window.py +++ b/src/tabbed_chat_window.py @@ -324,10 +324,9 @@ class Tabbed_chat_window(chat.Chat): def read_queue(self, jid): """read queue and print messages containted in it""" - q = self.plugin.queues[self.account][jid] + l = self.plugin.queues[self.account][jid] user = self.users[jid] - while not q.empty(): - event = q.get() + for event in l: self.print_conversation(event[0], jid, tim = event[1], encrypted = event[2]) self.plugin.roster.nb_unread -= 1 @@ -390,7 +389,7 @@ class Tabbed_chat_window(chat.Chat): if self.plugin.queues[self.account].has_key(jid): - pos = self.plugin.queues[self.account][jid].qsize() + pos = len(self.plugin.queues[self.account][jid]) else: pos = 0