Fix some backslash-quotes
This commit is contained in:
parent
8ff4b6dd99
commit
7b2961f23e
@ -467,7 +467,7 @@ class CurCommandDispatcher(QObject):
|
|||||||
editor = config.get('general', 'editor')
|
editor = config.get('general', 'editor')
|
||||||
executable = editor[0]
|
executable = editor[0]
|
||||||
args = [arg.replace('{}', filename) for arg in editor[1:]]
|
args = [arg.replace('{}', filename) for arg in editor[1:]]
|
||||||
logging.debug("Calling \"{}\" with args {}".format(executable, args))
|
logging.debug("Calling '{}' with args {}".format(executable, args))
|
||||||
proc.start(executable, args)
|
proc.start(executable, args)
|
||||||
|
|
||||||
def _editor_cleanup(self, oshandle, filename):
|
def _editor_cleanup(self, oshandle, filename):
|
||||||
|
@ -248,8 +248,8 @@ class HintManager(QObject):
|
|||||||
# e.g. parse (-webkit-)border-radius correctly and click text fields at
|
# e.g. parse (-webkit-)border-radius correctly and click text fields at
|
||||||
# the bottom right, and everything else on the top left or so.
|
# the bottom right, and everything else on the top left or so.
|
||||||
pos = webelem.rect_on_view(elem).center()
|
pos = webelem.rect_on_view(elem).center()
|
||||||
logging.debug("Clicking on \"{}\" at {}/{}".format(
|
logging.debug("Clicking on '{}' at {}/{}".format(elem.toPlainText(),
|
||||||
elem.toPlainText(), pos.x(), pos.y()))
|
pos.x(), pos.y()))
|
||||||
events = [
|
events = [
|
||||||
QMouseEvent(QEvent.MouseMove, pos, Qt.NoButton, Qt.NoButton,
|
QMouseEvent(QEvent.MouseMove, pos, Qt.NoButton, Qt.NoButton,
|
||||||
Qt.NoModifier),
|
Qt.NoModifier),
|
||||||
|
@ -176,7 +176,7 @@ class String(BaseType):
|
|||||||
if self.forbidden is not None and any(c in value
|
if self.forbidden is not None and any(c in value
|
||||||
for c in self.forbidden):
|
for c in self.forbidden):
|
||||||
raise ValidationError(value, "may not contain the chars "
|
raise ValidationError(value, "may not contain the chars "
|
||||||
"\"{}\"".format(self.forbidden))
|
"'{}'".format(self.forbidden))
|
||||||
if self.minlen is not None and len(value) < self.minlen:
|
if self.minlen is not None and len(value) < self.minlen:
|
||||||
raise ValidationError(value, "must be at least {} chars "
|
raise ValidationError(value, "must be at least {} chars "
|
||||||
"long!".format(self.minlen))
|
"long!".format(self.minlen))
|
||||||
|
@ -77,8 +77,8 @@ SECTION_DESC = {
|
|||||||
"The searchengine named DEFAULT is used when general.auto-search "
|
"The searchengine named DEFAULT is used when general.auto-search "
|
||||||
"is true and something else than an URL was entered to be opened. "
|
"is true and something else than an URL was entered to be opened. "
|
||||||
"Other search engines can be used via the bang-syntax, e.g. "
|
"Other search engines can be used via the bang-syntax, e.g. "
|
||||||
"\"qutebrowser !google\". The string \"{}\" will be replaced by the "
|
'"qutebrowser !google". The string "{}" will be replaced by the '
|
||||||
"search term, use \"{{\" and \"}}\" for literal {/} signs."),
|
'search term, use "{{" and "}}" for literal {/} signs.'),
|
||||||
'keybind': (
|
'keybind': (
|
||||||
"Bindings from a key(chain) to a command.\n"
|
"Bindings from a key(chain) to a command.\n"
|
||||||
"For special keys (can't be part of a keychain), enclose them in "
|
"For special keys (can't be part of a keychain), enclose them in "
|
||||||
@ -90,8 +90,8 @@ SECTION_DESC = {
|
|||||||
" Shift: Shift\n"
|
" Shift: Shift\n"
|
||||||
"For simple keys (no <>-signs), a capital letter means the key is "
|
"For simple keys (no <>-signs), a capital letter means the key is "
|
||||||
"pressed with Shift. For special keys (with <>-signs), you need "
|
"pressed with Shift. For special keys (with <>-signs), you need "
|
||||||
"to explicitely add \"Shift-\" to match a key pressed with shift. "
|
'to explicitely add "Shift-" to match a key pressed with shift. '
|
||||||
"You can bind multiple commands by separating them with \";;\"."),
|
'You can bind multiple commands by separating them with ";;".'),
|
||||||
'keybind.insert': (
|
'keybind.insert': (
|
||||||
"Keybindings for insert mode.\n"
|
"Keybindings for insert mode.\n"
|
||||||
"Since normal keypresses are passed through, only special keys are "
|
"Since normal keypresses are passed through, only special keys are "
|
||||||
@ -136,11 +136,11 @@ SECTION_DESC = {
|
|||||||
" - rgb(r, g, b) / rgba(r, g, b, a) (values 0-255 or "
|
" - rgb(r, g, b) / rgba(r, g, b, a) (values 0-255 or "
|
||||||
"percentages)\n"
|
"percentages)\n"
|
||||||
" - hsv(h, s, v) / hsva(h, s, v, a) (values 0-255, hue 0-359)\n"
|
" - hsv(h, s, v) / hsva(h, s, v, a) (values 0-255, hue 0-359)\n"
|
||||||
" - A gradient as explained at [2] under \"Gradient\"\n"
|
' - A gradient as explained at [2] under "Gradient"\n'
|
||||||
" [1] http://www.w3.org/TR/SVG/types.html#ColorKeywords\n"
|
" [1] http://www.w3.org/TR/SVG/types.html#ColorKeywords\n"
|
||||||
" [2] http://qt-project.org/doc/qt-4.8/stylesheet-reference.html"
|
" [2] http://qt-project.org/doc/qt-4.8/stylesheet-reference.html"
|
||||||
"#list-of-property-types\n"
|
"#list-of-property-types\n"
|
||||||
"The \"hints.*\" values are a special case as they're real CSS "
|
'The "hints.*" values are a special case as they\'re real CSS '
|
||||||
"colors, not Qt-CSS colors. There, for a gradient, you need to use "
|
"colors, not Qt-CSS colors. There, for a gradient, you need to use "
|
||||||
"-webkit-gradient, see [3].\n"
|
"-webkit-gradient, see [3].\n"
|
||||||
" [3] https://www.webkit.org/blog/175/introducing-css-gradients/"),
|
" [3] https://www.webkit.org/blog/175/introducing-css-gradients/"),
|
||||||
@ -150,8 +150,8 @@ SECTION_DESC = {
|
|||||||
" Weight: normal, bold, 100..900\n"
|
" Weight: normal, bold, 100..900\n"
|
||||||
" Size: Number + px/pt\n"
|
" Size: Number + px/pt\n"
|
||||||
"Note: The font for hints is a true CSS font, not a Qt-CSS one, "
|
"Note: The font for hints is a true CSS font, not a Qt-CSS one, "
|
||||||
"because of that, a general \"Monospace\" family is enough and we "
|
'because of that, a general "Monospace" family is enough and we '
|
||||||
"don't use \"${_monospace}\" there."),
|
'don\'t use "${_monospace}" there.'),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -191,19 +191,17 @@ class BaseKeyParser(QObject):
|
|||||||
match, binding = self._match_key(cmd_input)
|
match, binding = self._match_key(cmd_input)
|
||||||
|
|
||||||
if match == self.Match.definitive:
|
if match == self.Match.definitive:
|
||||||
logging.debug("Definitive match for "
|
logging.debug("Definitive match for '{}'.".format(self._keystring))
|
||||||
"\"{}\".".format(self._keystring))
|
|
||||||
self._keystring = ''
|
self._keystring = ''
|
||||||
self.execute(binding, self.Type.chain, count)
|
self.execute(binding, self.Type.chain, count)
|
||||||
elif match == self.Match.ambiguous:
|
elif match == self.Match.ambiguous:
|
||||||
logging.debug("Ambigious match for "
|
logging.debug("Ambigious match for '{}'.".format(self._keystring))
|
||||||
"\"{}\".".format(self._keystring))
|
|
||||||
self._handle_ambiguous_match(binding, count)
|
self._handle_ambiguous_match(binding, count)
|
||||||
elif match == self.Match.partial:
|
elif match == self.Match.partial:
|
||||||
logging.debug("No match for \"{}\" (added {})".format(
|
logging.debug("No match for '{}' (added {})".format(
|
||||||
self._keystring, txt))
|
self._keystring, txt))
|
||||||
elif match == self.Match.none:
|
elif match == self.Match.none:
|
||||||
logging.debug("Giving up with \"{}\", no matches".format(
|
logging.debug("Giving up with '{}', no matches".format(
|
||||||
self._keystring))
|
self._keystring))
|
||||||
self._keystring = ''
|
self._keystring = ''
|
||||||
return False
|
return False
|
||||||
@ -262,7 +260,7 @@ class BaseKeyParser(QObject):
|
|||||||
binding: The command-string to execute.
|
binding: The command-string to execute.
|
||||||
count: The count to pass.
|
count: The count to pass.
|
||||||
"""
|
"""
|
||||||
logging.debug("Ambiguous match for \"{}\"".format(self._keystring))
|
logging.debug("Ambiguous match for '{}'".format(self._keystring))
|
||||||
time = config.get('input', 'timeout')
|
time = config.get('input', 'timeout')
|
||||||
if time == 0:
|
if time == 0:
|
||||||
# execute immediately
|
# execute immediately
|
||||||
@ -342,7 +340,7 @@ class BaseKeyParser(QObject):
|
|||||||
self.bindings[key] = cmd
|
self.bindings[key] = cmd
|
||||||
else:
|
else:
|
||||||
logging.warn(
|
logging.warn(
|
||||||
"Ignoring keychain \"{}\" in section \"{}\" because "
|
"Ignoring keychain '{}' in section '{}' because "
|
||||||
"keychains are not supported there.".format(key, sectname))
|
"keychains are not supported there.".format(key, sectname))
|
||||||
|
|
||||||
def execute(self, cmdstr, keytype, count=None):
|
def execute(self, cmdstr, keytype, count=None):
|
||||||
|
@ -67,8 +67,8 @@ class CrashDialog(QDialog):
|
|||||||
"then submit it to <a href='mailto:crash@qutebrowser.org'>"
|
"then submit it to <a href='mailto:crash@qutebrowser.org'>"
|
||||||
"crash@qutebrowser.org</a> or click 'pastebin'.<br/><br/>")
|
"crash@qutebrowser.org</a> or click 'pastebin'.<br/><br/>")
|
||||||
if pages:
|
if pages:
|
||||||
text += ("You can click \"Restore tabs\" to attempt to reopen "
|
text += ("You can click 'Restore tabs' to attempt to reopen your "
|
||||||
"your open tabs.")
|
"open tabs.")
|
||||||
self._lbl.setText(text)
|
self._lbl.setText(text)
|
||||||
self._lbl.setWordWrap(True)
|
self._lbl.setWordWrap(True)
|
||||||
self._vbox.addWidget(self._lbl)
|
self._vbox.addWidget(self._lbl)
|
||||||
|
Loading…
Reference in New Issue
Block a user