Skip to content
Browse files

web: set titles on cw. closes #24

  • Loading branch information...
1 parent a275f0c commit d0cb41003665c2f6ad27604974fb64ce427449bf @billiob billiob committed
Showing with 12 additions and 0 deletions.
  1. +3 −0 amsn2/ui/front_ends/web/chat_window.py
  2. +9 −0 amsn2/ui/front_ends/web/static/js/amsn2.js
View
3 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 """
View
9 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 {{{

0 comments on commit d0cb410

Please sign in to comment.
Something went wrong with that request. Please try again.