From: duplo Date: Tue, 5 Oct 2010 08:45:51 +0000 (+0000) Subject: Add progress dialog when loading existing projects. X-Git-Tag: 2.6.0~5^2~117 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=5241c655f1e3d27fa42b4d0c6adadfaec43267fc;p=bertos.git Add progress dialog when loading existing projects. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4403 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/bertos.py b/wizard/bertos.py index a404cb23..1608334c 100755 --- a/wizard/bertos.py +++ b/wizard/bertos.py @@ -82,12 +82,16 @@ def newProject(): def editProject(project_file): info_dict = {} + # Progress dialog. + p_dialog = QProgressDialog(QApplication.instance().tr("Wait project loading"), QApplication.instance().tr("Cancel"), 0, 0) while(True): + p_dialog.show() # Empty project is the default fallback. QApplication.instance().project = BProject() try: QApplication.instance().project = BProject(project_file, info_dict) except VersionException: + p_dialog.hide() QMessageBox.critical( None, QObject().tr("BeRTOS version not found!"), @@ -99,6 +103,7 @@ def editProject(project_file): info_dict["BERTOS_PATH"] = version continue except ToolchainException, exc: + p_dialog.hide() QMessageBox.critical( None, QObject().tr("Toolchain not found!"), @@ -112,6 +117,7 @@ def editProject(project_file): continue break dialog = BEditingDialog() + p_dialog.hide() dialog.exec_() def main():