diff --git a/amsn2/ui/front_ends/web/chat_window.py b/amsn2/ui/front_ends/web/chat_window.py index c04fb520..3ce19c84 100644 --- a/amsn2/ui/front_ends/web/chat_window.py +++ b/amsn2/ui/front_ends/web/chat_window.py @@ -58,6 +58,9 @@ def flash(self): """TODO: move, remove, detach, attach (shouldn't we use add ?), close, flash...""" + def set_title(self, title): + self._main.send("setTitleCW", self._uid, title); + class aMSNChatWidget(base.aMSNChatWidget): """ This interface will present a chat widget of the UI """ diff --git a/amsn2/ui/front_ends/web/static/js/amsn2.js b/amsn2/ui/front_ends/web/static/js/amsn2.js index b0dbb86b..79421d9e 100644 --- a/amsn2/ui/front_ends/web/static/js/amsn2.js +++ b/amsn2/ui/front_ends/web/static/js/amsn2.js @@ -356,6 +356,10 @@ function ChatWindow(_uid) win.setContent(widget.getElement()); widget.setParent(this); } + + this.setTitle = function(title) { + win.setTitle(title); + } } function ChatWidget(_uid) @@ -481,6 +485,11 @@ function onMessageReceivedChatWidget(uid, msg) function nudgeChatWidget(uid) { chatWidgets[uid].nudge(); +} + +function setTitleCW(uid, title) +{ + chatWindows[uid].setTitle(title); } // }}} // main {{{