[Python-checkins] r58403 - python/trunk/Lib/idlelib/NEWS.txt python/trunk/Lib/idlelib/configDialog.py

kurt.kaiser python-checkins at python.org
Wed Oct 10 02:55:40 CEST 2007


Author: kurt.kaiser
Date: Wed Oct 10 02:55:40 2007
New Revision: 58403

Modified:
   python/trunk/Lib/idlelib/NEWS.txt
   python/trunk/Lib/idlelib/configDialog.py
Log:
Allow cursor color change w/o restart. Patch 1725576 Tal Einat.


Modified: python/trunk/Lib/idlelib/NEWS.txt
==============================================================================
--- python/trunk/Lib/idlelib/NEWS.txt	(original)
+++ python/trunk/Lib/idlelib/NEWS.txt	Wed Oct 10 02:55:40 2007
@@ -3,6 +3,8 @@
 
 *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).
 

Modified: python/trunk/Lib/idlelib/configDialog.py
==============================================================================
--- python/trunk/Lib/idlelib/configDialog.py	(original)
+++ python/trunk/Lib/idlelib/configDialog.py	Wed Oct 10 02:55:40 2007
@@ -1118,12 +1118,15 @@
     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()


More information about the Python-checkins mailing list