Пофикшены незначительные ошибки в оформлении, добавлен выбор валюты

This commit is contained in:
Ivan 2023-07-13 16:31:12 +03:00
parent ff5e2e1c97
commit 2920ac8f32
3 changed files with 5 additions and 6 deletions

View File

@ -19,7 +19,7 @@ _ = lang.gettext
def create_window():
with open(os.path.expanduser('setts.json')) as f:
with open('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(os.path.expanduser('setts.json')) as f:
with open('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(os.path.expanduser('setts.json')) as file:
with open('setts.json') as file:
old_data = json.load(file)
if old_data['settings']["locale"] == 'English':
locale = 'en_US'

View File

@ -2,7 +2,6 @@ import requests
import webbrowser
import json
import PySimpleGUI as Sgi
import os
import gettext
from texts import ver
@ -15,7 +14,7 @@ _ = lang.gettext
def upd_check():
with open(os.path.expanduser('setts.json')) as json_file:
with open('setts.json') as json_file:
data = json.load(json_file)
set_theme = data["settings"]["theme"]
@ -60,7 +59,7 @@ def upd_check():
def upd_start():
with open(os.path.expanduser('~\Documents\Calc3DbyRisen\setts.json')) as json_file:
with open('setts.json') as json_file:
data = json.load(json_file)
set_theme = data["settings"]["theme"]