]> granicus.if.org Git - python/commitdiff
Allow cursor color change w/o restart. Patch 1725576 Tal Einat.
authorKurt B. Kaiser <kbk@shore.net>
Wed, 10 Oct 2007 00:55:40 +0000 (00:55 +0000)
committerKurt B. Kaiser <kbk@shore.net>
Wed, 10 Oct 2007 00:55:40 +0000 (00:55 +0000)
Lib/idlelib/NEWS.txt
Lib/idlelib/configDialog.py

index 680712e57b9fcd91ffa1000ebb36bdac798ce458..b54d70d41b4ba5e954983b3281751d97a4e11d06 100644 (file)
@@ -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).
 
index d29ede4bd0fed73b12c44802c2713e768f99e8bf..98b6b2e5f71d64e6b2c93e3f884910d830ee9351 100644 (file)
@@ -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()