primitivus (chat): added :topic (and :subject and :title aliases) to change subject with a dialog (/!\ urwid SàText need to be updated)

This commit is contained in:
Goffi 2016-07-24 19:00:50 +02:00
commit c0e4960c55

View file

@ -423,9 +423,17 @@ class QuickChat(quick_widgets.QuickWidget):
def setSubject(self, subject):
"""Set title for a group chat"""
self.subject = subject
if self.type != C.CHAT_GROUP:
raise exceptions.InternalError("trying to set subject for a non group chat window")
self.subject = subject
def changeSubject(self, new_subject):
"""Change the subject of the room
This change the subject on the room itself (i.e. via XMPP),
while setSubject change the subject of this widget
"""
self.host.bridge.mucSubject(unicode(self.target), new_subject, self.profile)
def addGamePanel(self, widget):
"""Insert a game panel to this Chat dialog.