mirror of
https://github.com/ankitects/anki.git
synced 2025-11-12 15:47:12 -05:00
Merge branch 'master' of https://github.com/dae/anki
This commit is contained in:
commit
44425ab9d5
5 changed files with 8 additions and 7 deletions
|
|
@ -30,6 +30,6 @@ if arch[1] == "ELF":
|
||||||
sys.path.insert(0, os.path.join(ext, "py2.%d-%s" % (
|
sys.path.insert(0, os.path.join(ext, "py2.%d-%s" % (
|
||||||
sys.version_info[1], arch[0][0:2])))
|
sys.version_info[1], arch[0][0:2])))
|
||||||
|
|
||||||
version="2.0.29" # build scripts grep this line, so preserve formatting
|
version="2.0.31" # build scripts grep this line, so preserve formatting
|
||||||
from anki.storage import Collection
|
from anki.storage import Collection
|
||||||
__all__ = ["Collection"]
|
__all__ = ["Collection"]
|
||||||
|
|
|
||||||
|
|
@ -231,7 +231,9 @@ class Anki2Importer(Importer):
|
||||||
newid = self.dst.decks.id(name)
|
newid = self.dst.decks.id(name)
|
||||||
# pull conf over
|
# pull conf over
|
||||||
if 'conf' in g and g['conf'] != 1:
|
if 'conf' in g and g['conf'] != 1:
|
||||||
self.dst.decks.updateConf(self.src.decks.getConf(g['conf']))
|
conf = self.src.decks.getConf(g['conf'])
|
||||||
|
self.dst.decks.save(conf)
|
||||||
|
self.dst.decks.updateConf(conf)
|
||||||
g2 = self.dst.decks.get(newid)
|
g2 = self.dst.decks.get(newid)
|
||||||
g2['conf'] = g['conf']
|
g2['conf'] = g['conf']
|
||||||
self.dst.decks.save(g2)
|
self.dst.decks.save(g2)
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ from anki.lang import _
|
||||||
latexCmds = [
|
latexCmds = [
|
||||||
["latex", "-interaction=nonstopmode", "tmp.tex"],
|
["latex", "-interaction=nonstopmode", "tmp.tex"],
|
||||||
["dvipng", "-D", "200", "-T", "tight", "tmp.dvi", "-o", "tmp.png"]
|
["dvipng", "-D", "200", "-T", "tight", "tmp.dvi", "-o", "tmp.png"]
|
||||||
|
# ["dvipng", "-D", "600", "-T", "tight", "-bg", "Transparent", "tmp.dvi", "-o", "tmp.png"]
|
||||||
]
|
]
|
||||||
|
|
||||||
build = True # if off, use existing media but don't create new
|
build = True # if off, use existing media but don't create new
|
||||||
|
|
|
||||||
|
|
@ -321,7 +321,7 @@ from notes where %s""" % d)
|
||||||
|
|
||||||
def chunk(self):
|
def chunk(self):
|
||||||
buf = dict(done=False)
|
buf = dict(done=False)
|
||||||
lim = 2500
|
lim = 250
|
||||||
while self.tablesLeft and lim:
|
while self.tablesLeft and lim:
|
||||||
curTable = self.tablesLeft[0]
|
curTable = self.tablesLeft[0]
|
||||||
if not self.cursor:
|
if not self.cursor:
|
||||||
|
|
|
||||||
|
|
@ -431,10 +431,6 @@ class Browser(QMainWindow):
|
||||||
self.delCut1 = QShortcut(QKeySequence("Delete"), self)
|
self.delCut1 = QShortcut(QKeySequence("Delete"), self)
|
||||||
self.delCut1.setAutoRepeat(False)
|
self.delCut1.setAutoRepeat(False)
|
||||||
c(self.delCut1, SIGNAL("activated()"), self.deleteNotes)
|
c(self.delCut1, SIGNAL("activated()"), self.deleteNotes)
|
||||||
if isMac:
|
|
||||||
self.delCut2 = QShortcut(QKeySequence("Backspace"), self)
|
|
||||||
self.delCut2.setAutoRepeat(False)
|
|
||||||
c(self.delCut2, SIGNAL("activated()"), self.deleteNotes)
|
|
||||||
# add-on hook
|
# add-on hook
|
||||||
runHook('browser.setupMenus', self)
|
runHook('browser.setupMenus', self)
|
||||||
self.mw.maybeHideAccelerators(self)
|
self.mw.maybeHideAccelerators(self)
|
||||||
|
|
@ -1834,6 +1830,7 @@ class FavouritesLineEdit(QLineEdit):
|
||||||
name = dlg.textValue()
|
name = dlg.textValue()
|
||||||
if ok:
|
if ok:
|
||||||
self.mw.col.conf['savedFilters'][name] = txt
|
self.mw.col.conf['savedFilters'][name] = txt
|
||||||
|
self.mw.col.setMod()
|
||||||
|
|
||||||
self.updateButton()
|
self.updateButton()
|
||||||
self.browser.setupTree()
|
self.browser.setupTree()
|
||||||
|
|
@ -1845,5 +1842,6 @@ class FavouritesLineEdit(QLineEdit):
|
||||||
|
|
||||||
if ok == QMessageBox.Yes:
|
if ok == QMessageBox.Yes:
|
||||||
self.mw.col.conf['savedFilters'].pop(self.name, None)
|
self.mw.col.conf['savedFilters'].pop(self.name, None)
|
||||||
|
self.mw.col.setMod()
|
||||||
self.updateButton()
|
self.updateButton()
|
||||||
self.browser.setupTree()
|
self.browser.setupTree()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue