changeset: 92044:d775fa9a9767 branch: 3.4 parent: 92041:fc99cf3615bb user: Terry Jan Reedy date: Fri Aug 08 23:33:16 2014 -0400 files: Lib/idlelib/ColorDelegator.py Lib/idlelib/PyShell.py description: Issue #14105: Stop removing breakpoints from Idle editors. Move BREAK tag configuration to PyShellEditorWindow. diff -r fc99cf3615bb -r d775fa9a9767 Lib/idlelib/ColorDelegator.py --- a/Lib/idlelib/ColorDelegator.py Fri Aug 08 13:32:16 2014 -0500 +++ b/Lib/idlelib/ColorDelegator.py Fri Aug 08 23:33:16 2014 -0400 @@ -72,7 +72,6 @@ "DEFINITION": idleConf.GetHighlight(theme, "definition"), "SYNC": {'background':None,'foreground':None}, "TODO": {'background':None,'foreground':None}, - "BREAK": idleConf.GetHighlight(theme, "break"), "ERROR": idleConf.GetHighlight(theme, "error"), # The following is used by ReplaceDialog: "hit": idleConf.GetHighlight(theme, "hit"), diff -r fc99cf3615bb -r d775fa9a9767 Lib/idlelib/PyShell.py --- a/Lib/idlelib/PyShell.py Fri Aug 08 13:32:16 2014 -0500 +++ b/Lib/idlelib/PyShell.py Fri Aug 08 23:33:16 2014 -0400 @@ -138,6 +138,7 @@ self.io.set_filename_change_hook(filename_changed_hook) if self.io.filename: self.restore_file_breaks() + self.color_breakpoint_text() rmenu_specs = [ ("Cut", "<>", "rmenu_check_cut"), @@ -148,6 +149,15 @@ ("Clear Breakpoint", "<>", None) ] + def color_breakpoint_text(self, color=True): + "Turn colorizing of breakpoint text on or off" + if color: + theme = idleConf.GetOption('main','Theme','name') + cfg = idleConf.GetHighlight(theme, "break") + else: + cfg = {'foreground': '', 'background': ''} + self.text.tag_config('BREAK', cfg) + def set_breakpoint(self, lineno): text = self.text filename = self.io.filename