Merge pull request #7 from Ranzo/fix_pack_01
Пофикшены незначительные ошибки в оформлении, добавлен выбор валюты
This commit is contained in:
commit
43ce6eaeef
@ -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])
|
||||
|
2
setts.py
2
setts.py
@ -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'
|
||||
|
@ -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"]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user