[telepathy-spec/master] Don't try to infer top-level namespace in fullindex
Will Thompson
will.thompson at collabora.co.uk
Fri Sep 18 09:25:51 PDT 2009
Previously, this template tried to guess the top-level namespace of the
specification being generated by finding the common prefix of all
interfaces. This doesn't work out very well when you have exactly one
interface. :-) But now that interfaces have a sensible short_name
property, we can just use that.
---
doc/templates/fullindex.html | 10 +---------
1 files changed, 1 insertions(+), 9 deletions(-)
diff --git a/doc/templates/fullindex.html b/doc/templates/fullindex.html
index c842ec5..0a49abc 100644
--- a/doc/templates/fullindex.html
+++ b/doc/templates/fullindex.html
@@ -1,5 +1,4 @@
#from itertools import groupby
-#from os.path import commonprefix
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" "">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
@@ -8,16 +7,9 @@
<link rel="stylesheet" href="style.css" type="text/css"/>
</head>
-#set $prefix = commonprefix(map (lambda o: o.name, $spec.interfaces))
-#set lprefix = len ($prefix)
#set $star = []
#for $item in $spec.everything.values() + $spec.errors.values() + $spec.generic_types
- #if $item.__class__.__name__ == 'Interface'
- #set $name = $item.name[lprefix:]
- #else
- #set $name = $item.short_name
- #end if
- #echo $star.append(($name, $item))
+ #echo $star.append(($item.short_name, $item))
#slurp
#end for
#echo $star.sort(key = lambda t: t[0].title())
--
1.5.6.5
More information about the telepathy-commits
mailing list