def OnReplace(self, evt): activeEditor = self.mainControl.getActiveEditor() repl = guiToUni(self.ctrls.tfReplaceWith.GetValue()) if repl != self.currentCheckedWord: activeEditor.ReplaceSelection(repl) s, e = self.mainControl.getActiveEditor().GetSelectionCharPos() self.checkNext(e)
def OnReplaceAll(self, evt): self.session.addAutoReplace(self.currentCheckedWord, guiToUni(self.ctrls.tfReplaceWith.GetValue())) self.OnReplace(None)