def __init__(self, config, board):
"""Initialize the most needed components."""
self.config = config
self.board = board
self.header = None
self.footer = None
# Some sugar.
self.div = ur.Divider()
# Used in list_boards().
self.boards_count = 0
self.loop = Loop(None, self.unhandled)
# Calculate min_width and left/right margins for Padding widgets.
self.width = self.loop.dimensions[0] // 2
self.margin = int((self.loop.dimensions[0] - self.width) * 0.60)
# Flag for checking if board list is currently being displayed.
self.list_visible = False
# This flag needs to be here to fix a bug where Enter doesn't work
# after hitting 'h' twice.
self.help_flag = False
# Another flag, this one is for board list display - it should only
# be printed in the main menu/MOTD screen, nowhere else.
self.motd_flag = False
评论列表
文章目录