Commits

Anonymous committed d15124c

Some miscellaneous fixes.

Comments (0)

Files changed (4)

sphinx/application.py

         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',
         self._warning = warning
         self._warncount = 0
 
+        self._events = events.copy()
+
         # read config
         self.config = Config(srcdir, 'conf.py')
         if confoverrides:
 
     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):
 
     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)

sphinx/quickstart.py

 #latex_documents = []
 
 # Additional stuff for the LaTeX preamble.
-#latex_preamble = '
+#latex_preamble = ''
 
 # Documents to append as an appendix to all manuals.
 #latex_appendices = []

sphinx/static/sphinxdoc.css

 
 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 {
     font-size: 1em;
     margin-left: 6px;
     padding: 0 4px 0 4px;
-    text-decoration: none;
+    text-decoration: none!important;
     visibility: hidden;
 }
 

sphinx/templates/layout.html

           <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 %}