817 "Mixed" if self.__pdata["MIXEDLANGUAGE"] else self.__pdata["PROGLANGUAGE"] |
817 "Mixed" if self.__pdata["MIXEDLANGUAGE"] else self.__pdata["PROGLANGUAGE"] |
818 ) |
818 ) |
819 for ext in self.__sourceExtensions(sourceKey): |
819 for ext in self.__sourceExtensions(sourceKey): |
820 self.__pdata["FILETYPES"]["*{0}".format(ext)] = "SOURCES" |
820 self.__pdata["FILETYPES"]["*{0}".format(ext)] = "SOURCES" |
821 |
821 |
822 # IDL interfaces |
|
823 self.__pdata["FILETYPES"]["*.idl"] = "INTERFACES" |
|
824 |
|
825 # Protobuf Files |
|
826 self.__pdata["FILETYPES"]["*.proto"] = "PROTOCOLS" |
|
827 |
|
828 # Forms |
822 # Forms |
829 if self.__pdata["PROJECTTYPE"] in [ |
823 if self.__pdata["PROJECTTYPE"] in [ |
830 "E7Plugin", |
824 "E7Plugin", |
831 "PyQt5", |
825 "PyQt5", |
832 "PyQt6", |
826 "PyQt6", |
859 "PySide6C", |
853 "PySide6C", |
860 ]: |
854 ]: |
861 self.__pdata["FILETYPES"]["*.ts"] = "TRANSLATIONS" |
855 self.__pdata["FILETYPES"]["*.ts"] = "TRANSLATIONS" |
862 self.__pdata["FILETYPES"]["*.qm"] = "TRANSLATIONS" |
856 self.__pdata["FILETYPES"]["*.qm"] = "TRANSLATIONS" |
863 |
857 |
|
858 # File categories handled by activated plugin project browsers |
|
859 for fileCategory in [ |
|
860 f for f in self.__fileCategoriesRepository.keys() if f not in [ |
|
861 "SOURCES", "FORMS", "RESOURCES", "TRANSLATIONS", "OTHERS" |
|
862 ] |
|
863 ]: |
|
864 for ext in self.__fileCategoriesRepository[ |
|
865 fileCategory |
|
866 ].fileCategoryExtensions: |
|
867 self.__pdata["FILETYPES"][ext] = fileCategory |
864 # Project type specific ones |
868 # Project type specific ones |
865 with contextlib.suppress(KeyError): |
869 with contextlib.suppress(KeyError): |
866 if self.__fileTypeCallbacks[self.__pdata["PROJECTTYPE"]] is not None: |
870 if self.__fileTypeCallbacks[self.__pdata["PROJECTTYPE"]] is not None: |
867 ftypes = self.__fileTypeCallbacks[self.__pdata["PROJECTTYPE"]]() |
871 ftypes = self.__fileTypeCallbacks[self.__pdata["PROJECTTYPE"]]() |
868 self.__pdata["FILETYPES"].update(ftypes) |
872 self.__pdata["FILETYPES"].update(ftypes) |
2460 from .PropertiesDialog import PropertiesDialog |
2464 from .PropertiesDialog import PropertiesDialog |
2461 |
2465 |
2462 if not self.checkDirty(): |
2466 if not self.checkDirty(): |
2463 return |
2467 return |
2464 |
2468 |
2465 dlg = PropertiesDialog(self, True) |
2469 dlg = PropertiesDialog(self, new=True) |
2466 if dlg.exec() == QDialog.DialogCode.Accepted: |
2470 if dlg.exec() == QDialog.DialogCode.Accepted: |
2467 self.closeProject() |
2471 self.closeProject() |
2468 |
2472 |
2469 # reset the auto save flag |
2473 # reset the auto save flag |
2470 autoSaveProject = Preferences.getProject("AutoSaveProject") |
2474 autoSaveProject = Preferences.getProject("AutoSaveProject") |
2907 """ |
2911 """ |
2908 Private slot to display the properties dialog. |
2912 Private slot to display the properties dialog. |
2909 """ |
2913 """ |
2910 from .PropertiesDialog import PropertiesDialog |
2914 from .PropertiesDialog import PropertiesDialog |
2911 |
2915 |
2912 dlg = PropertiesDialog(self, False) |
2916 dlg = PropertiesDialog(self, new=False) |
2913 if dlg.exec() == QDialog.DialogCode.Accepted: |
2917 if dlg.exec() == QDialog.DialogCode.Accepted: |
2914 projectType = self.__pdata["PROJECTTYPE"] |
2918 projectType = self.__pdata["PROJECTTYPE"] |
2915 dlg.storeData() |
2919 dlg.storeData() |
2916 self.setDirty(True) |
2920 self.setDirty(True) |
2917 if self.__pdata["MAINSCRIPT"]: |
2921 if self.__pdata["MAINSCRIPT"]: |