use documents instead of desktop as default location

have observed users doing a collection export to their desktop, then
thinking that double clicking the collection file was the way to
start Anki in the future
This commit is contained in:
Damien Elmes 2017-09-10 17:01:52 +10:00
parent 0c80b5454f
commit 905bd10efe

View File

@ -280,8 +280,8 @@ def getSaveFile(parent, title, dir_description, key, ext, fname=None):
variable. The file dialog will default to open with FNAME.""" variable. The file dialog will default to open with FNAME."""
config_key = dir_description + 'Directory' config_key = dir_description + 'Directory'
desktopPath = QStandardPaths.writableLocation(QStandardPaths.DesktopLocation) defaultPath = QStandardPaths.writableLocation(QStandardPaths.DocumentsLocation)
base = aqt.mw.pm.profile.get(config_key, desktopPath) base = aqt.mw.pm.profile.get(config_key, defaultPath)
path = os.path.join(base, fname) path = os.path.join(base, fname)
file = QFileDialog.getSaveFileName( file = QFileDialog.getSaveFileName(
parent, title, path, "{0} (*{1})".format(key, ext), parent, title, path, "{0} (*{1})".format(key, ext),