Add preset loading function.
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 19 Apr 2010 08:41:57 +0000 (08:41 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 19 Apr 2010 08:41:57 +0000 (08:41 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3449 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BProject.py

index 866d5be977f15650e86e7fdff941002cd6d2a394..5ecf7f22aefc60c6fafb7f3c6f124402eadfa4b8 100644 (file)
@@ -117,10 +117,8 @@ class BProject(object):
         setEnabledModules(self, project_data["ENABLED_MODULES"])
 
     def loadProjectPresets(self, preset_directory):
-        # This method will save:
-        # "CPU_NAME"
-        # ...
-        pass
+        preset_prj_file = os.path.join(preset_directory, 'project.bertos')
+        preset_data = pickle.loads(open(preset_prj_file, "r").read())
 
     def loadModuleData(self, edit=False):
         module_info_dict = {}