206 editor = e5App().getObject("ViewManager").activeWindow() |
206 editor = e5App().getObject("ViewManager").activeWindow() |
207 |
207 |
208 if not menu.isEmpty(): |
208 if not menu.isEmpty(): |
209 menu.addSeparator() |
209 menu.addSeparator() |
210 |
210 |
|
211 # TODO: change this to a dynamically built submenu |
211 for string in self.getPreferences("StartswithStrings"): |
212 for string in self.getPreferences("StartswithStrings"): |
212 act = menu.addAction( |
213 act = menu.addAction( |
213 self.tr("Remove '{0}'").format(string), |
214 self.tr("Remove '{0}'").format(string), |
214 self.__removeLine) |
215 self.__removeLine) |
215 act.setData(string) |
216 act.setData(string) |
219 """ |
220 """ |
220 Private slot called, when a new editor was opened. |
221 Private slot called, when a new editor was opened. |
221 |
222 |
222 @param editor reference to the new editor (QScintilla.Editor) |
223 @param editor reference to the new editor (QScintilla.Editor) |
223 """ |
224 """ |
|
225 # TODO: change this to a dynamically built submenu |
224 menu = editor.getMenu("Tools") |
226 menu = editor.getMenu("Tools") |
225 if menu is not None: |
227 if menu is not None: |
226 self.__editors[editor] = [] |
228 self.__editors[editor] = [] |
227 if not menu.isEmpty(): |
229 if not menu.isEmpty(): |
228 act = menu.addSeparator() |
230 act = menu.addSeparator() |