plugin's title is optional
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Thu, 11 Apr 2013 10:50:49 +0000 (12:50 +0200)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Thu, 11 Apr 2013 10:50:49 +0000 (12:50 +0200)
unfold/plugin.py

index ddba40b..7ee79af 100644 (file)
@@ -68,11 +68,12 @@ class Plugin:
     def __init__ (self, page, title=None, domid=None,
                   visible=True, togglable=None, toggled=None, **settings):
         self.page = page
-        self.title=title
         # callers can provide their domid for css'ing 
         if not domid: domid=Plugin.newdomid()
         self.domid=domid
+        # title is shown when togglable
         if not title: title="Plugin title for %s"%domid
+        self.title=title
         self.classname=self._py_classname()
         self.plugin_classname=self._js_classname()
         self.visible=visible