Teach the profile editor about undefined keys.
This commit is contained in:
parent
bc24c98164
commit
a72010a82e
@ -324,7 +324,11 @@ class ProfileEditor:
|
||||
value = self.term.conf.keybindings[row[0]]
|
||||
if isinstance (value, tuple):
|
||||
value = value[0]
|
||||
if (row[2], row[3]) != self.tkbobj._parsebinding(value):
|
||||
keyval = 0
|
||||
mask = 0
|
||||
if value is not None:
|
||||
(keyval, mask) = self.tkbobj._parsebinding(value)
|
||||
if (row[2], row[3]) != (keyval, mask):
|
||||
changed_keybindings.append ((row[0], accel))
|
||||
dbg("%s changed from %s to %s" % (row[0], self.term.conf.keybindings[row[0]], accel))
|
||||
|
||||
@ -350,12 +354,12 @@ class ProfileEditor:
|
||||
|
||||
for binding in Defaults['keybindings']:
|
||||
value = self.term.conf.keybindings[binding]
|
||||
if (value.__class__.__name__ != 'str'):
|
||||
if isinstance (value, tuple):
|
||||
value = value[0]
|
||||
else:
|
||||
continue
|
||||
(keyval, mask) = self.tkbobj._parsebinding (value)
|
||||
keyval = 0
|
||||
mask = 0
|
||||
if isinstance (value, tuple):
|
||||
value = value[0]
|
||||
if value is not None:
|
||||
(keyval, mask) = self.tkbobj._parsebinding (value)
|
||||
self.liststore.append ([binding, self.source_get_keyname (binding), keyval, mask, True])
|
||||
dbg("Appended row: %s, %s, %s" % (binding, keyval, mask))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user