eric6/Project/ProjectBrowser.py

changeset 7265
0665c4d509c9
parent 7229
53054eb5b15a
child 7360
9190402e4505
equal deleted inserted replaced
7264:bedbe458d792 7265:0665c4d509c9
16 from E5Gui.E5Led import E5ClickableLed 16 from E5Gui.E5Led import E5ClickableLed
17 17
18 import UI.PixmapCache 18 import UI.PixmapCache
19 import Preferences 19 import Preferences
20 20
21 from .ProjectBrowserFlags import SourcesBrowserFlag, FormsBrowserFlag, \ 21 from .ProjectBrowserFlags import (
22 ResourcesBrowserFlag, TranslationsBrowserFlag, InterfacesBrowserFlag, \ 22 SourcesBrowserFlag, FormsBrowserFlag, ResourcesBrowserFlag,
23 OthersBrowserFlag, ProtocolsBrowserFlag, AllBrowsersFlag 23 TranslationsBrowserFlag, InterfacesBrowserFlag, OthersBrowserFlag,
24 ProtocolsBrowserFlag, AllBrowsersFlag
25 )
24 26
25 27
26 class ProjectBrowser(E5TabWidget): 28 class ProjectBrowser(E5TabWidget):
27 """ 29 """
28 Class implementing the project browser part of the eric6 UI. 30 Class implementing the project browser part of the eric6 UI.
279 Private method to set the right icon for the sources browser tab. 281 Private method to set the right icon for the sources browser tab.
280 """ 282 """
281 if not self.project.isOpen(): 283 if not self.project.isOpen():
282 icon = UI.PixmapCache.getIcon("projectSources.png") 284 icon = UI.PixmapCache.getIcon("projectSources.png")
283 else: 285 else:
284 if self.project.getProjectLanguage() in \ 286 if self.project.getProjectLanguage() in [
285 ["Python", "Python2", "Python3"]: 287 "Python", "Python2", "Python3"
288 ]:
286 if self.project.isMixedLanguageProject(): 289 if self.project.isMixedLanguageProject():
287 icon = UI.PixmapCache.getIcon("projectSourcesPyMixed.png") 290 icon = UI.PixmapCache.getIcon("projectSourcesPyMixed.png")
288 else: 291 else:
289 icon = UI.PixmapCache.getIcon("projectSourcesPy.png") 292 icon = UI.PixmapCache.getIcon("projectSourcesPy.png")
290 elif self.project.getProjectLanguage() == "MicroPython": 293 elif self.project.getProjectLanguage() == "MicroPython":
323 Public slot to handle the editorLineChanged signal. 326 Public slot to handle the editorLineChanged signal.
324 327
325 @param fn filename of the changed file (string) 328 @param fn filename of the changed file (string)
326 @param lineno one based line number of the item (integer) 329 @param lineno one based line number of the item (integer)
327 """ 330 """
328 if Preferences.getProject("FollowEditor") and \ 331 if (
329 Preferences.getProject("FollowCursorLine"): 332 Preferences.getProject("FollowEditor") and
333 Preferences.getProject("FollowCursorLine")
334 ):
330 if self.project.isProjectSource(fn): 335 if self.project.isProjectSource(fn):
331 self.psBrowser.selectFileLine(fn, lineno) 336 self.psBrowser.selectFileLine(fn, lineno)
332 337
333 def getProjectBrowsers(self): 338 def getProjectBrowsers(self):
334 """ 339 """

eric ide

mercurial