Remove print debug
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 24 Jul 2009 13:47:18 +0000 (13:47 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 24 Jul 2009 13:47:18 +0000 (13:47 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2768 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BEditingDialog.py
wizard/toolchain_validation.py

index 495f358ce5746b0ee3e50cad43bcb511444497c7..b2007fc647020fd54a2090882f1bdbae800289ed 100644 (file)
@@ -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()
index f70b1f9df5877bfa31a682224a09af87fcb84498..44ca6d41b1df5769899aa5f56d00e6071bcc07a4 100644 (file)
@@ -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: