Merge pull request #9 from libfitz/master

Disable the option to hide main toolbar (fix #8)
This commit is contained in:
Salem Yaslem 2024-09-24 21:03:41 +03:00 committed by GitHub
commit 074354b64a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -229,6 +229,13 @@ class DockerGUI(QMainWindow):
self.create_volume_action.setVisible(True) self.create_volume_action.setVisible(True)
self.remove_volume_action.setVisible(True) self.remove_volume_action.setVisible(True)
# override QMainWindow.createPopupMenu
def createPopupMenu(self):
filtered_menu = super(DockerGUI, self).createPopupMenu()
filtered_menu.removeAction(self.toolbar.toggleViewAction())
return filtered_menu
def update_visible_tabs(self, index): def update_visible_tabs(self, index):
for i in range(self.tab_widget.count()): for i in range(self.tab_widget.count()):
if i == index: if i == index: