On Sat, 28 Feb 2009 11:13:54 -0600
"Edward K. Ream" <[email protected]> wrote:

> > Yes, I just added the two rstrips below...
> >
> > def flashCharacter(self,i,bg='white',fg='red',flashes=3,delay=75):
> >
> >    bg = bg.rstrip('0123456789')
> >    fg = fg.rstrip('0123456789')
> >
> > and now there's no message and it flashes blue on black instead of
> > black on black.
> >
> > Shall I push that?
> 
> Please do.  Just run all unit tests first.  Thanks.

On second thoughts that fix is probably wrong, I'm sure "#D08080" is a
reasonable value for 'fg' or 'bg', and those strips would not work well
with that.  Unit tests pasts, BTW :-}

Instead I've copied the setTag hack,

=== modified file 'leo/plugins/qtGui.py'
--- leo/plugins/qtGui.py        2009-02-26 18:22:53 +0000
+++ leo/plugins/qtGui.py        2009-02-28 17:29:52 +0000
@@ -8049,6 +8049,12 @@
     #...@+node:ekr.20081121105001.579:flashCharacter (leoQTextEditWidget)
     def flashCharacter(self,i,bg='white',fg='red',flashes=3,delay=75):
 
+        # numbered color names don't work in Ubuntu 8.10, so...
+        if bg[-1].isdigit() and bg[0] != '#':
+            bg = bg[:-1]
+        if fg[-1].isdigit() and fg[0] != '#':
+            fg = fg[:-1]
+

pushed to 1612 - unit tests passed, but seems to me the unittests only
run in tk mode??

Cheers -Terry



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to