src/eric7/Project/ProjectTranslationsBrowser.py

branch
server
changeset 10708
a6094987c1be
parent 10704
27d21e5163b8
child 11050
f0b91a949398
equal deleted inserted replaced
10707:3df56b1c9570 10708:a6094987c1be
766 766
767 def __showContextMenuDir(self): 767 def __showContextMenuDir(self):
768 """ 768 """
769 Private slot called by the dirMenu aboutToShow signal. 769 Private slot called by the dirMenu aboutToShow signal.
770 """ 770 """
771 if ( 771 if FileSystemUtilities.isPlainFileName(
772 FileSystemUtilities.isPlainFileName(self.project.getProjectPath()) 772 self.project.getProjectPath()
773 and self.project.getProjectType() in [ 773 ) and self.project.getProjectType() in [
774 "PyQt5", 774 "PyQt5",
775 "PyQt5C", 775 "PyQt5C",
776 "PyQt6", 776 "PyQt6",
777 "PyQt6C", 777 "PyQt6C",
778 "E7Plugin", 778 "E7Plugin",
779 "PySide2", 779 "PySide2",
780 "PySide2C", 780 "PySide2C",
781 "PySide6", 781 "PySide6",
782 "PySide6C", 782 "PySide6C",
783 ] 783 ]:
784 ):
785 if self.pylupdateProcRunning: 784 if self.pylupdateProcRunning:
786 for act in self.tsprocDirMenuActions: 785 for act in self.tsprocDirMenuActions:
787 act.setEnabled(False) 786 act.setEnabled(False)
788 if self.lreleaseProcRunning: 787 if self.lreleaseProcRunning:
789 for act in self.qmprocDirMenuActions: 788 for act in self.qmprocDirMenuActions:
798 797
799 def __showContextMenuBack(self): 798 def __showContextMenuBack(self):
800 """ 799 """
801 Private slot called by the backMenu aboutToShow signal. 800 Private slot called by the backMenu aboutToShow signal.
802 """ 801 """
803 if ( 802 if FileSystemUtilities.isPlainFileName(
804 FileSystemUtilities.isPlainFileName(self.project.getProjectPath()) 803 self.project.getProjectPath()
805 and self.project.getProjectType() in [ 804 ) and self.project.getProjectType() in [
806 "PyQt5", 805 "PyQt5",
807 "PyQt5C", 806 "PyQt5C",
808 "PyQt6", 807 "PyQt6",
809 "PyQt6C", 808 "PyQt6C",
810 "E7Plugin", 809 "E7Plugin",
811 "PySide2", 810 "PySide2",
812 "PySide2C", 811 "PySide2C",
813 "PySide6", 812 "PySide6",
814 "PySide6C", 813 "PySide6C",
815 ] 814 ]:
816 ):
817 if self.pylupdateProcRunning: 815 if self.pylupdateProcRunning:
818 for act in self.tsprocBackMenuActions: 816 for act in self.tsprocBackMenuActions:
819 act.setEnabled(False) 817 act.setEnabled(False)
820 if self.lreleaseProcRunning: 818 if self.lreleaseProcRunning:
821 for act in self.qmprocBackMenuActions: 819 for act in self.qmprocBackMenuActions:
840 for itm in itmList: 838 for itm in itmList:
841 if isinstance(itm, ProjectBrowserFileItem): 839 if isinstance(itm, ProjectBrowserFileItem):
842 # hook support 840 # hook support
843 if self.hooks["open"] is not None: 841 if self.hooks["open"] is not None:
844 self.hooks["open"](itm.fileName()) 842 self.hooks["open"](itm.fileName())
845 elif ( 843 elif itm.isLinguistFile() and FileSystemUtilities.isPlainFileName(
846 itm.isLinguistFile() 844 itm.fileName()
847 and FileSystemUtilities.isPlainFileName(itm.fileName())
848 ): 845 ):
849 if itm.fileExt() == ".ts": 846 if itm.fileExt() == ".ts":
850 self.linguistFile.emit(itm.fileName()) 847 self.linguistFile.emit(itm.fileName())
851 else: 848 else:
852 self.trpreview.emit([itm.fileName()]) 849 self.trpreview.emit([itm.fileName()])

eric ide

mercurial