Modify the API of the BModulePage class
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 27 Jan 2009 14:29:24 +0000 (14:29 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 27 Jan 2009 14:29:24 +0000 (14:29 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2228 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BModulePage.py

index 9ee813ada3c922b630323fdd3d9f50867b0257c6..7fca118bb465e4f1a72b21c163f1d7800f22edbb 100644 (file)
@@ -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()