From: batt Date: Wed, 22 Apr 2009 14:21:05 +0000 (+0000) Subject: Move revision to wizard pages; remove version file from repository. X-Git-Tag: 2.1.0~47 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=1f7a65ac5febb0f189a13c2369478085ebe9422d;p=bertos.git Move revision to wizard pages; remove version file from repository. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2635 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/BStartPage.py b/wizard/BStartPage.py index 8a2a15dc..f2bb2f8d 100644 --- a/wizard/BStartPage.py +++ b/wizard/BStartPage.py @@ -14,7 +14,6 @@ from PyQt4.QtGui import * import PyQt4.uic as uic from const import * -from version import wizard_version class BStartPage(QDialog): @@ -22,7 +21,7 @@ class BStartPage(QDialog): QDialog.__init__(self) self.setupUi() self.connectSignals() - self.setWindowTitle(self.tr("Create or edit a BeRTOS project - rev.%1").arg(wizard_version)) + self.setWindowTitle(self.tr("Create or edit a BeRTOS project")) self.initializeButtons() def setupUi(self): diff --git a/wizard/BWizard.py b/wizard/BWizard.py index a4436623..1f794fd3 100644 --- a/wizard/BWizard.py +++ b/wizard/BWizard.py @@ -23,19 +23,24 @@ import BOutputPage import BCreationPage import BFinalPage +try: + from version import wizard_version +except ImportError: + wizard_version = "sandbox" + class BWizard(QWizard): """ Main class of the wizard. It adds the pages automatically. """ - + def __init__(self, page_list): QWizard.__init__(self) - self.setWindowTitle(self.tr("Create a BeRTOS project")) + self.setWindowTitle(self.tr("Create a BeRTOS project - rev.%1").arg(wizard_version)) self.setWindowIcon(QIcon(":/images/appicon.png")) self.setOption(QWizard.DisabledBackButtonOnLastPage, True) self.addPages(page_list) self.connectSignals() - + def addPages(self, page_list): """ Adds the pages in the wizard. @@ -48,7 +53,7 @@ class BWizard(QWizard): Connects the signals with the related slots. """ self.connect(self, SIGNAL("currentIdChanged(int)"), self.pageChanged) - + def pageChanged(self, pageId): """ Slot called when the user change the current page. It calls the reloadData @@ -57,7 +62,7 @@ class BWizard(QWizard): page = self.page(pageId) if page: page.reloadData() - + def project(self): """ Returns the BProject associated with the wizard. diff --git a/wizard/version.py b/wizard/version.py deleted file mode 100644 index c41f6ebb..00000000 --- a/wizard/version.py +++ /dev/null @@ -1 +0,0 @@ -wizard_version = "0000"