From 0c132c8949d429c46af97edfe37857f46d1fe701 Mon Sep 17 00:00:00 2001 From: duplo Date: Tue, 27 Jan 2009 14:29:24 +0000 Subject: [PATCH] Modify the API of the BModulePage class git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2228 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/BModulePage.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/wizard/BModulePage.py b/wizard/BModulePage.py index 9ee813ad..7fca118b 100644 --- a/wizard/BModulePage.py +++ b/wizard/BModulePage.py @@ -102,7 +102,7 @@ class BModulePage(BWizardPage): def _savePage(self, previousRow, previousColumn): module = self._module(previousRow) - moduleConfigurations = self._projectInfoRetrieve("CONFIGURATIONS")[self._configurations(module)] + moduleConfigurations = self._configurations(module) for index in range(self.pageContent.propertyTable.rowCount()): parameter = qvariant_converter.getString(self.pageContent.propertyTable.item(index, 0).data(Qt.UserRole)) if "type" not in moduleConfigurations[parameter]["informations"].keys() or moduleConfigurations[parameter]["informations"]["type"] == "int": @@ -124,7 +124,7 @@ class BModulePage(BWizardPage): return unicode(self.pageContent.moduleTable.item(self.pageContent.moduleTable.currentRow(), 1).text()) def _currentModuleConfigurations(self): - return self._configurations(self._currentModule())["configurations"] + return self._configurations(self._currentModule()) def _currentProperty(self): return qvariant_converter.getString(self.pageContent.propertyTable.item(self.pageContent.propertyTable.currentRow(), 0).data(Qt.UserRole)) @@ -136,7 +136,8 @@ class BModulePage(BWizardPage): return unicode(self.pageContent.moduleTable.item(row, 1).text()) def _configurations(self, module): - return self._projectInfoRetrieve("MODULES")[module]["configuration"] + configuration = self._projectInfoRetrieve("MODULES")[module]["configuration"] + return self._projectInfoRetrieve("CONFIGURATIONS")[configuration] def _resetPropertyDescription(self): for index in range(self.pageContent.propertyTable.rowCount()): @@ -145,7 +146,7 @@ class BModulePage(BWizardPage): def _showPropertyDescription(self): self._resetPropertyDescription() - configurations = self._projectInfoRetrieve("CONFIGURATIONS")[self._currentModuleConfigurations()] + configurations = self._currentModuleConfigurations() if self._currentProperty() in configurations.keys(): description = configurations[self._currentProperty()]["description"] name = self._currentProperty() -- 2.25.1