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:
parent
b148722b4d
commit
c0e4960c55
1 changed files with 30 additions and 1 deletions
|
|
@ -138,6 +138,14 @@ class EditBar(sat_widgets.ModalEdit):
|
|||
# FIXME: Q&D way, need to be more generic
|
||||
if isinstance(widget, quick_chat.QuickChat):
|
||||
widget.setFilter(args)
|
||||
elif command in ('topic', 'suject', 'title'):
|
||||
try:
|
||||
new_title = args[0].strip()
|
||||
except IndexError:
|
||||
new_title = None
|
||||
widget = self.host.selected_widget
|
||||
if isinstance(widget, quick_chat.QuickChat) and widget.type == C.CHAT_GROUP:
|
||||
widget.onSubjectDialog(new_title)
|
||||
else:
|
||||
return
|
||||
self.set_edit_text('')
|
||||
|
|
|
|||
Loading…
Reference in a new issue