Skip to content

Commit

Permalink
MNT: add open-welcome-tab to file actions list, closes pcdshub#201
Browse files Browse the repository at this point in the history
  • Loading branch information
tangkong committed Sep 29, 2023
1 parent 217c1e2 commit d82f8da
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions atef/ui/config_window.ui
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
<property name="title">
<string>File</string>
</property>
<addaction name="action_welcome_tab"/>
<addaction name="separator"/>
<addaction name="action_new_file"/>
<addaction name="separator"/>
<addaction name="action_open_file"/>
Expand Down Expand Up @@ -120,6 +122,11 @@
<string>Find / Replace</string>
</property>
</action>
<action name="action_welcome_tab">
<property name="text">
<string>Welcome Tab</string>
</property>
</action>
</widget>
<resources/>
<connections/>
Expand Down
2 changes: 2 additions & 0 deletions atef/widgets/config/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class Window(DesignerDisplay, QMainWindow):
user_filename_ext = 'json'

tab_widget: QTabWidget
action_welcome_tab: QAction
action_new_file: QAction
action_open_file: QAction
action_save: QAction
Expand All @@ -72,6 +73,7 @@ class Window(DesignerDisplay, QMainWindow):
def __init__(self, *args, show_welcome: bool = True, **kwargs):
super().__init__(*args, **kwargs)
self.setWindowTitle('atef config')
self.action_welcome_tab.triggered.connect(self.welcome_user)
self.action_new_file.triggered.connect(self.new_file)
self.action_open_file.triggered.connect(self.open_file)
self.action_save.triggered.connect(self.save)
Expand Down

0 comments on commit d82f8da

Please sign in to comment.