diff --git a/openlp/core/common/json.py b/openlp/core/common/json.py index d25add283..f0e45ee2a 100644 --- a/openlp/core/common/json.py +++ b/openlp/core/common/json.py @@ -40,7 +40,8 @@ class OpenLPJsonDecoder(JSONDecoder): self.kwargs = kwargs if object_hook is None: object_hook = self.custom_object_hook - super().__init__(object_hook, parse_float, parse_int, parse_constant, strict, object_pairs_hook) + super().__init__(object_hook=object_hook, parse_float=parse_float, parse_int=parse_int, + parse_constant=parse_constant, strict=strict, object_pairs_hook=object_pairs_hook) def custom_object_hook(self, obj): """ @@ -71,7 +72,9 @@ class OpenLPJsonEncoder(JSONEncoder): self.kwargs = kwargs if default is None: default = self.custom_default - super().__init__(skipkeys, ensure_ascii, check_circular, allow_nan, sort_keys, indent, separators, default) + super().__init__(skipkeys=skipkeys, ensure_ascii=ensure_ascii, check_circular=check_circular, + allow_nan=allow_nan, sort_keys=sort_keys, indent=indent, separators=separators, + default=default) def custom_default(self, obj): """ diff --git a/openlp/core/common/settings.py b/openlp/core/common/settings.py index 5bfcd31a9..be1b29c75 100644 --- a/openlp/core/common/settings.py +++ b/openlp/core/common/settings.py @@ -262,7 +262,10 @@ class Settings(QtCore.QSettings): ('core/recent files', 'core/recent files', [(file_names_conv, None)]), ('media/media files', 'media/media files', [(file_names_conv, None)]), ('presentations/presentations files', 'presentations/presentations files', [(file_names_conv, None)]), - ('core/logo file', 'core/logo file', [(str_to_path, None)]) + ('core/logo file', 'core/logo file', [(str_to_path, None)]), + ('presentations/last directory', 'presentations/last directory', [(str_to_path, None)]), + ('images/last directory', 'images/last directory', [(str_to_path, None)]), + ('media/last directory', 'media/last directory', [(str_to_path, None)]) ] @staticmethod diff --git a/openlp/plugins/images/imageplugin.py b/openlp/plugins/images/imageplugin.py index c4da26dfe..a4310f170 100644 --- a/openlp/plugins/images/imageplugin.py +++ b/openlp/plugins/images/imageplugin.py @@ -41,6 +41,7 @@ __default_settings__ = { 'images/db hostname': '', 'images/db database': '', 'images/background color': '#000000', + 'images/last directory': None } diff --git a/openlp/plugins/media/mediaplugin.py b/openlp/plugins/media/mediaplugin.py index 1c6806b2c..f73cae56d 100644 --- a/openlp/plugins/media/mediaplugin.py +++ b/openlp/plugins/media/mediaplugin.py @@ -42,7 +42,8 @@ log = logging.getLogger(__name__) # Some settings starting with "media" are in core, because they are needed for core functionality. __default_settings__ = { 'media/media auto start': QtCore.Qt.Unchecked, - 'media/media files': [] + 'media/media files': [], + 'media/last directory': None } diff --git a/openlp/plugins/presentations/presentationplugin.py b/openlp/plugins/presentations/presentationplugin.py index 6f9989565..dc9065d81 100644 --- a/openlp/plugins/presentations/presentationplugin.py +++ b/openlp/plugins/presentations/presentationplugin.py @@ -47,7 +47,8 @@ __default_settings__ = {'presentations/override app': QtCore.Qt.Unchecked, 'presentations/presentations files': [], 'presentations/thumbnail_scheme': '', 'presentations/powerpoint slide click advance': QtCore.Qt.Unchecked, - 'presentations/powerpoint control window': QtCore.Qt.Unchecked + 'presentations/powerpoint control window': QtCore.Qt.Unchecked, + 'presentations/last directory': None }