From 9eaacf89777611c7f5a1033fa61ea5aef9204eb4 Mon Sep 17 00:00:00 2001 From: Houssam Salem Date: Sun, 5 Oct 2014 20:37:09 +1100 Subject: [PATCH 1/7] Bump mod time when editing saved searches Fixes saved searches not getting synced when modified. --- aqt/browser.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aqt/browser.py b/aqt/browser.py index 3ea922722..12affb789 100644 --- a/aqt/browser.py +++ b/aqt/browser.py @@ -1834,6 +1834,7 @@ class FavouritesLineEdit(QLineEdit): name = dlg.textValue() if ok: self.mw.col.conf['savedFilters'][name] = txt + self.mw.col.setMod() self.updateButton() self.browser.setupTree() @@ -1845,5 +1846,6 @@ class FavouritesLineEdit(QLineEdit): if ok == QMessageBox.Yes: self.mw.col.conf['savedFilters'].pop(self.name, None) + self.mw.col.setMod() self.updateButton() self.browser.setupTree() From 47c3bb07961ec990a075f4053d66d91ebfced7f4 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 8 Oct 2014 12:54:30 +0900 Subject: [PATCH 2/7] make sure we set usn when pulling in dconf from apkg --- anki/importing/anki2.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/anki/importing/anki2.py b/anki/importing/anki2.py index 01e3bb751..4c3c404c2 100644 --- a/anki/importing/anki2.py +++ b/anki/importing/anki2.py @@ -231,7 +231,9 @@ class Anki2Importer(Importer): newid = self.dst.decks.id(name) # pull conf over 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['conf'] = g['conf'] self.dst.decks.save(g2) From 77dfd63f1e0c62ac3f51c828967870f0f88ea0fe Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 9 Oct 2014 18:12:25 +0900 Subject: [PATCH 3/7] comment out high-dpi+transparent latex example --- anki/latex.py | 1 + 1 file changed, 1 insertion(+) diff --git a/anki/latex.py b/anki/latex.py index 264e72ae3..0931e8cde 100644 --- a/anki/latex.py +++ b/anki/latex.py @@ -12,6 +12,7 @@ from anki.lang import _ latexCmds = [ ["latex", "-interaction=nonstopmode", "tmp.tex"], ["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 From 1f178b869fd0fe2c0defb74876e152b12c4aa895 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 10 Oct 2014 17:59:18 +0900 Subject: [PATCH 4/7] remove backspace to delete shortcut on macs too many people activating it accidentally --- aqt/browser.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/aqt/browser.py b/aqt/browser.py index 12affb789..98464181a 100644 --- a/aqt/browser.py +++ b/aqt/browser.py @@ -431,10 +431,6 @@ class Browser(QMainWindow): self.delCut1 = QShortcut(QKeySequence("Delete"), self) self.delCut1.setAutoRepeat(False) 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 runHook('browser.setupMenus', self) self.mw.maybeHideAccelerators(self) From 08e5caef8732c415d23bbaf29a35c80e3e1bd8a2 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 18 Oct 2014 16:10:12 +0900 Subject: [PATCH 5/7] bump version --- anki/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anki/__init__.py b/anki/__init__.py index abe87fc80..bdea16981 100644 --- a/anki/__init__.py +++ b/anki/__init__.py @@ -30,6 +30,6 @@ if arch[1] == "ELF": sys.path.insert(0, os.path.join(ext, "py2.%d-%s" % ( sys.version_info[1], arch[0][0:2]))) -version="2.0.29" # build scripts grep this line, so preserve formatting +version="2.0.30" # build scripts grep this line, so preserve formatting from anki.storage import Collection __all__ = ["Collection"] From 3d5d852708c20a30afa29a05a7d25af37f84860f Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 19 Oct 2014 16:58:26 +0900 Subject: [PATCH 6/7] reduce sync chunk size --- anki/sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anki/sync.py b/anki/sync.py index 2b9dc3b26..f9464d87a 100644 --- a/anki/sync.py +++ b/anki/sync.py @@ -321,7 +321,7 @@ from notes where %s""" % d) def chunk(self): buf = dict(done=False) - lim = 2500 + lim = 250 while self.tablesLeft and lim: curTable = self.tablesLeft[0] if not self.cursor: From acfbc41576246cd0991f40f2133b51b735bc5c16 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 19 Oct 2014 17:00:26 +0900 Subject: [PATCH 7/7] bump version --- anki/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anki/__init__.py b/anki/__init__.py index bdea16981..c4f4cd151 100644 --- a/anki/__init__.py +++ b/anki/__init__.py @@ -30,6 +30,6 @@ if arch[1] == "ELF": sys.path.insert(0, os.path.join(ext, "py2.%d-%s" % ( sys.version_info[1], arch[0][0:2]))) -version="2.0.30" # 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 __all__ = ["Collection"]