Remember the plugin selection.
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 30 Mar 2010 10:58:57 +0000 (10:58 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 30 Mar 2010 10:58:57 +0000 (10:58 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3326 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BOutputPage.py
wizard/BWizardPage.py

index dcfcf38918ae423710f01e4afd3d183fc2c613f5..77ef748cdb9132dd82fbbc2a7ee799344d95dbcb 100644 (file)
@@ -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)
 
     ####
index be66756206897d489e8c33cb82187f4340e7e65b..5c4b4bb9650f42d4dd1da35376d26bf7625c03c8 100644 (file)
@@ -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):
         """