[Epydoc-commits] SF.net SVN: epydoc: [1622] trunk/epydoc/src/epydoc/docwriter
Brought to you by:
edloper
From: <ed...@us...> - 2007-09-23 19:18:11
|
Revision: 1622 http://epydoc.svn.sourceforge.net/epydoc/?rev=1622&view=rev Author: edloper Date: 2007-09-23 12:18:08 -0700 (Sun, 23 Sep 2007) Log Message: ----------- - Fixed svn bug 1700614 -- private known subclasses are shown always. Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/html.py trunk/epydoc/src/epydoc/docwriter/html_css.py Modified: trunk/epydoc/src/epydoc/docwriter/html.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html.py 2007-09-23 18:54:23 UTC (rev 1621) +++ trunk/epydoc/src/epydoc/docwriter/html.py 2007-09-23 19:18:08 UTC (rev 1622) @@ -860,9 +860,15 @@ if (doc.subclasses not in (UNKNOWN, None) and len(doc.subclasses) > 0): out('<dl><dt>Known Subclasses:</dt>\n<dd>\n ') - out(',\n '.join([self.href(c, context=doc) - for c in doc.subclasses])) - out('\n</dd></dl>\n\n') + out(' <ul class="subclass-list">\n') + for i, subclass in enumerate(doc.subclasses): + href = self.href(subclass, context=doc) + if self._val_is_public(subclass): css = '' + else: css = ' class="private"' + if i > 0: href = ', '+href + out('<li%s>%s</li>' % (css, href)) + out(' </ul>\n') + out('</dd></dl>\n\n') out('<hr />\n') @@ -1444,7 +1450,7 @@ elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"block"); } } - // Update all table rowss containing private objects. Note, we + // Update all table rows containing private objects. Note, we // use "" instead of "block" becaue IE & firefox disagree on what // this should be (block vs table-row), and "" just gives the // default for both browsers. @@ -1459,7 +1465,7 @@ for(var i=0; i<elts.length; i++) { if (elts[i].className == "private") { elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")? - "none":"list-item"); + "none":""); } } // Update all list items containing private objects. @@ -3028,6 +3034,16 @@ #{ Helper functions #//////////////////////////////////////////////////////////// + def _val_is_public(self, valdoc): + """Make a best-guess as to whether the given class is public.""" + container = self.docindex.container(valdoc) + if container is not None: + for vardoc in container.variables.values(): + if vardoc in (UNKNOWN, None): continue + if vardoc.value is valdoc: + return vardoc.is_public + return True + # [XX] Is it worth-while to pull the anchor tricks that I do here? # Or should I just live with the fact that show/hide private moves # stuff around? Modified: trunk/epydoc/src/epydoc/docwriter/html_css.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html_css.py 2007-09-23 18:54:23 UTC (rev 1621) +++ trunk/epydoc/src/epydoc/docwriter/html_css.py 2007-09-23 19:18:08 UTC (rev 1622) @@ -201,6 +201,11 @@ .summary-sig-arg { color: $summary_sig_arg; } .summary-sig-default { color: $summary_sig_default; } +/* Subclass list + */ +ul.subclass-list { display: inline; } +ul.subclass-list li { display: inline; } + /* To render variables, classes etc. like functions */ table.summary .summary-name { color: $summary_sig_name; font-weight: bold; font-family: monospace; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |