diff --git a/ankiqt/config.py b/ankiqt/config.py index 50af0857a..30342711d 100644 --- a/ankiqt/config.py +++ b/ankiqt/config.py @@ -49,6 +49,7 @@ class Config(dict): 'deckBrowserOrder': 0, 'deckBrowserRefreshPeriod': 3600, 'deleteMedia': False, + 'documentDir': u"", 'editFontFamily': 'Arial', 'editFontSize': 12, 'editLineSize': 20, diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index 452ea9bb6..ae7ca866a 100755 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -2852,7 +2852,9 @@ Consider backing up your media directory first.""")) self.loadDeck(fname) def setupDocumentDir(self): - if sys.platform.startswith("win32"): + if self.config['documentDir']: + self.documentDir = self.config['documentDir'] + elif sys.platform.startswith("win32"): s = QSettings(QSettings.UserScope, "Microsoft", "Windows") s.beginGroup("CurrentVersion/Explorer/Shell Folders") self.documentDir = unicode(s.value("Personal").toString())