Allow longer names for schema fields.
The current names are hard to remember. Allow using longer names for most fields. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
This commit is contained in:
parent
ee1a228919
commit
476863a44b
1 changed files with 9 additions and 9 deletions
|
|
@ -354,31 +354,31 @@ class Schema:
|
|||
sch._nfields = nfields = int(i.fields[1])
|
||||
if not len(sch._layout):
|
||||
sch._layout = list(range(nfields))
|
||||
elif rectype == "exe":
|
||||
elif rectype in ['exe', 'execute']:
|
||||
if exe_seen:
|
||||
exe_ok = False
|
||||
continue
|
||||
exe_seen = True
|
||||
if i.fields[1].lower() in ("yes", "oui", "sí"):
|
||||
exe_ok = True
|
||||
elif rectype == "imp":
|
||||
elif rectype in ['imp', 'import']:
|
||||
sch._imports = filter(lambda x: x, i.fields[1:])
|
||||
elif rectype == "pvu":
|
||||
elif rectype in ['pvu', 'preview']:
|
||||
pass
|
||||
elif rectype == "col":
|
||||
elif rectype in ['col', 'column']:
|
||||
sch._columns = int(i.fields[1])
|
||||
elif rectype == "txn":
|
||||
elif rectype in ['txn', 'transaction']:
|
||||
sch._txntype = i.fields[1:]
|
||||
elif rectype == "dpy":
|
||||
elif rectype in ['dpy', 'display']:
|
||||
sch._layout = list(map(fix_up_layout, i.fields[1:]))
|
||||
elif rectype == "edo":
|
||||
elif rectype in ['edo', 'editor', 'editor-option']:
|
||||
sch._options["editor"][i.fields[1]] = i.fields[2]
|
||||
elif rectype == "clr":
|
||||
elif rectype in ['clr', 'color']:
|
||||
if len(i.fields) == 3:
|
||||
sch._palette[i.fields[1]] = i.fields[2]
|
||||
elif len(i.fields) == 4:
|
||||
sch._palette[i.fields[1]] = i.fields[2:]
|
||||
elif rectype == "ksh":
|
||||
elif rectype in ['ksh', 'keymap', 'shortcut']:
|
||||
sch._keys[i.fields[1]] = i.fields[2]
|
||||
sch._mapping = mapping
|
||||
sch._keyfields = keyfields
|
||||
|
|
|
|||
Loading…
Reference in a new issue