Mercurial > libervia-backend
diff frontends/src/primitivus/chat.py @ 812:084b52afdceb
frontends: fixed /me usage + renamed a couple of "type" parameters to type_
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 04 Feb 2014 18:51:16 +0100 |
parents | 1fe00f0c9a91 |
children | f3513c8cc2e6 |
line wrap: on
line diff
--- a/frontends/src/primitivus/chat.py Tue Feb 04 18:32:49 2014 +0100 +++ b/frontends/src/primitivus/chat.py Tue Feb 04 18:51:16 2014 +0100 @@ -76,9 +76,9 @@ class Chat(urwid.WidgetWrap, QuickChat): - def __init__(self, target, host, type='one2one'): + def __init__(self, target, host, type_='one2one'): self.target = target - QuickChat.__init__(self, target, host, type) + QuickChat.__init__(self, target, host, type_) self.content = urwid.SimpleListWalker([]) self.text_list = urwid.ListBox(self.content) self.chat_widget = urwid.Frame(self.text_list) @@ -86,7 +86,7 @@ self.chat_colums = urwid.Columns([('weight', 8, self.chat_widget)]) self.pile = urwid.Pile([self.chat_colums]) urwid.WidgetWrap.__init__(self, self.__getDecoration(self.pile)) - self.setType(type) + self.setType(type_) self.day_change = time.strptime(time.strftime("%a %b %d 00:00:00 %Y")) #struct_time of day changing time self.show_timestamp = True self.show_short_nick = False @@ -139,11 +139,11 @@ menu.addMenu(_("Action"), _("Send file"), self.onSendFileRequest) return menu - def setType(self, type): - QuickChat.setType(self, type) - if type == 'one2one': + def setType(self, type_): + QuickChat.setType(self, type_) + if type_ == 'one2one': self.historyPrint(profile=self.host.profile) - elif type == 'group': + elif type_ == 'group': if len(self.chat_colums.contents) == 1: present_widget = self.__buildPresentList() self.present_panel = sat_widgets.VerticalSeparator(present_widget) @@ -293,7 +293,7 @@ def printInfo(self, msg, type_='normal', timestamp=""): """Print general info @param msg: message to print - @type: one of: + @type_: one of: normal: general info like "toto has joined the room" me: "/me" information like "/me clenches his fist" ==> "toto clenches his fist" """