140 |
141 |
141 self.__initialize() |
142 self.__initialize() |
142 |
143 |
143 def __projectShowMenu(self, menuName, menu): |
144 def __projectShowMenu(self, menuName, menu): |
144 """ |
145 """ |
145 Private slot called, when the the project menu or a submenu is |
146 Private slot called, when the the project menu or a submenu is |
146 about to be shown. |
147 about to be shown. |
147 |
148 |
148 @param menuName name of the menu to be shown (string) |
149 @param menuName name of the menu to be shown (string) |
149 @param menu reference to the menu (QMenu) |
150 @param menu reference to the menu (QMenu) |
150 """ |
151 """ |
153 e5App().getObject("Project").getProjectLanguage() in \ |
154 e5App().getObject("Project").getProjectLanguage() in \ |
154 ["Python3", "Python2", "Python"]) |
155 ["Python3", "Python2", "Python"]) |
155 |
156 |
156 def __projectBrowserShowMenu(self, menuName, menu): |
157 def __projectBrowserShowMenu(self, menuName, menu): |
157 """ |
158 """ |
158 Private slot called, when the the project browser menu or a submenu is |
159 Private slot called, when the the project browser menu or a submenu is |
159 about to be shown. |
160 about to be shown. |
160 |
161 |
161 @param menuName name of the menu to be shown (string) |
162 @param menuName name of the menu to be shown (string) |
162 @param menu reference to the menu (QMenu) |
163 @param menu reference to the menu (QMenu) |
163 """ |
164 """ |
214 |
215 |
215 self.__projectBrowserPep8CheckerDialog = Pep8Dialog() |
216 self.__projectBrowserPep8CheckerDialog = Pep8Dialog() |
216 self.__projectBrowserPep8CheckerDialog.show() |
217 self.__projectBrowserPep8CheckerDialog.show() |
217 if isDir: |
218 if isDir: |
218 self.__projectBrowserPep8CheckerDialog.start( |
219 self.__projectBrowserPep8CheckerDialog.start( |
219 fn, save = True) |
220 fn, save=True) |
220 else: |
221 else: |
221 self.__projectBrowserPep8CheckerDialog.start( |
222 self.__projectBrowserPep8CheckerDialog.start( |
222 fn, save = True, repeat = True) |
223 fn, save=True, repeat=True) |
223 |
224 |
224 def __editorOpened(self, editor): |
225 def __editorOpened(self, editor): |
225 """ |
226 """ |
226 Private slot called, when a new editor was opened. |
227 Private slot called, when a new editor was opened. |
227 |
228 |
244 except ValueError: |
245 except ValueError: |
245 pass |
246 pass |
246 |
247 |
247 def __editorShowMenu(self, menuName, menu, editor): |
248 def __editorShowMenu(self, menuName, menu, editor): |
248 """ |
249 """ |
249 Private slot called, when the the editor context menu or a submenu is |
250 Private slot called, when the the editor context menu or a submenu is |
250 about to be shown. |
251 about to be shown. |
251 |
252 |
252 @param menuName name of the menu to be shown (string) |
253 @param menuName name of the menu to be shown (string) |
253 @param menu reference to the menu (QMenu) |
254 @param menu reference to the menu (QMenu) |
254 @param editor reference to the editor |
255 @param editor reference to the editor |
267 if editor is not None: |
268 if editor is not None: |
268 if editor.checkDirty(): |
269 if editor.checkDirty(): |
269 self.__editorPep8CheckerDialog = Pep8Dialog() |
270 self.__editorPep8CheckerDialog = Pep8Dialog() |
270 self.__editorPep8CheckerDialog.show() |
271 self.__editorPep8CheckerDialog.show() |
271 self.__editorPep8CheckerDialog.start( |
272 self.__editorPep8CheckerDialog.start( |
272 editor.getFileName(), |
273 editor.getFileName(), |
273 save = True, |
274 save=True, |
274 repeat = True) |
275 repeat=True) |