mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
fix another unicode bug, add shortcut to options
This commit is contained in:
parent
3e9f0d0443
commit
05df5fb4e0
2 changed files with 3 additions and 3 deletions
|
@ -641,11 +641,11 @@ class FactEdit(QTextEdit):
|
||||||
|
|
||||||
def _retrieveURL(self, url, ext):
|
def _retrieveURL(self, url, ext):
|
||||||
filecontents = urllib2.urlopen(url).read()
|
filecontents = urllib2.urlopen(url).read()
|
||||||
(fd, name) = tempfile.mkstemp(suffix=".%s" % ext)
|
(fd, name) = tempfile.mkstemp(suffix=".%s" % ext.encode("ascii"))
|
||||||
file = os.fdopen(fd, "wb")
|
file = os.fdopen(fd, "wb")
|
||||||
file.write(filecontents)
|
file.write(filecontents)
|
||||||
file.flush()
|
file.flush()
|
||||||
return name
|
return unicode(name, sys.getfilesystemencoding())
|
||||||
|
|
||||||
def simplifyHTML(self, html):
|
def simplifyHTML(self, html):
|
||||||
"Remove all style information and P tags."
|
"Remove all style information and P tags."
|
||||||
|
|
|
@ -249,7 +249,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="optionsButton" >
|
<widget class="QPushButton" name="optionsButton" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>Options>></string>
|
<string>&Options>></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checkable" >
|
<property name="checkable" >
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
|
Loading…
Reference in a new issue