--- a/src/eric7/Project/ProjectSourcesBrowser.py Wed Nov 23 16:07:16 2022 +0100 +++ b/src/eric7/Project/ProjectSourcesBrowser.py Thu Nov 24 11:51:40 2022 +0100 @@ -98,6 +98,7 @@ ProjectBrowserRepositoryItem( projectBrowser=self, projectBrowserUserString=self.tr("Sources Browser"), + priority=100, fileCategory="SOURCES", getIcon=self.getIcon, ), @@ -139,7 +140,27 @@ @return icon for the browser @rtype QIcon """ - return EricPixmapCache.getIcon("projectSources") + if not self.project.isOpen(): + icon = EricPixmapCache.getIcon("projectSources") + else: + if self.project.getProjectLanguage() == "Python3": + if self.project.isMixedLanguageProject(): + icon = EricPixmapCache.getIcon("projectSourcesPyMixed") + else: + icon = EricPixmapCache.getIcon("projectSourcesPy") + elif self.project.getProjectLanguage() == "MicroPython": + icon = EricPixmapCache.getIcon("micropython") + elif self.project.getProjectLanguage() == "Ruby": + if self.project.isMixedLanguageProject(): + icon = EricPixmapCache.getIcon("projectSourcesRbMixed") + else: + icon = EricPixmapCache.getIcon("projectSourcesRb") + elif self.project.getProjectLanguage() == "JavaScript": + icon = EricPixmapCache.getIcon("projectSourcesJavaScript") + else: + icon = EricPixmapCache.getIcon("projectSources") + + return icon def __closeAllWindows(self): """