From 138ba7e2fab3bd474459271217d10903107276d4 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 27 Oct 2015 18:10:31 +0800 Subject: [PATCH] gui: add addItems to populate log level comboboxes --- artiq/gui/explorer.py | 3 +-- artiq/gui/log.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/artiq/gui/explorer.py b/artiq/gui/explorer.py index 06dd9c3f6..7ee3e311e 100644 --- a/artiq/gui/explorer.py +++ b/artiq/gui/explorer.py @@ -257,8 +257,7 @@ class ExplorerDock(dockarea.Dock): grid.addWidget(self.flush, 3, 2) self.log_level = QtGui.QComboBox() - for item in "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL": - self.log_level.addItem(item) + self.log_level.addItems(["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"]) self.log_level.setCurrentIndex(1) self.log_level.setToolTip("Minimum level for log entry production") grid.addWidget(self.log_level, 3, 3) diff --git a/artiq/gui/log.py b/artiq/gui/log.py index 3c4b1bd99..f5b4aa15e 100644 --- a/artiq/gui/log.py +++ b/artiq/gui/log.py @@ -100,8 +100,7 @@ class LogDock(dockarea.Dock): grid.layout.setColumnStretch(1, 0) grid.layout.setColumnStretch(2, 1) self.filterbox = QtGui.QComboBox() - for item in "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL": - self.filterbox.addItem(item) + self.filterbox.addItems(["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"]) self.filterbox.setToolTip("Display entries at or above this level") grid.addWidget(self.filterbox, 0, 1) self.filterbox.currentIndexChanged.connect(self.filter_changed)