summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2007-10-10 00:55:40 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2007-10-10 00:55:40 (GMT)
commitcca976b11c754304544b8d1fcc543c3000019f4a (patch)
tree653e443f985ad3cdc0c01ac9a2a45ce7fd6774a2
parent68995867d558609a8e376be24b6c3347eb643976 (diff)
downloadcpython-cca976b11c754304544b8d1fcc543c3000019f4a.zip
cpython-cca976b11c754304544b8d1fcc543c3000019f4a.tar.gz
cpython-cca976b11c754304544b8d1fcc543c3000019f4a.tar.bz2
Allow cursor color change w/o restart. Patch 1725576 Tal Einat.
-rw-r--r--Lib/idlelib/NEWS.txt2
-rw-r--r--Lib/idlelib/configDialog.py3
2 files changed, 5 insertions, 0 deletions
diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt
index 680712e..b54d70d 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 d29ede4..98b6b2e 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()