mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 07:52:24 -04:00
add support for custom document dir
This commit is contained in:
parent
032ab3fb49
commit
d7075ecae9
2 changed files with 4 additions and 1 deletions
|
@ -49,6 +49,7 @@ class Config(dict):
|
|||
'deckBrowserOrder': 0,
|
||||
'deckBrowserRefreshPeriod': 3600,
|
||||
'deleteMedia': False,
|
||||
'documentDir': u"",
|
||||
'editFontFamily': 'Arial',
|
||||
'editFontSize': 12,
|
||||
'editLineSize': 20,
|
||||
|
|
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue