96 projectBrowser.addTypedProjectBrowser( |
96 projectBrowser.addTypedProjectBrowser( |
97 "sources", |
97 "sources", |
98 ProjectBrowserRepositoryItem( |
98 ProjectBrowserRepositoryItem( |
99 projectBrowser=self, |
99 projectBrowser=self, |
100 projectBrowserUserString=self.tr("Sources Browser"), |
100 projectBrowserUserString=self.tr("Sources Browser"), |
|
101 priority=100, |
101 fileCategory="SOURCES", |
102 fileCategory="SOURCES", |
102 getIcon=self.getIcon, |
103 getIcon=self.getIcon, |
103 ), |
104 ), |
104 ) |
105 ) |
105 |
106 |
137 Public method to get an icon for the project browser. |
138 Public method to get an icon for the project browser. |
138 |
139 |
139 @return icon for the browser |
140 @return icon for the browser |
140 @rtype QIcon |
141 @rtype QIcon |
141 """ |
142 """ |
142 return EricPixmapCache.getIcon("projectSources") |
143 if not self.project.isOpen(): |
|
144 icon = EricPixmapCache.getIcon("projectSources") |
|
145 else: |
|
146 if self.project.getProjectLanguage() == "Python3": |
|
147 if self.project.isMixedLanguageProject(): |
|
148 icon = EricPixmapCache.getIcon("projectSourcesPyMixed") |
|
149 else: |
|
150 icon = EricPixmapCache.getIcon("projectSourcesPy") |
|
151 elif self.project.getProjectLanguage() == "MicroPython": |
|
152 icon = EricPixmapCache.getIcon("micropython") |
|
153 elif self.project.getProjectLanguage() == "Ruby": |
|
154 if self.project.isMixedLanguageProject(): |
|
155 icon = EricPixmapCache.getIcon("projectSourcesRbMixed") |
|
156 else: |
|
157 icon = EricPixmapCache.getIcon("projectSourcesRb") |
|
158 elif self.project.getProjectLanguage() == "JavaScript": |
|
159 icon = EricPixmapCache.getIcon("projectSourcesJavaScript") |
|
160 else: |
|
161 icon = EricPixmapCache.getIcon("projectSources") |
|
162 |
|
163 return icon |
143 |
164 |
144 def __closeAllWindows(self): |
165 def __closeAllWindows(self): |
145 """ |
166 """ |
146 Private method to close all project related windows. |
167 Private method to close all project related windows. |
147 """ |
168 """ |