124 if self.lastFN != fn: |
124 if self.lastFN != fn: |
125 self.lastFN = fn |
125 self.lastFN = fn |
126 win.show() |
126 win.show() |
127 if win.hasSyntaxErrors(): |
127 if win.hasSyntaxErrors(): |
128 self.__setSubWindowIcon(win, UI.PixmapCache.getIcon("syntaxError.png")) |
128 self.__setSubWindowIcon(win, UI.PixmapCache.getIcon("syntaxError.png")) |
|
129 elif win.hasFlakesWarnings(): |
|
130 self.__setSubWindowIcon(win, UI.PixmapCache.getIcon("warning.png")) |
129 else: |
131 else: |
130 self.__setSubWindowIcon(win, UI.PixmapCache.getIcon("empty.png")) |
132 self.__setSubWindowIcon(win, UI.PixmapCache.getIcon("empty.png")) |
131 |
133 |
132 # Make the editor window a little bit smaller to make the whole |
134 # Make the editor window a little bit smaller to make the whole |
133 # window with all decorations visible. This is not the most elegant |
135 # window with all decorations visible. This is not the most elegant |
299 """ |
301 """ |
300 if m: |
302 if m: |
301 self.__setSubWindowIcon(editor, UI.PixmapCache.getIcon("fileModified.png")) |
303 self.__setSubWindowIcon(editor, UI.PixmapCache.getIcon("fileModified.png")) |
302 elif editor.hasSyntaxErrors(): |
304 elif editor.hasSyntaxErrors(): |
303 self.__setSubWindowIcon(editor, UI.PixmapCache.getIcon("syntaxError.png")) |
305 self.__setSubWindowIcon(editor, UI.PixmapCache.getIcon("syntaxError.png")) |
|
306 elif editor.hasFlakesWarnings(): |
|
307 self.__setSubWindowIcon(editor, UI.PixmapCache.getIcon("warning.png")) |
304 else: |
308 else: |
305 self.__setSubWindowIcon(editor, UI.PixmapCache.getIcon("empty.png")) |
309 self.__setSubWindowIcon(editor, UI.PixmapCache.getIcon("empty.png")) |
306 self._checkActions(editor) |
310 self._checkActions(editor) |
307 |
311 |
308 def _syntaxErrorToggled(self, editor): |
312 def _syntaxErrorToggled(self, editor): |
311 |
315 |
312 @param editor editor that sent the signal |
316 @param editor editor that sent the signal |
313 """ |
317 """ |
314 if editor.hasSyntaxErrors(): |
318 if editor.hasSyntaxErrors(): |
315 self.__setSubWindowIcon(editor, UI.PixmapCache.getIcon("syntaxError.png")) |
319 self.__setSubWindowIcon(editor, UI.PixmapCache.getIcon("syntaxError.png")) |
|
320 elif editor.hasFlakesWarnings(): |
|
321 self.__setSubWindowIcon(editor, UI.PixmapCache.getIcon("warning.png")) |
316 else: |
322 else: |
317 self.__setSubWindowIcon(editor, UI.PixmapCache.getIcon("empty.png")) |
323 self.__setSubWindowIcon(editor, UI.PixmapCache.getIcon("empty.png")) |
318 |
324 |
319 ViewManager._syntaxErrorToggled(self, editor) |
325 ViewManager._syntaxErrorToggled(self, editor) |
320 |
326 |