diff -r 8b8357e0ce4c -r 8dcfd48355df src/eric7/Project/Project.py --- a/src/eric7/Project/Project.py Sun Dec 11 11:04:18 2022 +0100 +++ b/src/eric7/Project/Project.py Sun Dec 11 15:49:23 2022 +0100 @@ -2231,15 +2231,6 @@ if reorganized: # copy the reorganized files back to the project - ##for key in [ - ##"SOURCES", - ##"FORMS", - ##"INTERFACES", - ##"PROTOCOLS", - ##"RESOURCES", - ##"OTHERS", - ##"TRANSLATIONS", - ##]: for fileCategory in self.getFileCategories(): self.__pdata[fileCategory] = newPdata[fileCategory][:] @@ -2256,14 +2247,6 @@ """ olddn = self.getRelativePath(olddn) newdn = self.getRelativePath(newdn) - ##for key in [ - ##"SOURCES", - ##"FORMS", - ##"INTERFACES", - ##"PROTOCOLS", - ##"RESOURCES", - ##"OTHERS", - ##]: for fileCategory in [ c for c in self.getFileCategories() if c != "TRANSLATIONS" ]: @@ -2285,14 +2268,6 @@ olddn = self.getRelativePath(olddn) newdn = self.getRelativePath(newdn) typeStrings = [] - ##for key in [ - ##"SOURCES", - ##"FORMS", - ##"INTERFACES", - ##"PROTOCOLS", - ##"RESOURCES", - ##"OTHERS", - ##]: for fileCategory in [ c for c in self.getFileCategories() if c != "TRANSLATIONS" ]: @@ -2813,6 +2788,17 @@ self.__createEmbeddedEnvironment() self.menuEnvironmentAct.setEnabled(self.__pdata["EMBEDDED_VENV"]) + self.projectOpenedHooks.emit() + self.projectOpened.emit() + + # open the main script + if self.__pdata["MAINSCRIPT"]: + if not os.path.isabs(self.__pdata["MAINSCRIPT"]): + ms = os.path.join(self.ppath, self.__pdata["MAINSCRIPT"]) + else: + ms = self.__pdata["MAINSCRIPT"] + self.sourceFile.emit(ms) + def newProjectAddFiles(self, mainscript): """ Public method to add files to a new project. @@ -4289,9 +4275,8 @@ act.setWhatsThis( self.tr( """<b>Search new files...</b>""" - """<p>This searches for new files (sources, *.ui, *.idl,""" - """ *.proto) in the project directory and registered""" - """ subdirectories.</p>""" + """<p>This searches for new files (sources, forms, ...) in the""" + """ project directory and registered subdirectories.</p>""" ) ) act.triggered.connect(self.__searchNewFiles)