From fae12c87727e1a701975d0e72078e844c25f499c Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Mon, 15 Aug 2005 14:41:18 +0000 Subject: [PATCH] order by element name Original commit message from CVS: order by element name --- gst-xmlinspect.py | 14 ++++++++++---- gtk-doc-plugins.mak | 6 +++++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/gst-xmlinspect.py b/gst-xmlinspect.py index d813d27..6fa85af 100644 --- a/gst-xmlinspect.py +++ b/gst-xmlinspect.py @@ -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 diff --git a/gtk-doc-plugins.mak b/gtk-doc-plugins.mak index df99994..a483605 100644 --- a/gtk-doc-plugins.mak +++ b/gtk-doc-plugins.mak @@ -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 -- 2.7.4