diff options
author | Sebastian Jeltsch <sjeltsch@kip.uni-heidelberg.de> | 2013-04-26 00:52:51 +0200 |
---|---|---|
committer | Sebastian Jeltsch <sjeltsch@kip.uni-heidelberg.de> | 2013-04-26 00:52:51 +0200 |
commit | fab952e198475bef53b9f5addf363f366bd1ecba (patch) | |
tree | d71a2bb477aad6f7cae4041ca4574872014b5210 /alot | |
parent | f3a00463291630cbac317eb03fded3f436506275 (diff) |
change static members of UI class to members
Diffstat (limited to 'alot')
-rw-r--r-- | alot/ui.py | 32 |
1 files changed, 15 insertions, 17 deletions
@@ -23,22 +23,6 @@ class UI(object): It handles the urwid widget tree and mainloop (we use twisted) and is responsible for opening, closing and focussing buffers. """ - buffers = [] - """list of active buffers""" - current_buffer = None - """points to currently active :class:`~alot.buffers.Buffer`""" - dbman = None - """Database Manager (:class:`~alot.db.manager.DBManager`)""" - db_was_locked = False - """flag used to prevent multiple 'index locked' notifications""" - mode = 'global' - """interface mode identifier - type of current buffer""" - commandprompthistory = [] - """history of the command line prompt""" - input_queue = [] - """stores partial keyboard input""" - last_commandline = None - """saves the last executed commandline""" def __init__(self, dbman, initialcmd): """ @@ -48,8 +32,22 @@ class UI(object): :param colourmode: determines which theme to chose :type colourmode: int in [1,16,256] """ - # store database manager + # Database Manager (:class:`~alot.db.manager.DBManager`) self.dbman = dbman + # list of active buffers + self.buffers = [] + # points to currently active :class:`~alot.buffers.Buffer` + self.current_buffer = None + # flag used to prevent multiple 'index locked' notifications + self.db_was_locked = False + # interface mode identifier - type of current buffer + self.mode = 'global' + # history of the command line prompt + self.commandprompthistory = [] + # stores partial keyboard input + self.input_queue = [] + # saves the last executed commandline""" + self.last_commandline = None # define empty notification pile self._notificationbar = None # should we show a status bar? |