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]]
|
value = self.term.conf.keybindings[row[0]]
|
||||||
if isinstance (value, tuple):
|
if isinstance (value, tuple):
|
||||||
value = value[0]
|
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))
|
changed_keybindings.append ((row[0], accel))
|
||||||
dbg("%s changed from %s to %s" % (row[0], self.term.conf.keybindings[row[0]], accel))
|
dbg("%s changed from %s to %s" % (row[0], self.term.conf.keybindings[row[0]], accel))
|
||||||
|
|
||||||
|
@ -350,11 +354,11 @@ class ProfileEditor:
|
||||||
|
|
||||||
for binding in Defaults['keybindings']:
|
for binding in Defaults['keybindings']:
|
||||||
value = self.term.conf.keybindings[binding]
|
value = self.term.conf.keybindings[binding]
|
||||||
if (value.__class__.__name__ != 'str'):
|
keyval = 0
|
||||||
|
mask = 0
|
||||||
if isinstance (value, tuple):
|
if isinstance (value, tuple):
|
||||||
value = value[0]
|
value = value[0]
|
||||||
else:
|
if value is not None:
|
||||||
continue
|
|
||||||
(keyval, mask) = self.tkbobj._parsebinding (value)
|
(keyval, mask) = self.tkbobj._parsebinding (value)
|
||||||
self.liststore.append ([binding, self.source_get_keyname (binding), keyval, mask, True])
|
self.liststore.append ([binding, self.source_get_keyname (binding), keyval, mask, True])
|
||||||
dbg("Appended row: %s, %s, %s" % (binding, keyval, mask))
|
dbg("Appended row: %s, %s, %s" % (binding, keyval, mask))
|
||||||
|
|
Loading…
Reference in New Issue