diff options
| author | Georg Brandl <georg@python.org> | 2010-02-21 21:49:38 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2010-02-21 21:49:38 +0100 |
| commit | db8df49c09f49250cda9a90cd19005b82ffb54e8 (patch) | |
| tree | cdfa96fe9ae0b7d76bc9ecfe42a013afa1e90f80 /sphinx/domains/python.py | |
| parent | 78ae60e4534807505311b9d2c1673609a7b5f4c6 (diff) | |
| download | sphinx-db8df49c09f49250cda9a90cd19005b82ffb54e8.tar.gz | |
Add method for adding custom indexes.
Diffstat (limited to 'sphinx/domains/python.py')
| -rw-r--r-- | sphinx/domains/python.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py index fcd2216d..1678929c 100644 --- a/sphinx/domains/python.py +++ b/sphinx/domains/python.py @@ -459,7 +459,7 @@ class PythonDomain(Domain): 'modules': {}, # modname -> docname, synopsis, platform, deprecated } indices = [ - ('modindex', l_('Global Module Index'), l_('modules')), + ('modindex', l_('Python Module Index'), l_('modules')), ] def clear_doc(self, docname): @@ -545,9 +545,7 @@ class PythonDomain(Domain): for refname, (docname, type) in self.data['objects'].iteritems(): yield (refname, type, docname, refname, 1) - def has_index_entries(self, name, docnames=None): - if name != 'modindex': - return False + def has_modindex_entries(self, docnames=None): if not docnames: return bool(self.data['modules']) else: @@ -556,10 +554,7 @@ class PythonDomain(Domain): return True return False - def get_index(self, name, docnames=None): - if name != 'modindex': - return None, None - + def get_modindex_index(self, docnames=None): content = {} # list of prefixes to ignore ignores = self.env.config['modindex_common_prefix'] |
