3730 # send a signal, if it was the very last editor |
3730 # send a signal, if it was the very last editor |
3731 if not len(self.editors): |
3731 if not len(self.editors): |
3732 self.__lastEditorClosed() |
3732 self.__lastEditorClosed() |
3733 self.lastEditorClosed.emit() |
3733 self.lastEditorClosed.emit() |
3734 |
3734 |
|
3735 editor.deleteLater() |
|
3736 |
3735 return True |
3737 return True |
3736 |
3738 |
3737 def closeCurrentWindow(self): |
3739 def closeCurrentWindow(self): |
3738 """ |
3740 """ |
3739 Public method to close the current window. |
3741 Public method to close the current window. |
3853 editor.eolChanged.connect(self.__editorConfigChanged) |
3855 editor.eolChanged.connect(self.__editorConfigChanged) |
3854 editor.encodingChanged.connect(self.__editorConfigChanged) |
3856 editor.encodingChanged.connect(self.__editorConfigChanged) |
3855 editor.selectionChanged.connect(self.searchDlg.selectionChanged) |
3857 editor.selectionChanged.connect(self.searchDlg.selectionChanged) |
3856 editor.selectionChanged.connect(self.replaceDlg.selectionChanged) |
3858 editor.selectionChanged.connect(self.replaceDlg.selectionChanged) |
3857 editor.lastEditPositionAvailable.connect(self.__lastEditPositionAvailable) |
3859 editor.lastEditPositionAvailable.connect(self.__lastEditPositionAvailable) |
|
3860 editor.zoomValueChanged.connect(self.zoomValueChanged) |
3858 |
3861 |
3859 def newEditorView(self, fn, caller, filetype=""): |
3862 def newEditorView(self, fn, caller, filetype=""): |
3860 """ |
3863 """ |
3861 Public method to create a new editor displaying the given document. |
3864 Public method to create a new editor displaying the given document. |
3862 |
3865 |
5039 if dlg.exec_() == QDialog.Accepted: |
5042 if dlg.exec_() == QDialog.Accepted: |
5040 value = dlg.getZoomSize() |
5043 value = dlg.getZoomSize() |
5041 if value is not None: |
5044 if value is not None: |
5042 aw.zoomTo(value) |
5045 aw.zoomTo(value) |
5043 self.sbZoom.setValue(aw.getZoom()) |
5046 self.sbZoom.setValue(aw.getZoom()) |
|
5047 |
|
5048 def zoomValueChanged(self, value): |
|
5049 """ |
|
5050 Public slot to handle changes of the zoom value. |
|
5051 |
|
5052 @param value new zoom value (integer) |
|
5053 """ |
|
5054 self.sbZoom.setValue(value) |
5044 |
5055 |
5045 def __toggleAll(self): |
5056 def __toggleAll(self): |
5046 """ |
5057 """ |
5047 Private method to handle the toggle all folds action. |
5058 Private method to handle the toggle all folds action. |
5048 """ |
5059 """ |