fixed xfce format not working properly

master
idziubenko 3 years ago
parent d369c5f5c2
commit c78fc0e09d

@ -72,11 +72,11 @@ def get_progress_bar(bartype="text", title=""):
pbar = ClProgressDialog()
pbar.setCancelButton(None)
pbar.adjustSize()
pbar.setWindowTitle(title.decode('utf-8'))
pbar.setWindowTitle(title)
pbar.setAutoClose(False)
pbar.setAutoReset(False)
pbar.setMaximum(0)
pbar.setLabelText(title.decode('utf-8'))
pbar.setLabelText(title)
pbar.setTextVisible(False)
pbar.setStyleSheet("QProgressBar {border:none; text-align: center;}")
return pbar

@ -3796,6 +3796,7 @@ class Template(_file, _terms, _warning, xmlShare, _shareTemplate):
templDirNameFile = ".calculate_directory"
_titleList = ("Modified", "Processed template files" + ":")
titleEnd = "For modify this file, create %(conf_path)s.clt template."
protectPaths = []
allContents = {}
if "CONFIG_PROTECT" in os.environ:

@ -592,7 +592,7 @@ class xmlDoc():
areaNodes = xpath.Evaluate('descendant::area', xmlArea)
for areaNode in areaNodes:
prevNode = areaNode.getprevious()
if prevNode:
if prevNode is not None:
parentNode = areaNode.getparent()
insertBefore(parentNode, deepcopy(self.sepAreas),
areaNode)

@ -153,7 +153,7 @@ class xml_xfce(TemplateFormat):
'(action="join", action="replace", action="drop")')
self.setError(textError)
return False
if xmlOldNode.getparent():
if xmlNewNode.getparent() is not None:
strAttr = [attrName, attrType]
findAttr = [x for x in strAttr if x]
findAttrStr = ''
@ -251,4 +251,5 @@ class xml_xfce(TemplateFormat):
"""Получение текстового файла из XML документа"""
data = xml_to_str(self.doc).split("\n")
data = [x for x in data if x.strip()]
data.insert(0, '<?xml version="1.0" encoding="UTF-8"?>\n')
return "\n".join(data).replace("\t", " ")

Loading…
Cancel
Save