Skip to content

Commit

Permalink
Tiny change to chat_window API
Browse files Browse the repository at this point in the history
  • Loading branch information
Boris 'billiob' Faure committed Jun 29, 2009
1 parent 829320c commit ead8f98
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion amsn2/gui/base/chat_window.py
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion amsn2/gui/front_ends/efl/chat_window.py
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion amsn2/gui/front_ends/qt4/chat_window.py
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions amsn2/gui/front_ends/web/chat_window.py
Expand Up @@ -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
Expand Down

0 comments on commit ead8f98

Please sign in to comment.