mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
double check with the user before allowing them to clobber their deck
This commit is contained in:
parent
c9010e984e
commit
e5bb3b38f1
1 changed files with 12 additions and 0 deletions
|
@ -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 <b>overwrite</b> the online version?<br>
|
||||
There is no way to undo this.<p>
|
||||
|
||||
If you want to download an online deck to<br>
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue