From 6a19807310960f1ecd341baa15a805a412c022a1 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" Date: Sun, 11 Aug 2019 20:21:06 +0200 Subject: [PATCH] All xml attributes are now added to the etree class in alphabetical order to ensure it writes the same on different versions --- .travis.yml | 2 +- nw/project/item.py | 2 +- nw/project/project.py | 2 +- nw/project/status.py | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7b537003..d40b1c68 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ addons: - python3-pyqt5 - python3-pyqt5.qtsvg python: - - "3.6" + - "3.5" - "3.7" install: - pip install -r requirements.txt diff --git a/nw/project/item.py b/nw/project/item.py index 367167c8..55d532a1 100644 --- a/nw/project/item.py +++ b/nw/project/item.py @@ -55,8 +55,8 @@ class NWItem(): def packXML(self, xParent): xPack = etree.SubElement(xParent,"item",attrib={ "handle" : str(self.itemHandle), - "parent" : str(self.parHandle), "order" : str(self.itemOrder), + "parent" : str(self.parHandle), }) xSub = self._subPack(xPack,"name", text=str(self.itemName)) xSub = self._subPack(xPack,"type", text=str(self.itemType.name)) diff --git a/nw/project/project.py b/nw/project/project.py index bdc1b8b3..c41d4115 100644 --- a/nw/project/project.py +++ b/nw/project/project.py @@ -288,8 +288,8 @@ class NWProject(): # Root element and project details logger.debug("Writing project meta") nwXML = etree.Element("novelWriterXML",attrib={ - "fileVersion" : "1.0", "appVersion" : str(nw.__version__), + "fileVersion" : "1.0", "timeStamp" : datetime.now().strftime("%Y-%m-%d %H:%M:%S"), }) diff --git a/nw/project/status.py b/nw/project/status.py index 1d19bf34..ea1a045a 100644 --- a/nw/project/status.py +++ b/nw/project/status.py @@ -89,9 +89,9 @@ class NWStatus(): def packEntries(self, xParent): for n in range(self.theLength): xSub = etree.SubElement(xParent,"entry",attrib={ - "red" : str(self.theColours[n][0]), - "green" : str(self.theColours[n][1]), "blue" : str(self.theColours[n][2]), + "green" : str(self.theColours[n][1]), + "red" : str(self.theColours[n][0]), }) xSub.text = self.theLabels[n] return True