order by element name
authorThomas Vander Stichele <thomas@apestaart.org>
Mon, 15 Aug 2005 14:41:18 +0000 (14:41 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Mon, 15 Aug 2005 14:41:18 +0000 (14:41 +0000)
Original commit message from CVS:
order by element name

gst-xmlinspect.py
gtk-doc-plugins.mak

index d813d27..6fa85af 100644 (file)
@@ -61,16 +61,22 @@ def output_element_factory(elf, indent=0):
     offset = get_offset(indent)
     return offset + ("\n" + offset).join(block.split("\n"))
 
-
 def output_plugin(plugin, indent=0):
     print "PLUGIN", plugin.get_name()
     version = ".".join([str(i) for i in plugin.get_version()])
     
-    elements = []
+    elements = {}
     for feature in plugin.get_feature_list():
         if isinstance(feature, gst.ElementFactory):
-            elements.append(output_element_factory(feature, indent + 2))
+            elements[feature.get_name()] = feature
         
+    elementsoutput = []
+    keys = elements.keys()
+    keys.sort()
+    for name in keys:
+        feature = elements[name]
+        elementsoutput.append(output_element_factory(feature, indent + 2))
+
     filename = plugin.get_filename()
     basename = filename
     if basename:
@@ -84,7 +90,7 @@ def output_plugin(plugin, indent=0):
         'license':     xmlencode(plugin.get_license()),
         'package':     xmlencode(plugin.get_package()),
         'origin':      xmlencode(plugin.get_origin()),
-        'elements': "\n".join(elements),
+        'elements': "\n".join(elementsoutput),
     }
     block = PLUGIN_TEMPLATE % d
     
index df99994..a483605 100644 (file)
@@ -22,10 +22,11 @@ EXTRA_DIST =                                \
        $(DOC_OVERRIDES)                \
        $(DOC_MODULE)-sections.txt
 
+# we don't add inspect-build.stamp here since this is run manually
+# by docs maintainers and result is commited to CVS
 DOC_STAMPS =                           \
        scan-build.stamp                \
        tmpl-build.stamp                \
-       inspect-build.stamp             \
        sgml-build.stamp                \
        html-build.stamp                \
        $(srcdir)/tmpl.stamp            \
@@ -110,9 +111,12 @@ INSPECT_ENVIRONMENT=\
 inspect:
        mkdir inspect
 
+# FIXME: inspect.timestamp should be written to by gst-xmlinspect.py
+# IFF the output changed; see gtkdoc-mktmpl
 inspect-build.stamp: inspect
        $(INSPECT_ENVIRONMENT) $(PYTHON) \
                $(top_srcdir)/common/gst-xmlinspect.py inspect
+       echo -n "timestamp" > inspect.stamp
        touch inspect-build.stamp
 
 inspect.stamp: inspect-build.stamp