Skip to content

Commit

Permalink
Fixed key-binding issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
kosmo committed Jun 13, 2024
1 parent a960300 commit 1ff21cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Binary file modified Shyft.dmg
Binary file not shown.
8 changes: 4 additions & 4 deletions src/shyft/Shyft.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def __init__(self, root):
self.refresh_view()
self.timer_window = None
self.root.resizable(True, False)
self.root.protocol("WM_DELETE_WINDOW", self.on_close)
self.root.protocol("WM_DELETE_WINDOW", self.on_quit)
self.root.bind_all(f"<{modifier_key}-m>", minimize_window)

def toggle_timer_topmost(self):
Expand All @@ -215,7 +215,7 @@ def toggle_timer_topmost(self):
with open(CONFIG_FILE, "w") as config_file:
self.config.write(config_file)

def on_close(self):
def on_quit(self, event=None):
self.running = False
self.root.destroy()

Expand Down Expand Up @@ -955,8 +955,8 @@ def run_tkinter_app():
root.bind(f"<{modifier_key}-N>", app.manual_entry)
root.bind(f"<{modifier_key}-L>", app.view_logs)
root.bind(f"<{modifier_key}-T>", app.calculate_totals)
root.bind_all(f"<{modifier_key}-Q>", app.on_close)
root.bind_all(f"<{modifier_key}-q>", app.on_close)
root.bind_all(f"<{modifier_key}-Q>", app.on_quit)
root.bind_all(f"<{modifier_key}-q>", app.on_quit)

root.mainloop()

Expand Down

0 comments on commit 1ff21cf

Please sign in to comment.