Add progress dialog when loading existing projects.
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 5 Oct 2010 08:45:51 +0000 (08:45 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 5 Oct 2010 08:45:51 +0000 (08:45 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4403 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/bertos.py

index a404cb23556fa35c9abbe00c9737eeaf467fde7a..1608334c57c2904a32362d09194982cae1c72f2d 100755 (executable)
@@ -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():