156 |
156 |
157 @param menuName name of the menu to be shown (string) |
157 @param menuName name of the menu to be shown (string) |
158 @param menu reference to the menu (QMenu) |
158 @param menu reference to the menu (QMenu) |
159 """ |
159 """ |
160 if menuName == "Checks" and \ |
160 if menuName == "Checks" and \ |
161 e4App().getObject("Project").getProjectLanguage() == "Python": |
161 e4App().getObject("Project").getProjectLanguage() == "Python3": |
162 self.__projectBrowserMenu = menu |
162 self.__projectBrowserMenu = menu |
163 if self.__projectBrowserAct is None: |
163 if self.__projectBrowserAct is None: |
164 self.__projectBrowserAct = E4Action(self.trUtf8('Check Indentations'), |
164 self.__projectBrowserAct = E4Action(self.trUtf8('Check Indentations'), |
165 self.trUtf8('&Indentations...'), 0, 0, |
165 self.trUtf8('&Indentations...'), 0, 0, |
166 self, "") |
166 self, "") |
239 @param editor reference to the editor |
239 @param editor reference to the editor |
240 """ |
240 """ |
241 if menuName == "Checks": |
241 if menuName == "Checks": |
242 if not self.__editorAct in menu.actions(): |
242 if not self.__editorAct in menu.actions(): |
243 menu.addAction(self.__editorAct) |
243 menu.addAction(self.__editorAct) |
244 self.__editorAct.setEnabled(editor.isPyFile()) |
244 self.__editorAct.setEnabled(editor.isPy3File()) |
245 |
245 |
246 def __editorTabnanny(self): |
246 def __editorTabnanny(self): |
247 """ |
247 """ |
248 Private slot to handle the tabnanny context menu action of the editors. |
248 Private slot to handle the tabnanny context menu action of the editors. |
249 """ |
249 """ |