Don't rely on magic array indices in AboutView.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
This commit is contained in:
parent
1f2070602d
commit
b61846a3dc
1 changed files with 8 additions and 8 deletions
|
|
@ -336,10 +336,10 @@ class AboutView(StandardView):
|
|||
|
||||
def _render_standard(self, loop):
|
||||
self.loop = loop
|
||||
shortcuts = tuple(map(lambda x: DatabaseData().keys.shortcut(x),
|
||||
["quit", "previous", "sync-database", "add",
|
||||
"search", "next", "next-secondary",
|
||||
"next-tertiary", "menu", "about", "browse"]))
|
||||
key = dict(map(lambda x: (x, DatabaseData().keys.shortcut(x)),
|
||||
["quit", "previous", "sync-database", "add",
|
||||
"search", "next", "next-secondary",
|
||||
"next-tertiary", "menu", "about", "browse"]))
|
||||
try:
|
||||
recver = DatabaseData().database().records()[0].version()
|
||||
except IndexError:
|
||||
|
|
@ -349,13 +349,13 @@ class AboutView(StandardView):
|
|||
msgs = [
|
||||
"newfol " + __version__,
|
||||
_("Keys: %s to quit, %s: previous view, %s: write to disk,") %
|
||||
tuple(shortcuts[0:3]),
|
||||
(key['quit'], key['previous'], key['sync-database']),
|
||||
_("%s: add record, %s: search, %s: next, %s: secondary next,") %
|
||||
tuple(shortcuts[3:7]),
|
||||
(key['add'], key['search'], key['next'], key['next-secondary']),
|
||||
_("%s: tertiary next, %s: menu, %s: this screen,") %
|
||||
tuple(shortcuts[7:10]),
|
||||
(key['next-tertiary'], key['menu'], key['about']),
|
||||
_("%s: browse by table") %
|
||||
tuple(shortcuts[10:]),
|
||||
(key['browse']),
|
||||
"",
|
||||
" ".join([
|
||||
self._display_option("exe_ok",
|
||||
|
|
|
|||
Loading…
Reference in a new issue