From 7ee023931b68fe84027fa203b4a4f1a506434263 Mon Sep 17 00:00:00 2001 From: duplo Date: Fri, 12 Dec 2008 10:06:29 +0000 Subject: [PATCH] Add the path in the version label. Add check for empty strings returned by the QFileDialog. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2017 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/BVersionPage.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wizard/BVersionPage.py b/wizard/BVersionPage.py index bad8e97d..4259d450 100644 --- a/wizard/BVersionPage.py +++ b/wizard/BVersionPage.py @@ -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" -- 2.25.1