dabo Commit
Revision 2407
Date: 2006-10-30 13:25:22 -0800 (Mon, 30 Oct 2006)
Author: paul

Changed:
U   trunk/dabo/lib/datanav/PageFrame.py

Log:
In my Page subclasses, I define the captions I want in initProperties.
However, the code in datanav.PageFrame kept overriding that setting with
an automatically-generated value. This fixes that, using the auto-generated
caption if the user subclass didn't already set it.


Diff:
Modified: trunk/dabo/lib/datanav/PageFrame.py
===================================================================
--- trunk/dabo/lib/datanav/PageFrame.py 2006-10-30 21:18:43 UTC (rev 2406)
+++ trunk/dabo/lib/datanav/PageFrame.py 2006-10-30 21:25:22 UTC (rev 2407)
@@ -59,8 +59,12 @@
        def addEditPage(self, ds=None, title=_("Edit"), pageClass=None):
                if pageClass is None:
                        pageClass = self.Form.EditPageClass
-               edPg = self.appendPage(pageClass, caption=title, imgKey="edit")
+               edPg = self.appendPage(pageClass, caption="", imgKey="edit")
                edPg.DataSource = ds
+               if not edPg.Caption:
+                       # If the edit page class defined its own caption, don't 
override it with
+                       # the automatically generated caption.
+                       edPg.Caption = title
                # The page number will be the PageCount minus one.
                self.dsEditPages[ds] = self.PageCount - 1
        




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to