diff --git a/artiq/gui/log.py b/artiq/gui/log.py index d7b5a000e..f3f1a1fe6 100644 --- a/artiq/gui/log.py +++ b/artiq/gui/log.py @@ -161,6 +161,15 @@ class _LogDock(dockarea.Dock): self.filter_freetext_changed) grid.addWidget(self.filter_freetext, 0, 2) + newdock = QtGui.QToolButton() + newdock.setToolTip("Create new log dock") + newdock.setIcon(QtGui.QApplication.style().standardIcon( + QtGui.QStyle.SP_FileDialogNewFolder)) + # note the lambda, the default parameter is overriden otherwise + newdock.clicked.connect(lambda: manager.create_new_dock()) + grid.addWidget(newdock, 0, 3) + grid.layout.setColumnStretch(2, 1) + self.log = QtGui.QTableView() self.log.setSelectionMode(QtGui.QAbstractItemView.NoSelection) self.log.horizontalHeader().setResizeMode( @@ -179,12 +188,6 @@ class _LogDock(dockarea.Dock): self.scroll_at_bottom = False self.scroll_value = 0 - self.log.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu) - newlog_action = QtGui.QAction("Create new log dock", self.log) - # note the lambda, the default parameter is overriden otherwise - newlog_action.triggered.connect(lambda: manager.create_new_dock()) - self.log.addAction(newlog_action) - log_sub.add_setmodel_callback(self.set_model) def filter_level_changed(self):