438 |
439 |
439 @param exitCode exit code of the process (integer) |
440 @param exitCode exit code of the process (integer) |
440 @param exitStatus exit status of the process (QProcess.ExitStatus) |
441 @param exitStatus exit status of the process (QProcess.ExitStatus) |
441 """ |
442 """ |
442 self.compileRunning = False |
443 self.compileRunning = False |
|
444 ui = e5App().getObject("UserInterface") |
443 if exitStatus == QProcess.NormalExit and exitCode == 0: |
445 if exitStatus == QProcess.NormalExit and exitCode == 0: |
444 path = os.path.dirname(self.idlFile) |
446 path = os.path.dirname(self.idlFile) |
445 poaList = glob.glob(os.path.join(path, "*__POA")) |
447 poaList = glob.glob(os.path.join(path, "*__POA")) |
446 npoaList = [f.replace("__POA", "") for f in poaList] |
448 npoaList = [f.replace("__POA", "") for f in poaList] |
447 fileList = glob.glob(os.path.join(path, "*_idl.py")) |
449 fileList = glob.glob(os.path.join(path, "*_idl.py")) |
448 for dir in poaList + npoaList: |
450 for dir in poaList + npoaList: |
449 fileList += Utilities.direntries(dir, True, "*.py") |
451 fileList += Utilities.direntries(dir, True, "*.py") |
450 for file in fileList: |
452 for file in fileList: |
451 self.project.appendFile(file) |
453 self.project.appendFile(file) |
452 if not self.noDialog: |
454 if not self.noDialog and not ui.notificationsEnabled(): |
453 E5MessageBox.information(self, |
455 E5MessageBox.information(self, |
|
456 self.trUtf8("Interface Compilation"), |
|
457 self.trUtf8("The compilation of the interface file was successful.")) |
|
458 else: |
|
459 ui.showNotification(UI.PixmapCache.getPixmap("corba48.png"), |
454 self.trUtf8("Interface Compilation"), |
460 self.trUtf8("Interface Compilation"), |
455 self.trUtf8("The compilation of the interface file was successful.")) |
461 self.trUtf8("The compilation of the interface file was successful.")) |
456 else: |
462 else: |
457 if not self.noDialog: |
463 if not self.noDialog: |
458 E5MessageBox.information(self, |
464 E5MessageBox.information(self, |
|
465 self.trUtf8("Interface Compilation"), |
|
466 self.trUtf8("The compilation of the interface file failed.")) |
|
467 else: |
|
468 ui.showNotification(UI.PixmapCache.getPixmap("corba48.png"), |
459 self.trUtf8("Interface Compilation"), |
469 self.trUtf8("Interface Compilation"), |
460 self.trUtf8("The compilation of the interface file failed.")) |
470 self.trUtf8("The compilation of the interface file failed.")) |
461 self.compileProc = None |
471 self.compileProc = None |
462 |
472 |
463 def __compileIDL(self, fn, noDialog=False, progress=None): |
473 def __compileIDL(self, fn, noDialog=False, progress=None): |