Повышена стабильность

This commit is contained in:
Risen 2023-07-13 20:35:03 +03:00
parent 43ce6eaeef
commit d1e2f4ab7e
4 changed files with 5 additions and 4 deletions

View File

@ -19,7 +19,7 @@ _ = lang.gettext
def create_window():
with open('setts.json') as f:
with open(os.path.expanduser('setts.json')) as f:
theme = json.load(f)['settings']['theme']
Sgi.theme(theme)
menu_def = [
@ -81,7 +81,7 @@ def main():
Sgi.popup_ok(not_connect)
elif event == _('Рассчитать'):
with open('setts.json') as f:
with open(os.path.expanduser('setts.json')) as f:
params = json.load(f)["settings"]
try:
hours = float(values[1])

View File

@ -8,7 +8,7 @@ from lists import themes_list, lang_list, currency_list
def language():
with open('setts.json') as file:
with open(os.path.expanduser('setts.json')) as file:
old_data = json.load(file)
if old_data['settings']["locale"] == 'English':
locale = 'en_US'

View File

@ -73,4 +73,4 @@ new_sets = (_('Задайте стоимость принтера, \n'
new_marge = (_('Задайте процент желаемой наценки\n'
'в настройках (можно просто проставить ноль)'))
ver = '0.6.1'
ver = '0.6.3'

View File

@ -2,6 +2,7 @@ import requests
import webbrowser
import json
import PySimpleGUI as Sgi
import os
import gettext
from texts import ver