Merge pull request #7 from Ranzo/fix_pack_01

Пофикшены незначительные ошибки в оформлении, добавлен выбор валюты
This commit is contained in:
Risen 2023-07-13 16:33:02 +03:00 committed by GitHub
commit 43ce6eaeef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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"]