@@ -7,7 +7,6 @@ import webbrowser
7
7
import PySimpleGUI as sg
8
8
import pyautogui as pag
9
9
import keyboard
10
- import fuckit
11
10
import logging
12
11
from functions import get_latest_version , create_process , countdown , graceful_exit , get_hotkey , correct_key
13
12
from threading import Thread , Event
@@ -83,6 +82,8 @@ def updates_window(current_release):
83
82
84
83
85
84
def main_window ():
85
+ global hot_key
86
+
86
87
app_menu = [['Help' , ['About' , 'Check for Updates' ]]]
87
88
88
89
layout = [[sg .Menubar (app_menu )],
@@ -166,8 +167,6 @@ def main_window():
166
167
window ['-APPLY-' ].update (button_color = '#93b7a6' )
167
168
168
169
else :
169
- conf .get_value ('def_htk_key' )
170
- window .refresh ()
171
170
window ['-HT_KEY-' ].update (disabled = True )
172
171
window ['-HT_KEY-' ].update (text_color = 'grey' )
173
172
window ['-APPLY-' ].update (disabled = True )
@@ -178,8 +177,8 @@ def main_window():
178
177
conf .htk_cust = True
179
178
conf .cust_hot_key = str (values ['-HT_KEY-' ]).upper ()
180
179
conf .save_config_file ()
181
- window ['-HT_KEY-' ].update (conf .get_value ('cust_hot_key' ))
182
180
window ['-CHANGE-' ].update (False )
181
+ hot_key = get_hotkey (conf )
183
182
else :
184
183
is_singular = len (result ) == 1
185
184
window ['-LOG-' ].update (f'{ result } { "key is" if is_singular else "keys are" } not valid!' ,
@@ -195,6 +194,7 @@ def main_window():
195
194
conf .save_config_file ()
196
195
window ['-HT_KEY-' ].update (conf .get_value ('def_hot_key' ))
197
196
window ['-CHANGE-' ].update (False )
197
+ hot_key = get_hotkey (conf )
198
198
199
199
# Events for Frame - Timer
200
200
if event == '-ON-' :
@@ -221,7 +221,6 @@ def main_window():
221
221
222
222
if __name__ == '__main__' :
223
223
if sys .platform .startswith ('win' ):
224
- # On Windows calling this function is necessary.
225
224
multiprocess .freeze_support ()
226
225
227
226
RELEASE = '1.0.0'
@@ -243,6 +242,6 @@ if __name__ == '__main__':
243
242
conf = Configurator ()
244
243
conf .create_on_start ()
245
244
246
- hot_key , cust = get_hotkey (conf )
245
+ hot_key = get_hotkey (conf )
247
246
248
247
main_window ()
0 commit comments