def __init__(self, tag): self.tag = tag representation = settings.get_tagstring_representation(tag) self.hidden = representation['hidden'] self.translated = representation['translated'] self.txt = urwid.Text(self.translated, wrap='clip') self.normal_att = representation['normal'] self.focus_att = representation['focussed'] urwid.AttrMap.__init__(self, self.txt, self.normal_att, self.focus_att)
def __init__(self, tag, fallback_normal=None, fallback_focus=None): self.tag = tag representation = settings.get_tagstring_representation(tag, fallback_normal, fallback_focus) self.translated = representation["translated"] self.hidden = self.translated == "" self.txt = urwid.Text(self.translated, wrap="clip") normal_att = representation["normal"] focus_att = representation["focussed"] self.attmaps = {"normal": normal_att, "focus": focus_att} urwid.AttrMap.__init__(self, self.txt, normal_att, focus_att)