Work around binding =
This commit is contained in:
parent
fd9f801cab
commit
195c7d6ef7
1
TODO
1
TODO
@ -1,7 +1,6 @@
|
||||
Before 0.1
|
||||
==========
|
||||
|
||||
- Don't use configaparser for keys because we can't use = (to bind zoom)
|
||||
- Check FIXMEs
|
||||
- Manpage
|
||||
- Website
|
||||
|
@ -187,6 +187,8 @@ class ConfigManager(QObject):
|
||||
for c in self.KEY_ESCAPE:
|
||||
if optname.startswith(c):
|
||||
optname = optname.replace(c, self.ESCAPE_CHAR + c, 1)
|
||||
# configparser can't handle = in keys :(
|
||||
optname = optname.replace('=', '<eq>')
|
||||
keyval = '{} = {}'.format(optname, value)
|
||||
lines.append(keyval)
|
||||
return lines
|
||||
@ -203,6 +205,8 @@ class ConfigManager(QObject):
|
||||
for k, v in cp[sectname].items():
|
||||
if k.startswith(self.ESCAPE_CHAR):
|
||||
k = k[1:]
|
||||
# configparser can't handle = in keys :(
|
||||
k = k.replace('<eq>', '=')
|
||||
try:
|
||||
self.set('conf', sectname, k, v)
|
||||
except ValidationError as e:
|
||||
|
@ -59,6 +59,7 @@ FIRST_COMMENT = r"""
|
||||
# You will need to escape the following values:
|
||||
# - # at the start of the line (at the first position of the key) (\#)
|
||||
# - $ in a value ($$)
|
||||
# - = in a value as <eq>
|
||||
"""
|
||||
|
||||
|
||||
@ -595,7 +596,7 @@ DATA = OrderedDict([
|
||||
('sk', 'set keybind'),
|
||||
('-', 'zoomout'),
|
||||
('+', 'zoomin'),
|
||||
#('=', 'zoom'),
|
||||
('=', 'zoom'),
|
||||
('[[', 'prevpage'),
|
||||
(']]', 'nextpage'),
|
||||
('{{', 'tabprevpage'),
|
||||
|
Loading…
Reference in New Issue
Block a user