コード例 #1
0
ファイル: widgets.py プロジェクト: 0x64746b/alot
 def __init__(self, tag):
     self.tag = tag
     self.translated = config.get('tag-translate', tag, fallback=tag)
     self.txt = urwid.Text(self.translated.encode('utf-8'), wrap='clip')
     normal = config.get_tagattr(tag)
     focus = config.get_tagattr(tag, focus=True)
     urwid.AttrMap.__init__(self, self.txt, normal, focus)
コード例 #2
0
ファイル: widgets.py プロジェクト: jhcepas/alot
    def __init__(self, tag):

        self.tag = tag

        #self.translated = self.translated.encode('utf-8')
        #self.txt = urwid.Text(self.translated, wrap='clip')
        #normal = config.get_tagattr(tag)

        normal = config.get_tagattr(tag)
        focus = config.get_tagattr(tag, focus=True)
        self.translated = config.get('tag-translate', tag, fallback=tag)
        self.txt = urwid.Text(self.translated)#, wrap='space')
        self.focus_palette = normal
        self.unfocus_palette = normal
        urwid.AttrMap.__init__(self, self.txt, self.unfocus_palette, self.focus_palette)
コード例 #3
0
ファイル: widgets.py プロジェクト: lmacken/alot
 def set_unfocussed(self):
     self.set_attr_map({None: config.get_tagattr(self.tag)})
コード例 #4
0
ファイル: widgets.py プロジェクト: lmacken/alot
 def set_focussed(self):
     self.set_attr_map({None: config.get_tagattr(self.tag, focus=True)})