14 from E4Gui.E4Application import e4App |
14 from E4Gui.E4Application import e4App |
15 |
15 |
16 from E4Gui.E4Action import E4Action |
16 from E4Gui.E4Action import E4Action |
17 |
17 |
18 from CheckerPlugins.Tabnanny.TabnannyDialog import TabnannyDialog |
18 from CheckerPlugins.Tabnanny.TabnannyDialog import TabnannyDialog |
|
19 |
|
20 import Preferences |
19 |
21 |
20 # Start-Of-Header |
22 # Start-Of-Header |
21 name = "Tabnanny Plugin" |
23 name = "Tabnanny Plugin" |
22 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
24 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
23 autoactivate = True |
25 autoactivate = True |
178 """ |
180 """ |
179 Public slot used to check the project files for bad indentations. |
181 Public slot used to check the project files for bad indentations. |
180 """ |
182 """ |
181 project = e4App().getObject("Project") |
183 project = e4App().getObject("Project") |
182 project.saveAllScripts() |
184 project.saveAllScripts() |
183 # TODO: make this dependant on configured extensions |
|
184 files = [os.path.join(project.ppath, file) \ |
185 files = [os.path.join(project.ppath, file) \ |
185 for file in project.pdata["SOURCES"] \ |
186 for file in project.pdata["SOURCES"] \ |
186 if file.endswith(".py") or \ |
187 if file.endswith(tuple(Preferences.getPython("Python3Extensions")))] |
187 file.endswith(".pyw") or \ |
|
188 file.endswith(".ptl")] |
|
189 |
188 |
190 self.__projectTabnannyDialog = TabnannyDialog() |
189 self.__projectTabnannyDialog = TabnannyDialog() |
191 self.__projectTabnannyDialog.show() |
190 self.__projectTabnannyDialog.show() |
192 self.__projectTabnannyDialog.start(files) |
191 self.__projectTabnannyDialog.start(files) |
193 |
192 |