From d6238ee34ceb8ef66a3ced96ea81b233556043f1 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 11 Mar 2009 17:02:37 +0900 Subject: [PATCH 1/3] binary files on windows --- ankiqt/ui/getshared.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ankiqt/ui/getshared.py b/ankiqt/ui/getshared.py index 3fc3b2fb7..deca3246a 100644 --- a/ankiqt/ui/getshared.py +++ b/ankiqt/ui/getshared.py @@ -179,7 +179,7 @@ class GetShared(QDialog): for l in z.namelist(): if l == "shared.anki": dpath = os.path.join(dd, tit + ".anki") - open(dpath, "w").write(z.read(l)) + open(dpath, "wb").write(z.read(l)) elif l.startswith("shared.media/"): try: os.mkdir(os.path.join(dd, tit + ".media")) @@ -200,7 +200,7 @@ class GetShared(QDialog): # pass # open(os.path.join(pd, 2)) else: - open(os.path.join(pd, tit + ext), "w").write(data) + open(os.path.join(pd, tit + ext), "wb").write(data) showInfo(_("Plugin downloaded. Please restart Anki."), parent=self) self.ok = True From 907b711c25712e4fc0cf8517e20ec50d67d19849 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 11 Mar 2009 17:02:50 +0900 Subject: [PATCH 2/3] no autodefault on display props, fix tab order --- designer/displayproperties.ui | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/designer/displayproperties.ui b/designer/displayproperties.ui index e9dc299c6..4bfbfa0fc 100644 --- a/designer/displayproperties.ui +++ b/designer/displayproperties.ui @@ -300,8 +300,8 @@ 0 0 - 960 - 480 + 348 + 317 @@ -556,6 +556,9 @@ Close + + false + @@ -613,6 +616,31 @@ + tabWidget + cardList + questionFont + questionSize + questionColour + questionAlign + answerFont + answerSize + answerColour + answerAlign + backgroundColour + fieldList + useFamily + fontFamily + useSize + fontSize + useColour + fontColour + useFamilyEdit + fontFamilyEdit + useSizeEdit + fontSizeEdit + helpButton + preview + closeButton question answer From 2aa6cab35e48b3cf42d9b6b08a4e6e516c681f8f Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 12 Mar 2009 06:17:55 +0900 Subject: [PATCH 3/3] cards>facts in importing message --- ankiqt/ui/importing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ankiqt/ui/importing.py b/ankiqt/ui/importing.py index 16c8ee75f..35581838d 100644 --- a/ankiqt/ui/importing.py +++ b/ankiqt/ui/importing.py @@ -132,7 +132,7 @@ class ImportDialog(QDialog): self.parent.deck.finishProgress() self.parent.deck.setUndoEnd(n) txt = ( - _("Importing complete. %(num)d cards imported from %(file)s.\n") % + _("Importing complete. %(num)d facts imported from %(file)s.\n") % {"num": self.importer.total, "file": os.path.basename(self.file)}) txt += _("Click the close button or import another file.\n\n") if self.importer.log: