[Python-checkins] r61336 - in doctools/trunk/sphinx: application.py quickstart.py static/sphinxdoc.css templates/layout.html

georg.brandl python-checkins at python.org
Sun Mar 9 22:31:53 CET 2008


Author: georg.brandl
Date: Sun Mar  9 22:31:52 2008
New Revision: 61336

Modified:
   doctools/trunk/sphinx/application.py
   doctools/trunk/sphinx/quickstart.py
   doctools/trunk/sphinx/static/sphinxdoc.css
   doctools/trunk/sphinx/templates/layout.html
Log:
Some miscellaneous fixes.


Modified: doctools/trunk/sphinx/application.py
==============================================================================
--- doctools/trunk/sphinx/application.py	(original)
+++ doctools/trunk/sphinx/application.py	Sun Mar  9 22:31:52 2008
@@ -44,7 +44,7 @@
         return self.message
 
 
-# List of all known events. Maps name to arguments description.
+# List of all known core events. Maps name to arguments description.
 events = {
     'builder-inited': '',
     'doctree-read' : 'the doctree before being pickled',
@@ -68,6 +68,8 @@
         self._warning = warning
         self._warncount = 0
 
+        self._events = events.copy()
+
         # read config
         self.config = Config(srcdir, 'conf.py')
         if confoverrides:
@@ -137,7 +139,7 @@
 
     def _validate_event(self, event):
         event = intern(event)
-        if event not in events:
+        if event not in self._events:
             raise ExtensionError('Unknown event name: %s' % event)
 
     def connect(self, event, callback):
@@ -173,17 +175,22 @@
 
     def add_config_value(self, name, default, rebuild_env):
         if name in self.config.values:
-            raise ExtensionError('Config value %r already present')
+            raise ExtensionError('Config value %r already present' % name)
         self.config.values[name] = (default, rebuild_env)
 
+    def add_event(self, name):
+        if name in self._events:
+            raise ExtensionError('Event %r already present' % name)
+        self._events[name] = ''
+
     def add_node(self, node):
         nodes._add_node_class_names([node.__name__])
 
-    def add_directive(self, name, cls, content, arguments, **options):
-        cls.content = content
-        cls.arguments = arguments
-        cls.options = options
-        directives.register_directive(name, cls)
+    def add_directive(self, name, func, content, arguments, **options):
+        func.content = content
+        func.arguments = arguments
+        func.options = options
+        directives.register_directive(name, func)
 
     def add_role(self, name, role):
         roles.register_canonical_role(name, role)

Modified: doctools/trunk/sphinx/quickstart.py
==============================================================================
--- doctools/trunk/sphinx/quickstart.py	(original)
+++ doctools/trunk/sphinx/quickstart.py	Sun Mar  9 22:31:52 2008
@@ -138,7 +138,7 @@
 #latex_documents = []
 
 # Additional stuff for the LaTeX preamble.
-#latex_preamble = '
+#latex_preamble = ''
 
 # Documents to append as an appendix to all manuals.
 #latex_appendices = []

Modified: doctools/trunk/sphinx/static/sphinxdoc.css
==============================================================================
--- doctools/trunk/sphinx/static/sphinxdoc.css	(original)
+++ doctools/trunk/sphinx/static/sphinxdoc.css	Sun Mar  9 22:31:52 2008
@@ -264,13 +264,10 @@
 
 div.sidebar ul {
     padding-left: 1.5em;
+    margin-top: 7px;
     list-style: none;
     padding: 0;
-    line-height: 110%;
-}
-
-div.sidebar ul li {
-    margin-bottom: 7px;
+    line-height: 130%;
 }
 
 div.sidebar ul ul {
@@ -448,7 +445,7 @@
     font-size: 1em;
     margin-left: 6px;
     padding: 0 4px 0 4px;
-    text-decoration: none;
+    text-decoration: none!important;
     visibility: hidden;
 }
 

Modified: doctools/trunk/sphinx/templates/layout.html
==============================================================================
--- doctools/trunk/sphinx/templates/layout.html	(original)
+++ doctools/trunk/sphinx/templates/layout.html	Sun Mar  9 22:31:52 2008
@@ -73,10 +73,13 @@
           <li class="right"><a href="{{ pathto('settings') }}"
                                title="Customize your viewing settings" accesskey="S">settings</a> |</li>
         {%- endif %}
-        <li><a href="{{ pathto('index') }}">{{ project }} v{{ release }} Documentation</a> &raquo;</li>
+        {%- block rootrellink %}
+        <li><a href="{{ pathto('index') }}">{{ project }} v{{ release }} documentation</a> &raquo;</li>
+        {%- endblock %}
         {%- for parent in parents %}
           <li><a href="{{ parent.link|e }}" accesskey="U">{{ parent.title }}</a> &raquo;</li>
         {%- endfor %}
+        {%- block relbaritems %}{% endblock %}
       </ul>
     </div>
 {%- endblock %}


More information about the Python-checkins mailing list