From 1365557930dcccaae754e18016a82ec623cb3c3e Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 2 Oct 2010 14:41:50 +0900 Subject: [PATCH] remove win32 importing hack, require target deck to be on disk --- ankiqt/ui/importing.py | 3 --- ankiqt/ui/main.py | 8 +++++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ankiqt/ui/importing.py b/ankiqt/ui/importing.py index cecfa53d4..9e936a5f0 100644 --- a/ankiqt/ui/importing.py +++ b/ankiqt/ui/importing.py @@ -194,9 +194,6 @@ you can enter it here. Use \\t to represent tab."""), self.file = None self.maybePreview() self.parent.deck.s.flush() - if sys.platform.startswith("win32") and not self.parent.deck.path: - # this fixes a strange bug in sqlite - self.parent.deck.s.all("pragma integrity_check") self.parent.reset() self.modelChooser.deinit() diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index 2a237f948..9b9cf62dd 100755 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -1897,7 +1897,13 @@ You are currently cramming. Please close this deck first.""")) return if self.deck is None: self.onNew() - ui.importing.ImportDialog(self) + if not self.deck.path: + self.showToolTip(_("""\ +Please choose a name for this deck. After saving, the importing \ +window will open.""")) + self.onSaveAs() + if self.deck.path: + ui.importing.ImportDialog(self) def onExport(self): ui.exporting.ExportDialog(self)