[jToolkit-cvs] jToolkit/widgets grid.py,1.4,1.5
Brought to you by:
davidfraser,
friedelwolff
From: <dav...@us...> - 2004-02-09 13:09:26
|
Update of /cvsroot/jtoolkit/jToolkit/widgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28959 Modified Files: grid.py Log Message: updated to set style on Link rather than putting a Font object there for it (for text foreground colors) added more explicit logic in canmerge to make it clearer how to trace errors Index: grid.py =================================================================== RCS file: /cvsroot/jtoolkit/jToolkit/widgets/grid.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** grid.py 14 Oct 2003 09:38:25 -0000 1.4 --- grid.py 9 Feb 2004 13:06:08 -0000 1.5 *************** *** 68,72 **** contents = text else: ! contents = widgets.Link(href, widgets.Font(text, newattribs={'style':style}), {'target':hreftarget}) return table.TableCell(contents, newattribs={'valign':'top','style':style}) --- 68,72 ---- contents = text else: ! contents = widgets.Link(href, text, {'target':hreftarget,'style':style}) return table.TableCell(contents, newattribs={'valign':'top','style':style}) *************** *** 86,92 **** # the links are usable from another row return self.canmerge(widget1.contents, widget2.contents) elif type(widget1) in (str, unicode): return widget1 == widget2 ! return 0 def gethtmlstyle(self, textcolor, backcolor, font): --- 86,103 ---- # the links are usable from another row return self.canmerge(widget1.contents, widget2.contents) + else: + # unknown class... + return 0 + else: + # mismatched class + return 0 elif type(widget1) in (str, unicode): return widget1 == widget2 ! else: ! # unknown type ! return 0 ! else: ! # mismatched types ! return 0 def gethtmlstyle(self, textcolor, backcolor, font): |