Project/ProjectInterfacesBrowser.py

changeset 2192
61b3849df76d
parent 1509
c0b5e693b0eb
child 2302
f29e9405c851
equal deleted inserted replaced
2191:7c7251ce9497 2192:61b3849df76d
22 from .ProjectBaseBrowser import ProjectBaseBrowser 22 from .ProjectBaseBrowser import ProjectBaseBrowser
23 23
24 from UI.BrowserModel import BrowserFileItem, BrowserClassItem, BrowserMethodItem, \ 24 from UI.BrowserModel import BrowserFileItem, BrowserClassItem, BrowserMethodItem, \
25 BrowserClassAttributeItem 25 BrowserClassAttributeItem
26 from UI.DeleteFilesConfirmationDialog import DeleteFilesConfirmationDialog 26 from UI.DeleteFilesConfirmationDialog import DeleteFilesConfirmationDialog
27 import UI.PixmapCache
27 28
28 import Preferences 29 import Preferences
29 import Utilities 30 import Utilities
30 31
31 32
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):

eric ide

mercurial