eric6/Project/ProjectProtocolsBrowser.py

changeset 7955
567f2ec958c3
parent 7923
91e843545d9a
child 7959
44e15eda6506
equal deleted inserted replaced
7954:d32319ede131 7955:567f2ec958c3
545 fileList = glob.glob(os.path.join(path, "*_pb2.py")) 545 fileList = glob.glob(os.path.join(path, "*_pb2.py"))
546 if grpc: 546 if grpc:
547 fileList += glob.glob(os.path.join(path, "*_pb2_grpc.py")) 547 fileList += glob.glob(os.path.join(path, "*_pb2_grpc.py"))
548 for file in fileList: 548 for file in fileList:
549 self.project.appendFile(file) 549 self.project.appendFile(file)
550 if not self.noDialog and not ui.notificationsEnabled(): 550 if grpc:
551 E5MessageBox.information( 551 icon = UI.PixmapCache.getPixmap("gRPC48")
552 self,
553 self.tr("Protocol Compilation"),
554 self.tr(
555 "The compilation of the protocol file was"
556 " successful."))
557 else: 552 else:
558 if grpc: 553 icon = UI.PixmapCache.getPixmap("protobuf48")
559 icon = UI.PixmapCache.getPixmap("gRPC48") 554 ui.showNotification(
560 else: 555 icon,
561 icon = UI.PixmapCache.getPixmap("protobuf48") 556 self.tr("Protocol Compilation"),
562 ui.showNotification( 557 self.tr(
563 icon, 558 "The compilation of the protocol file was"
564 self.tr("Protocol Compilation"), 559 " successful."))
565 self.tr(
566 "The compilation of the protocol file was"
567 " successful."))
568 else: 560 else:
569 if not self.noDialog: 561 if grpc:
570 E5MessageBox.information( 562 icon = UI.PixmapCache.getPixmap("gRPC48")
571 self,
572 self.tr("Protocol Compilation"),
573 self.tr(
574 "The compilation of the protocol file failed."))
575 else: 563 else:
576 if grpc: 564 icon = UI.PixmapCache.getPixmap("protobuf48")
577 icon = UI.PixmapCache.getPixmap("gRPC48") 565 ui.showNotification(
578 else: 566 icon,
579 icon = UI.PixmapCache.getPixmap("protobuf48") 567 self.tr("Protocol Compilation"),
580 ui.showNotification( 568 self.tr(
581 icon, 569 "The compilation of the protocol file failed."),
582 self.tr("Protocol Compilation"), 570 timeout=0)
583 self.tr(
584 "The compilation of the protocol file failed."))
585 self.compileProc = None 571 self.compileProc = None
586 572
587 def __compileProto(self, fn, noDialog=False, progress=None, grpc=False): 573 def __compileProto(self, fn, noDialog=False, progress=None, grpc=False):
588 """ 574 """
589 Private method to compile a .proto file to Python. 575 Private method to compile a .proto file to Python.

eric ide

mercurial