330 """ |
330 """ |
331 aw = self.activeWindow() |
331 aw = self.activeWindow() |
332 if aw is not None: |
332 if aw is not None: |
333 menu = aw.getMenu("Encodings") |
333 menu = aw.getMenu("Encodings") |
334 if menu is not None: |
334 if menu is not None: |
335 menu.exec_(pos) |
335 menu.exec(pos) |
336 |
336 |
337 ########################################################################### |
337 ########################################################################### |
338 ## methods below need to be implemented by a subclass |
338 ## methods below need to be implemented by a subclass |
339 ########################################################################### |
339 ########################################################################### |
340 |
340 |
5384 """ |
5384 """ |
5385 Private method to edit the list of bookmarked files. |
5385 Private method to edit the list of bookmarked files. |
5386 """ |
5386 """ |
5387 from .BookmarkedFilesDialog import BookmarkedFilesDialog |
5387 from .BookmarkedFilesDialog import BookmarkedFilesDialog |
5388 dlg = BookmarkedFilesDialog(self.bookmarked, self.ui) |
5388 dlg = BookmarkedFilesDialog(self.bookmarked, self.ui) |
5389 if dlg.exec_() == QDialog.Accepted: |
5389 if dlg.exec() == QDialog.Accepted: |
5390 self.bookmarked = dlg.getBookmarkedFiles() |
5390 self.bookmarked = dlg.getBookmarkedFiles() |
5391 |
5391 |
5392 def __clearBookmarked(self): |
5392 def __clearBookmarked(self): |
5393 """ |
5393 """ |
5394 Private method to clear the bookmarked files menu. |
5394 Private method to clear the bookmarked files menu. |
5993 |
5993 |
5994 aw = self.activeWindow() |
5994 aw = self.activeWindow() |
5995 lines = aw.lines() |
5995 lines = aw.lines() |
5996 curLine = aw.getCursorPosition()[0] + 1 |
5996 curLine = aw.getCursorPosition()[0] + 1 |
5997 dlg = GotoDialog(lines, curLine, self.ui, None, True) |
5997 dlg = GotoDialog(lines, curLine, self.ui, None, True) |
5998 if dlg.exec_() == QDialog.Accepted: |
5998 if dlg.exec() == QDialog.Accepted: |
5999 aw.gotoLine(dlg.getLinenumber(), expand=True) |
5999 aw.gotoLine(dlg.getLinenumber(), expand=True) |
6000 |
6000 |
6001 def __gotoBrace(self): |
6001 def __gotoBrace(self): |
6002 """ |
6002 """ |
6003 Private method to handle the goto brace action. |
6003 Private method to handle the goto brace action. |
6103 else: |
6103 else: |
6104 aw = self.activeWindow() |
6104 aw = self.activeWindow() |
6105 if aw: |
6105 if aw: |
6106 from QScintilla.ZoomDialog import ZoomDialog |
6106 from QScintilla.ZoomDialog import ZoomDialog |
6107 dlg = ZoomDialog(aw.getZoom(), self.ui, None, True) |
6107 dlg = ZoomDialog(aw.getZoom(), self.ui, None, True) |
6108 if dlg.exec_() == QDialog.Accepted: |
6108 if dlg.exec() == QDialog.Accepted: |
6109 value = dlg.getZoomSize() |
6109 value = dlg.getZoomSize() |
6110 self.__zoomTo(value) |
6110 self.__zoomTo(value) |
6111 |
6111 |
6112 def __zoomTo(self, value): |
6112 def __zoomTo(self, value): |
6113 """ |
6113 """ |
6612 dlg = SpellingDictionaryEditDialog( |
6612 dlg = SpellingDictionaryEditDialog( |
6613 data, |
6613 data, |
6614 QCoreApplication.translate('ViewManager', "Editing {0}") |
6614 QCoreApplication.translate('ViewManager', "Editing {0}") |
6615 .format(fileInfo), |
6615 .format(fileInfo), |
6616 self.ui) |
6616 self.ui) |
6617 if dlg.exec_() == QDialog.Accepted: |
6617 if dlg.exec() == QDialog.Accepted: |
6618 data = dlg.getData() |
6618 data = dlg.getData() |
6619 try: |
6619 try: |
6620 f = open(dictionaryFile, "w", encoding="utf-8") |
6620 f = open(dictionaryFile, "w", encoding="utf-8") |
6621 f.write(data) |
6621 f.write(data) |
6622 f.close() |
6622 f.close() |