1.1 --- a/EventAggregatorSupport.py Tue Jul 17 00:42:39 2012 +0200
1.2 +++ b/EventAggregatorSupport.py Sat Aug 18 21:02:22 2012 +0200
1.3 @@ -12,6 +12,7 @@
1.4 from MoinDateSupport import *
1.5 from MoinRemoteSupport import *
1.6 from MoinSupport import *
1.7 +from ViewSupport import *
1.8
1.9 from MoinMoin.Page import Page
1.10 from MoinMoin.action import AttachFile
1.11 @@ -1410,24 +1411,6 @@
1.12 except IndexError:
1.13 return None
1.14
1.15 -# Colour-related functions.
1.16 -
1.17 -def getColour(s):
1.18 - colour = [0, 0, 0]
1.19 - digit = 0
1.20 - for c in s:
1.21 - colour[digit] += ord(c)
1.22 - colour[digit] = colour[digit] % 256
1.23 - digit += 1
1.24 - digit = digit % 3
1.25 - return tuple(colour)
1.26 -
1.27 -def getBlackOrWhite(colour):
1.28 - if sum(colour) / 3.0 > 127:
1.29 - return (0, 0, 0)
1.30 - else:
1.31 - return (255, 255, 255)
1.32 -
1.33 # User interface abstractions.
1.34
1.35 class View: