70 |
70 |
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 = E4Action(self.trUtf8('Check Indentations'), |
75 self.__projectAct = E5Action(self.trUtf8('Check Indentations'), |
76 self.trUtf8('&Indentations...'), 0, 0, |
76 self.trUtf8('&Indentations...'), 0, 0, |
77 self,'project_check_indentations') |
77 self,'project_check_indentations') |
78 self.__projectAct.setStatusTip(\ |
78 self.__projectAct.setStatusTip(\ |
79 self.trUtf8('Check indentations using tabnanny.')) |
79 self.trUtf8('Check indentations using tabnanny.')) |
80 self.__projectAct.setWhatsThis(self.trUtf8( |
80 self.__projectAct.setWhatsThis(self.trUtf8( |
81 """<b>Check Indentations...</b>""" |
81 """<b>Check Indentations...</b>""" |
82 """<p>This checks Python files""" |
82 """<p>This checks Python files""" |
83 """ for bad indentations using tabnanny.</p>""" |
83 """ for bad indentations using tabnanny.</p>""" |
84 )) |
84 )) |
85 self.connect(self.__projectAct, SIGNAL('triggered()'), self.__projectTabnanny) |
85 self.connect(self.__projectAct, SIGNAL('triggered()'), self.__projectTabnanny) |
86 e5App().getObject("Project").addE4Actions([self.__projectAct]) |
86 e5App().getObject("Project").addE5Actions([self.__projectAct]) |
87 menu.addAction(self.__projectAct) |
87 menu.addAction(self.__projectAct) |
88 |
88 |
89 self.__editorAct = E4Action(self.trUtf8('Check Indentations'), |
89 self.__editorAct = E5Action(self.trUtf8('Check Indentations'), |
90 self.trUtf8('&Indentations...'), 0, 0, |
90 self.trUtf8('&Indentations...'), 0, 0, |
91 self, "") |
91 self, "") |
92 self.__editorAct.setWhatsThis(self.trUtf8( |
92 self.__editorAct.setWhatsThis(self.trUtf8( |
93 """<b>Check Indentations...</b>""" |
93 """<b>Check Indentations...</b>""" |
94 """<p>This checks Python files""" |
94 """<p>This checks Python files""" |
161 """ |
161 """ |
162 if menuName == "Checks" and \ |
162 if menuName == "Checks" and \ |
163 e5App().getObject("Project").getProjectLanguage() == "Python3": |
163 e5App().getObject("Project").getProjectLanguage() == "Python3": |
164 self.__projectBrowserMenu = menu |
164 self.__projectBrowserMenu = menu |
165 if self.__projectBrowserAct is None: |
165 if self.__projectBrowserAct is None: |
166 self.__projectBrowserAct = E4Action(self.trUtf8('Check Indentations'), |
166 self.__projectBrowserAct = E5Action(self.trUtf8('Check Indentations'), |
167 self.trUtf8('&Indentations...'), 0, 0, |
167 self.trUtf8('&Indentations...'), 0, 0, |
168 self, "") |
168 self, "") |
169 self.__projectBrowserAct.setWhatsThis(self.trUtf8( |
169 self.__projectBrowserAct.setWhatsThis(self.trUtf8( |
170 """<b>Check Indentations...</b>""" |
170 """<b>Check Indentations...</b>""" |
171 """<p>This checks Python files""" |
171 """<p>This checks Python files""" |