()
| 58 | |
| 59 | |
| 60 | def load_settings(): |
| 61 | global API_KEY |
| 62 | settings = sg.UserSettings(path=SETTINGS_PATH) |
| 63 | API_KEY = settings['-api key-'] |
| 64 | if not API_KEY: |
| 65 | sg.popup_quick_message('No valid API key found... opening setup window...', keep_on_top=True, background_color='red', text_color='white', auto_close_duration=3, non_blocking=False, location=win_location) |
| 66 | change_settings(settings) |
| 67 | return settings |
| 68 | |
| 69 | |
| 70 | def change_settings(settings, window_location=(None, None)): |
no test coverage detected