Use storage class to return document objects

This commit is contained in:
Veronica Berglyd Olsen
2022-11-06 00:29:43 +01:00
parent 76a1421fde
commit a75424e44b
14 changed files with 36 additions and 46 deletions
+4 -4
View File
@@ -30,6 +30,7 @@ from time import time
from pathlib import Path
from novelwriter.constants import nwFiles
from novelwriter.core.document import NWDoc
from novelwriter.core.projectxml import ProjectXMLReader, ProjectXMLWriter
from novelwriter.error import logException
@@ -153,7 +154,9 @@ class NWStorage:
def getDocument(self, tHandle):
"""Return a document wrapper object.
"""
pass
if self._runtimePath is not None:
return NWDoc(self.theProject, tHandle)
return NWDoc(self.theProject, None)
def getMetaFile(self, fileName):
"""Return the path to a file in the project meta folder.
@@ -232,9 +235,6 @@ class NWStorage:
def _zipIt(self, target):
pass
def _writeLockFile(self):
pass
def _prepareStorage(self, checkLegacy=True, newProject=False):
"""Prepare the storage area for the project.
"""