From e5bb3b38f1c3fd39d44da9e83febea8e51cb7b9a Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 21 Jul 2010 19:05:20 +0900 Subject: [PATCH] double check with the user before allowing them to clobber their deck --- ankiqt/ui/main.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index 621224e6f..67d56219a 100755 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -2234,6 +2234,18 @@ and remote side. What do you want to do?""" % deckName), def selectSyncDeck(self, decks, create=True): name = ui.sync.DeckChooser(self, decks, create).getName() + if self.syncName != name: + diag = ui.utils.askUserDialog(_("""\ +Really overwrite the online version?
+There is no way to undo this.

+ +If you want to download an online deck to
+your computer, use File>Download>Personal Deck +instead."""), + ["Overwrite", "Cancel"]) + diag.setDefault(1) + if diag.run() == "Cancel": + name = None self.syncName = name if name: # name chosen