Skip to content

Commit

Permalink
web: set titles on cw. closes #24
Browse files Browse the repository at this point in the history
  • Loading branch information
borisfaure committed Aug 22, 2010
1 parent a275f0c commit d0cb410
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions amsn2/ui/front_ends/web/chat_window.py
Expand Up @@ -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 """
Expand Down
9 changes: 9 additions & 0 deletions amsn2/ui/front_ends/web/static/js/amsn2.js
Expand Up @@ -356,6 +356,10 @@ function ChatWindow(_uid)
win.setContent(widget.getElement());
widget.setParent(this);
}

this.setTitle = function(title) {
win.setTitle(title);
}
}

function ChatWidget(_uid)
Expand Down Expand Up @@ -481,6 +485,11 @@ function onMessageReceivedChatWidget(uid, msg)
function nudgeChatWidget(uid)
{
chatWidgets[uid].nudge();
}

function setTitleCW(uid, title)
{
chatWindows[uid].setTitle(title);
} // }}}
// main {{{

Expand Down

0 comments on commit d0cb410

Please sign in to comment.