Skip to content

Commit

Permalink
Add show_help method to MainWindow class
Browse files Browse the repository at this point in the history
  • Loading branch information
LyubomirT committed May 1, 2024
1 parent 86050d7 commit 76572af
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions wincuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def initUI(self):
layout.addWidget(self.button_help) # Add Help button to the layout

self.setLayout(layout)

def show_help(self):
help_dialog = HelpDialog()
help_dialog.exec_()
Expand Down Expand Up @@ -176,6 +177,10 @@ def __init__(self, shortcut_manager):
super().__init__()
self.shortcut_manager = shortcut_manager
self.initUI()

def show_help(self):
help_dialog = HelpDialog()
help_dialog.exec_()

def initUI(self):
self.setWindowTitle("Shortcut Manager")
Expand All @@ -194,6 +199,7 @@ def initUI(self):

open_action.triggered.connect(self.show)
quit_action.triggered.connect(self.quit)
help_action.triggered.connect(self.show_help) # Connect help action to show_help

tray_menu.addAction(open_action)
tray_menu.addAction(help_action) # Add help action to tray menu
Expand All @@ -208,6 +214,8 @@ def initUI(self):
self.shortcut_editor.list_shortcuts()
self.listen_shortcuts()



def closeEvent(self, event):
event.ignore()
self.hide()
Expand Down

0 comments on commit 76572af

Please sign in to comment.