Fix some backslash-quotes

This commit is contained in:
Florian Bruhin 2014-05-12 15:58:09 +02:00
parent 8ff4b6dd99
commit 7b2961f23e
6 changed files with 20 additions and 22 deletions

View File

@ -467,7 +467,7 @@ class CurCommandDispatcher(QObject):
editor = config.get('general', 'editor')
executable = editor[0]
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)
def _editor_cleanup(self, oshandle, filename):

View File

@ -248,8 +248,8 @@ class HintManager(QObject):
# e.g. parse (-webkit-)border-radius correctly and click text fields at
# the bottom right, and everything else on the top left or so.
pos = webelem.rect_on_view(elem).center()
logging.debug("Clicking on \"{}\" at {}/{}".format(
elem.toPlainText(), pos.x(), pos.y()))
logging.debug("Clicking on '{}' at {}/{}".format(elem.toPlainText(),
pos.x(), pos.y()))
events = [
QMouseEvent(QEvent.MouseMove, pos, Qt.NoButton, Qt.NoButton,
Qt.NoModifier),

View File

@ -176,7 +176,7 @@ class String(BaseType):
if self.forbidden is not None and any(c in value
for c in self.forbidden):
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:
raise ValidationError(value, "must be at least {} chars "
"long!".format(self.minlen))

View File

@ -77,8 +77,8 @@ SECTION_DESC = {
"The searchengine named DEFAULT is used when general.auto-search "
"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. "
"\"qutebrowser !google\". The string \"{}\" will be replaced by the "
"search term, use \"{{\" and \"}}\" for literal {/} signs."),
'"qutebrowser !google". The string "{}" will be replaced by the '
'search term, use "{{" and "}}" for literal {/} signs.'),
'keybind': (
"Bindings from a key(chain) to a command.\n"
"For special keys (can't be part of a keychain), enclose them in "
@ -90,8 +90,8 @@ SECTION_DESC = {
" Shift: Shift\n"
"For simple keys (no <>-signs), a capital letter means the key is "
"pressed with Shift. For special keys (with <>-signs), you need "
"to explicitely add \"Shift-\" to match a key pressed with shift. "
"You can bind multiple commands by separating them with \";;\"."),
'to explicitely add "Shift-" to match a key pressed with shift. '
'You can bind multiple commands by separating them with ";;".'),
'keybind.insert': (
"Keybindings for insert mode.\n"
"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 "
"percentages)\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"
" [2] http://qt-project.org/doc/qt-4.8/stylesheet-reference.html"
"#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 "
"-webkit-gradient, see [3].\n"
" [3] https://www.webkit.org/blog/175/introducing-css-gradients/"),
@ -150,8 +150,8 @@ SECTION_DESC = {
" Weight: normal, bold, 100..900\n"
" Size: Number + px/pt\n"
"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 "
"don't use \"${_monospace}\" there."),
'because of that, a general "Monospace" family is enough and we '
'don\'t use "${_monospace}" there.'),
}

View File

@ -191,19 +191,17 @@ class BaseKeyParser(QObject):
match, binding = self._match_key(cmd_input)
if match == self.Match.definitive:
logging.debug("Definitive match for "
"\"{}\".".format(self._keystring))
logging.debug("Definitive match for '{}'.".format(self._keystring))
self._keystring = ''
self.execute(binding, self.Type.chain, count)
elif match == self.Match.ambiguous:
logging.debug("Ambigious match for "
"\"{}\".".format(self._keystring))
logging.debug("Ambigious match for '{}'.".format(self._keystring))
self._handle_ambiguous_match(binding, count)
elif match == self.Match.partial:
logging.debug("No match for \"{}\" (added {})".format(
logging.debug("No match for '{}' (added {})".format(
self._keystring, txt))
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 = ''
return False
@ -262,7 +260,7 @@ class BaseKeyParser(QObject):
binding: The command-string to execute.
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')
if time == 0:
# execute immediately
@ -342,7 +340,7 @@ class BaseKeyParser(QObject):
self.bindings[key] = cmd
else:
logging.warn(
"Ignoring keychain \"{}\" in section \"{}\" because "
"Ignoring keychain '{}' in section '{}' because "
"keychains are not supported there.".format(key, sectname))
def execute(self, cmdstr, keytype, count=None):

View File

@ -67,8 +67,8 @@ class CrashDialog(QDialog):
"then submit it to <a href='mailto:crash@qutebrowser.org'>"
"crash@qutebrowser.org</a> or click 'pastebin'.<br/><br/>")
if pages:
text += ("You can click \"Restore tabs\" to attempt to reopen "
"your open tabs.")
text += ("You can click 'Restore tabs' to attempt to reopen your "
"open tabs.")
self._lbl.setText(text)
self._lbl.setWordWrap(True)
self._vbox.addWidget(self._lbl)