Skip to content

Commit 8dcda12

Browse files
committed
gui_qt/dictionaries: change default save directory
Default to the configuration directory, instead of the current directory.
1 parent 850cc2a commit 8dcda12

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

plover/gui_qt/dictionaries_widget.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from plover.dictionary.base import create_dictionary
2323
from plover.engine import ErroredDictionary
2424
from plover.misc import normalize_path
25+
from plover.oslayer.config import CONFIG_DIR
2526
from plover.registry import registry
2627
from plover import log
2728

@@ -65,6 +66,9 @@ def _get_dictionary_save_name(parent_widget, title, default_name=None,
6566
default_name += '.' + next((e for e in default_extensions
6667
if e in writable_extensions),
6768
'json')
69+
default_name = os.path.join(CONFIG_DIR, default_name)
70+
else:
71+
default_name = CONFIG_DIR
6872
new_filename = QFileDialog.getSaveFileName(
6973
parent=parent_widget, caption=title, directory=default_name,
7074
filter=_dictionary_filters(include_readonly=False),

0 commit comments

Comments
 (0)