From: duplo Date: Fri, 19 Dec 2008 09:28:57 +0000 (+0000) Subject: Add the self.tr() to the window title X-Git-Tag: 2.1.0~585 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=2c61320249bd075d7ca29c0848f7435e54953d3e;p=bertos.git Add the self.tr() to the window title git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2097 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/BWizard.py b/wizard/BWizard.py index b7490667..b543966d 100644 --- a/wizard/BWizard.py +++ b/wizard/BWizard.py @@ -20,7 +20,7 @@ class BWizard(QWizard): def __init__(self): QWizard.__init__(self) - self.setWindowTitle("Create a BeRTOS project") + self.setWindowTitle(self.tr("Create a BeRTOS project")) self._addPages() self._connectSignals() diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index e5a21d9b..fd199632 100644 --- a/wizard/bertos_utils.py +++ b/wizard/bertos_utils.py @@ -24,10 +24,19 @@ def createBertosProject(directory): open(directory + "/project.bertos", "w") def findDefinitions(ftype, path): - l = os.walk(path) - definitions = {} - for element in l: + L = os.walk(path) + for element in L: for filename in element[2]: if fnmatch.fnmatch(filename, "*." + ftype): - definitions[filename] = element[0] - return definitions \ No newline at end of file + yield (filename, element[0]) + +def loadCpuInfos(path): + cpuInfos = [] + for definition in findDefinitions("cdef", path): + D = {} + def include(filename, dict = D, directory=definition[1]): + execfile(directory + "/" + filename, {}, D) + d["include"] = include + include(definition[0], D) + cpuInfos.append(D) + return cpuInfos