Plugins/PluginTabnanny.py

changeset 3190
a9a94491c4fd
parent 3180
2ed66f1e69fd
child 3345
071afe8be2a1
equal deleted inserted replaced
3189:9a21c547de5f 3190:a9a94491c4fd
71 @return tuple of None and activation status (boolean) 71 @return tuple of None and activation status (boolean)
72 """ 72 """
73 menu = e5App().getObject("Project").getMenu("Checks") 73 menu = e5App().getObject("Project").getMenu("Checks")
74 if menu: 74 if menu:
75 self.__projectAct = E5Action( 75 self.__projectAct = E5Action(
76 self.trUtf8('Check Indentations'), 76 self.tr('Check Indentations'),
77 self.trUtf8('&Indentations...'), 0, 0, 77 self.tr('&Indentations...'), 0, 0,
78 self, 'project_check_indentations') 78 self, 'project_check_indentations')
79 self.__projectAct.setStatusTip( 79 self.__projectAct.setStatusTip(
80 self.trUtf8('Check indentations using tabnanny.')) 80 self.tr('Check indentations using tabnanny.'))
81 self.__projectAct.setWhatsThis(self.trUtf8( 81 self.__projectAct.setWhatsThis(self.tr(
82 """<b>Check Indentations...</b>""" 82 """<b>Check Indentations...</b>"""
83 """<p>This checks Python files""" 83 """<p>This checks Python files"""
84 """ for bad indentations using tabnanny.</p>""" 84 """ for bad indentations using tabnanny.</p>"""
85 )) 85 ))
86 self.__projectAct.triggered[()].connect(self.__projectTabnanny) 86 self.__projectAct.triggered[()].connect(self.__projectTabnanny)
87 e5App().getObject("Project").addE5Actions([self.__projectAct]) 87 e5App().getObject("Project").addE5Actions([self.__projectAct])
88 menu.addAction(self.__projectAct) 88 menu.addAction(self.__projectAct)
89 89
90 self.__editorAct = E5Action( 90 self.__editorAct = E5Action(
91 self.trUtf8('Check Indentations'), 91 self.tr('Check Indentations'),
92 self.trUtf8('&Indentations...'), 0, 0, 92 self.tr('&Indentations...'), 0, 0,
93 self, "") 93 self, "")
94 self.__editorAct.setWhatsThis(self.trUtf8( 94 self.__editorAct.setWhatsThis(self.tr(
95 """<b>Check Indentations...</b>""" 95 """<b>Check Indentations...</b>"""
96 """<p>This checks Python files""" 96 """<p>This checks Python files"""
97 """ for bad indentations using tabnanny.</p>""" 97 """ for bad indentations using tabnanny.</p>"""
98 )) 98 ))
99 self.__editorAct.triggered[()].connect(self.__editorTabnanny) 99 self.__editorAct.triggered[()].connect(self.__editorTabnanny)
166 e5App().getObject("Project").getProjectLanguage() in \ 166 e5App().getObject("Project").getProjectLanguage() in \
167 ["Python3", "Python2", "Python"]: 167 ["Python3", "Python2", "Python"]:
168 self.__projectBrowserMenu = menu 168 self.__projectBrowserMenu = menu
169 if self.__projectBrowserAct is None: 169 if self.__projectBrowserAct is None:
170 self.__projectBrowserAct = E5Action( 170 self.__projectBrowserAct = E5Action(
171 self.trUtf8('Check Indentations'), 171 self.tr('Check Indentations'),
172 self.trUtf8('&Indentations...'), 0, 0, 172 self.tr('&Indentations...'), 0, 0,
173 self, "") 173 self, "")
174 self.__projectBrowserAct.setWhatsThis(self.trUtf8( 174 self.__projectBrowserAct.setWhatsThis(self.tr(
175 """<b>Check Indentations...</b>""" 175 """<b>Check Indentations...</b>"""
176 """<p>This checks Python files""" 176 """<p>This checks Python files"""
177 """ for bad indentations using tabnanny.</p>""" 177 """ for bad indentations using tabnanny.</p>"""
178 )) 178 ))
179 self.__projectBrowserAct.triggered[()].connect( 179 self.__projectBrowserAct.triggered[()].connect(

eric ide

mercurial