On 5/25/07, Tal Einat <[EMAIL PROTECTED]> wrote:

On 5/24/07, Tal Einat <[EMAIL PROTECTED]> wrote:
>
>
> * Cursor color change: For changes to the cursor's color to take effect,
> IDLE must be restarted. This is a known issue with Tk's Text widget, so I
> don't see how we could work around this... Still, we could have a popup
> message appear after a change to the cursor color in the config dialog,
> informing the user of this. I've seen several bug reports on this already,
> and have heard by word of mouth that this has frustrated several more
> people.


Unbelievable - never believe what people tell you about Tk without
checking for youself!

I just discovered that Tk's Text widget is just fine! IDLE's configHandler
wasn't bothering to update the cursor color. I just added 3 lines of code,
and -voila-! it works.

I'll upload a patch to SF in a bit, but for those of you who want to try
it out, copy/paste this into configDialog.py:

    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)


SourceForge patch
1725576<https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1725576&group_id=5470>
.

- Tal
_______________________________________________
IDLE-dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/idle-dev

Reply via email to