From: duplo Date: Tue, 30 Mar 2010 10:58:57 +0000 (+0000) Subject: Remember the plugin selection. X-Git-Tag: 2.5.0~582 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=89e170783dcac57b969ed80881c307b4a5a88584;p=bertos.git Remember the plugin selection. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3326 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/BOutputPage.py b/wizard/BOutputPage.py index dcfcf389..77ef748c 100644 --- a/wizard/BOutputPage.py +++ b/wizard/BOutputPage.py @@ -71,11 +71,14 @@ class BOutputPage(BWizardPage): "Classic BeRTOS makefile based project", True, False) scrollLayout.addWidget(group) + plugin_list = self.plugins() for plugin in self.availablePlugins(): module = bertos_utils.loadPlugin(plugin) + selected = False + if plugin in plugin_list: selected = True group, check = self.createNewOutput(module.PLUGIN_NAME, module.PLUGIN_DESCRIPTION, - True, True) + selected, True) scrollLayout.addWidget(group) self._plugin_dict[check] = plugin scrollLayout.addStretch() @@ -101,6 +104,7 @@ class BOutputPage(BWizardPage): for checkBox, plugin in self._plugin_dict.items(): if checkBox.checkState() == Qt.Checked: plugins.append(plugin) + self.setPlugins(plugins) self.setProjectInfo("OUTPUT", plugins) #### diff --git a/wizard/BWizardPage.py b/wizard/BWizardPage.py index be667562..5c4b4bb9 100644 --- a/wizard/BWizardPage.py +++ b/wizard/BWizardPage.py @@ -107,6 +107,18 @@ class BWizardPage(QWizardPage): Value is a QVariant and neet to be converted in a standard type. """ return QApplication.instance().settings.value(QString(key), QVariant()) + + def plugins(self): + """ + Returns the list of actived plugins. + """ + return qvariant_converter.getStringList(self.settingsRetrieve("plugins")) + + def setPlugins(self, plugins): + """ + Stores the given list of actived plugins. + """ + self.settingsStore("plugins", qvariant_converter.convertStringList(plugins)) def versions(self): """