From eab2db56e117f2989b1ad70a44a6ccb025d55cd9 Mon Sep 17 00:00:00 2001 From: duplo Date: Fri, 24 Jul 2009 13:47:18 +0000 Subject: [PATCH] Remove print debug git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2768 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/BEditingDialog.py | 16 ++++++++++++++-- wizard/toolchain_validation.py | 1 - 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/wizard/BEditingDialog.py b/wizard/BEditingDialog.py index 495f358c..b2007fc6 100644 --- a/wizard/BEditingDialog.py +++ b/wizard/BEditingDialog.py @@ -41,6 +41,7 @@ from PyQt4.QtGui import * from bertos_utils import loadBertosProject, bertosVersion, getToolchainName from toolchain_validation import validateToolchain +import qvariant_converter import BModulePage class BEditingDialog(QDialog): @@ -48,6 +49,7 @@ class BEditingDialog(QDialog): def __init__(self, parent=None): QDialog.__init__(self, parent) self.setupUi() + self.connectSignals() self.module_page.reloadData() def setupUi(self): @@ -89,15 +91,25 @@ class BEditingDialog(QDialog): action_group.addAction(action) action.setCheckable(True) action.setChecked(True if toolchain == self.currentToolchain()["path"] else False) + action.setData(qvariant_converter.convertString(toolchain)) def setupVersionMenu(self): self.version_menu = QMenu(self.tr("select BeRTOS version")) action_group = QActionGroup(self.version_menu) - for version in sorted([bertosVersion(v) for v in self.versions()]): + versions = [(path, bertosVersion(path)) for path in self.versions()] + for path, version in versions: action = self.version_menu.addAction(version) action_group.addAction(action) action.setCheckable(True) - action.setChecked(True if unicode(action.text()) == self.currentVersion() else False) + action.setChecked(True if path == self.currentVersion() else False) + action.setData(qvariant_converter.convertString(path)) + self.connect(action, SIGNAL("triggered(bool)"), lambda: self.versionChanged(path)) + + def toolchainChanged(self, toolchain): + print toolchain + + def versionChanged(self, version): + print version def toolchains(self): return self.module_page.toolchains() diff --git a/wizard/toolchain_validation.py b/wizard/toolchain_validation.py index f70b1f9d..44ca6d41 100644 --- a/wizard/toolchain_validation.py +++ b/wizard/toolchain_validation.py @@ -53,7 +53,6 @@ def validateToolchain(toolchain): if validation_process.waitForFinished(200): description = unicode(validation_process.readAllStandardError()) info = bertos_utils.getToolchainInfo(description) - print info if len(info) >= 4: return True, info else: -- 2.25.1