Add the path in the version label. Add check for empty strings returned by the QFileD...
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 12 Dec 2008 10:06:29 +0000 (10:06 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 12 Dec 2008 10:06:29 +0000 (10:06 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2017 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BVersionPage.py

index bad8e97d47e62e732c9f524934e8e77361c67c1e..4259d450f6408162e3b8b8140dfbba034f7f3d99 100644 (file)
@@ -24,7 +24,7 @@ class BVersionPage(BWizardPage):
     def _connectSignals(self):
         self.connect(self.pageContent.versionList, SIGNAL("itemClicked(QListWidgetItem *)"), self.itemClicked)
         self.connect(self.pageContent.addButton, SIGNAL("clicked()"), self.addVersion)
-        self.connect(self.pageContent.addButton, SIGNAL("clicked()"), self.removeVersion)
+        self.connect(self.pageContent.removeButton, SIGNAL("clicked()"), self.removeVersion)
         # Fake signal connection for the update button
         self.connect(self.pageContent.updateButton, SIGNAL("clicked()"), self.updateClicked)
     
@@ -35,13 +35,13 @@ class BVersionPage(BWizardPage):
         directory = QFileDialog.getExistingDirectory(self, self.tr("Choose a directory"), QString(), QFileDialog.ShowDirsOnly | QFileDialog.DontResolveSymlinks)
         if isBertosDir(directory):
             version = bertosVersion(directory)
-            self.pageContent.versionList.addItem(QListWidgetItem(QIcon(":/images/ok.png"), version))
-        else:
+            self.pageContent.versionList.addItem(QListWidgetItem(QIcon(":/images/ok.png"), version + " (\"" + directory + "\")"))
+        elif not directory.isEmpty():
             version = "UNCHECKED"
-            self.pageContent.versionList.addItem(QListWidgetItem(QIcon(":/images/warning.png"), version))
+            self.pageContent.versionList.addItem(QListWidgetItem(QIcon(":/images/warning.png"), version + " (\"" + directory + "\")"))
     
     def removeVersion(self):
-        pass
+        self.pageContent.versionList.takeItem(self.pageContent.versionList.currentRow())
     
     def updateClicked(self):
         print "fake update checking"