From cca976b11c754304544b8d1fcc543c3000019f4a Mon Sep 17 00:00:00 2001 From: "Kurt B. Kaiser" Date: Wed, 10 Oct 2007 00:55:40 +0000 Subject: [PATCH] Allow cursor color change w/o restart. Patch 1725576 Tal Einat. --- Lib/idlelib/NEWS.txt | 2 ++ Lib/idlelib/configDialog.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index 680712e57b9..b54d70d41b4 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -3,6 +3,8 @@ What's New in IDLE 2.6a1? *Release date: XX-XXX-200X* +- Update cursor color without restarting. Patch 1725576 Tal Einat. + - Allow keyboard interrupt only when user code is executing in subprocess. Patch 1225 Tal Einat (reworked from IDLE-Spoon). diff --git a/Lib/idlelib/configDialog.py b/Lib/idlelib/configDialog.py index d29ede4bd0f..98b6b2e5f71 100644 --- a/Lib/idlelib/configDialog.py +++ b/Lib/idlelib/configDialog.py @@ -1118,12 +1118,15 @@ class ConfigDialog(Toplevel): def ActivateConfigChanges(self): "Dynamically apply configuration changes" winInstances=self.parent.instance_dict.keys() + theme = idleConf.CurrentTheme() + cursor_color = idleConf.GetHighlight(theme, 'cursor', fgBg='fg') for instance in winInstances: instance.ResetColorizer() instance.ResetFont() instance.set_notabs_indentwidth() instance.ApplyKeybindings() instance.reset_help_menu_entries() + instance.text.configure(insertbackground=cursor_color) def Cancel(self): self.destroy()