spostati i file di configurazione, da fare la gestione finestra di

output per scegliere la lingua
This commit is contained in:
2020-03-03 17:41:28 +01:00
parent 25747c0a94
commit 9c04b5d943
10 changed files with 8 additions and 7 deletions

View File

@@ -27,11 +27,12 @@ class bananaMain(PyQt5.QtWidgets.QMainWindow):
def __init__(self):
PyQt5.QtWidgets.QMainWindow.__init__(self)
try:
self.logger = fancyLogger(filepath=r"./libbananasplit/loggerconf.json",fileLog=False)
self.conf = bananaCONF(workdir=r"./libbananasplit", logger=self.logger)
self.logger = fancyLogger(filepath=r"./conf/loggerconf.json",fileLog=False)
self.conf = bananaCONF(workdir=r"./conf", logger=self.logger)
self.conf.open()
self.conf.use("defaults.json")
self.conf.use(self.conf.getParam('paths', 'lastUsed'))
print(self.conf.inUse)
except:
sys.exit()
@@ -119,7 +120,7 @@ class bananaMain(PyQt5.QtWidgets.QMainWindow):
sf.setAcceptMode(PyQt5.QtWidgets.QFileDialog.AcceptSave)
sf.setNameFilter("bananaCONF (*.json)")
if sf.exec():
rv=str(sf.selectedFiles()[0])
rv=str(sf.selectedFiles()[0].split('/')[-1])
self.conf.setParam(('paths','lastUsed'),rv)
self.logger.debug("Scrivi il File: {}".format(rv))
self.conf.save(fName=rv)