From 9973f09a616900ab0900974da77d22b566598b5f Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sat, 14 May 2011 15:37:58 +0200 Subject: improved some code style issues --- module/gui/SettingsWidget.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/gui/SettingsWidget.py') diff --git a/module/gui/SettingsWidget.py b/module/gui/SettingsWidget.py index 7218cc570..8123fe139 100644 --- a/module/gui/SettingsWidget.py +++ b/module/gui/SettingsWidget.py @@ -118,7 +118,7 @@ class SettingsWidget(QWidget): elif not item.type.find(";") == -1: i.setCurrentIndex(i.findText(item.value)) elif item.type == "bool": - if (True if item.value.lower() in ("1","true", "on", "an","yes") else False): + if True if item.value.lower() in ("1","true", "on", "an","yes") else False: i.setCurrentIndex(0) else: i.setCurrentIndex(1) @@ -149,7 +149,7 @@ class SettingsWidget(QWidget): if i.currentText() != item.value: self.connector.setConfigValue(k, option, i.currentText(), sec) elif item.type == "bool": - if ((True if item.value.lower() in ("1","true", "on", "an","yes") else False) ^ (not i.currentIndex())): + if (True if item.value.lower() in ("1","true", "on", "an","yes") else False) ^ (not i.currentIndex()): self.connector.setConfigValue(k, option, not i.currentIndex(), sec) else: if i.text() != item.value: @@ -190,7 +190,7 @@ class Section(QGroupBox): i = QComboBox(self) i.addItem(_("Yes"), QVariant(True)) i.addItem(_("No"), QVariant(False)) - if (True if option.value.lower() in ("1","true", "on", "an","yes") else False): + if True if option.value.lower() in ("1","true", "on", "an","yes") else False: i.setCurrentIndex(0) else: i.setCurrentIndex(1) -- cgit v1.2.3