Skip to content

Commit 7bc4de4

Browse files
committed
bug fix
1 parent 6ee0273 commit 7bc4de4

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def get_hotkey(conf):
3030
hot_hey = conf.get_value('cust_hot_key')
3131
else:
3232
hot_hey = conf.get_value('def_hot_key')
33-
return hot_hey, cust
33+
return hot_hey
3434

3535

3636
def graceful_exit(event, window):

main.pyw

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import webbrowser
77
import PySimpleGUI as sg
88
import pyautogui as pag
99
import keyboard
10-
import fuckit
1110
import logging
1211
from functions import get_latest_version, create_process, countdown, graceful_exit, get_hotkey, correct_key
1312
from threading import Thread, Event
@@ -83,6 +82,8 @@ def updates_window(current_release):
8382

8483

8584
def main_window():
85+
global hot_key
86+
8687
app_menu = [['Help', ['About', 'Check for Updates']]]
8788

8889
layout = [[sg.Menubar(app_menu)],
@@ -166,8 +167,6 @@ def main_window():
166167
window['-APPLY-'].update(button_color='#93b7a6')
167168

168169
else:
169-
conf.get_value('def_htk_key')
170-
window.refresh()
171170
window['-HT_KEY-'].update(disabled=True)
172171
window['-HT_KEY-'].update(text_color='grey')
173172
window['-APPLY-'].update(disabled=True)
@@ -178,8 +177,8 @@ def main_window():
178177
conf.htk_cust = True
179178
conf.cust_hot_key = str(values['-HT_KEY-']).upper()
180179
conf.save_config_file()
181-
window['-HT_KEY-'].update(conf.get_value('cust_hot_key'))
182180
window['-CHANGE-'].update(False)
181+
hot_key = get_hotkey(conf)
183182
else:
184183
is_singular = len(result) == 1
185184
window['-LOG-'].update(f'{result} {"key is" if is_singular else "keys are"} not valid!',
@@ -195,6 +194,7 @@ def main_window():
195194
conf.save_config_file()
196195
window['-HT_KEY-'].update(conf.get_value('def_hot_key'))
197196
window['-CHANGE-'].update(False)
197+
hot_key = get_hotkey(conf)
198198

199199
# Events for Frame - Timer
200200
if event == '-ON-':
@@ -221,7 +221,6 @@ def main_window():
221221

222222
if __name__ == '__main__':
223223
if sys.platform.startswith('win'):
224-
# On Windows calling this function is necessary.
225224
multiprocess.freeze_support()
226225

227226
RELEASE = '1.0.0'
@@ -243,6 +242,6 @@ if __name__ == '__main__':
243242
conf = Configurator()
244243
conf.create_on_start()
245244

246-
hot_key, cust = get_hotkey(conf)
245+
hot_key = get_hotkey(conf)
247246

248247
main_window()

0 commit comments

Comments
 (0)