Permalink
Browse files

Tiny change to chat_window API

  • Loading branch information...
Boris 'billiob' Faure
Boris 'billiob' Faure committed Jun 29, 2009
1 parent 829320c commit ead8f981aa643710afefda2876a287461e1cbb26
@@ -15,7 +15,7 @@ def addChatWidget(self, chat_widget):
class aMSNChatWidget(object):
""" This interface will present a chat widget of the UI """
- def __init__(self, amsn_conversation, parent):
+ def __init__(self, amsn_conversation, parent, contacts_uid):
""" create the chat widget for the 'parent' window, but don't attach to
it."""
raise NotImplementedError
@@ -29,7 +29,7 @@ class aMSNChatWidgetContainer:
class aMSNChatWidget(etk.VPaned, base.aMSNChatWidget):
- def __init__(self, amsn_conversation, parent):
+ def __init__(self, amsn_conversation, parent, contacts_uid):
self._parent = parent
self._amsn_conversation = amsn_conversation
etk.VPaned.__init__(self)
@@ -55,7 +55,7 @@ def addChatWidget(self, chat_widget):
class aMSNChatWidget(QWidget, base.aMSNChatWidget):
- def __init__(self, amsn_conversation, Parent=None):
+ def __init__(self, amsn_conversation, Parent=None, contacts_uid):
QWidget.__init__(self, Parent)
self._amsn_conversation = amsn_conversation
@@ -54,23 +54,23 @@ def flash(self):
class aMSNChatWidget(object):
""" This interface will present a chat widget of the UI """
- def __init__(self, amsn_conversation, parent):
+ def __init__(self, amsn_conversation, parent, contacts_uid):
""" create the chat widget for the 'parent' window, but don't attach to
it."""
self._main=parent._main
self._uid=md5.new(str(random.random())).hexdigest()
self._main.send("newChatWidget",[self._uid])
self._main.addListener("sendMessage",self.sendMessage)
self._amsn_conversation=amsn_conversation
-
+
def sendMessage(self,smL):
if smL[0]==self._uid:
stmess = StringView()
stmess.appendText(smL[1])
self._amsn_conversation.sendMessage(stmess)
return True
-
-
+
+
def onMessageReceived(self, messageview):
""" Called for incoming and outgoing messages

0 comments on commit ead8f98

Please sign in to comment.