dabo Commit
Revision 5902
Date: 2010-07-05 11:29:47 -0700 (Mon, 05 Jul 2010)
Author: Ed
Trac: http://trac.dabodev.com/changeset/5902
Changed:
U trunk/dabo/ui/dialogs/PreferenceDialog.py
Log:
Changed the paged control from dPageList to dPageFrame.
Added pass-through methods to append pages directly through the dialog.
Diff:
Modified: trunk/dabo/ui/dialogs/PreferenceDialog.py
===================================================================
--- trunk/dabo/ui/dialogs/PreferenceDialog.py 2010-07-05 17:28:23 UTC (rev
5901)
+++ trunk/dabo/ui/dialogs/PreferenceDialog.py 2010-07-05 18:29:47 UTC (rev
5902)
@@ -52,23 +52,34 @@
def _addPages(self):
- self.pglCategory = dabo.ui.dPageList(self, TabPosition="Left",
- ListSpacing=20)
+# self.pgfMain = dabo.ui.dPageList(self, TabPosition="Left",
+# ListSpacing=20)
+ self.pgfMain = dabo.ui.dPageFrame(self, TabPosition="Top")
self.addPages()
- incl = (self.pglCategory.PageCount == 0)
+ incl = (self.pgfMain.PageCount == 0)
if incl or self.IncludeDefaultPages:
self._addDefaultPages()
- incl = (self.pglCategory.PageCount == 0)
+ incl = (self.pgfMain.PageCount == 0)
if incl or self.IncludeFrameworkPages:
self._addFrameworkPages()
- self.Sizer.append1x(self.pglCategory)
+ self.Sizer.append1x(self.pgfMain)
self.update()
self.layout()
def addPages(self): pass
+
+
+ def appendPage(self, pgCls=None, *args, **kwargs):
+ """Pass-through method to the internal paged control"""
+ return self.pgfMain.appendPage(pgCls, *args, **kwargs)
+ def insertPage(self, pos, pgCls=None, *args, **kwargs):
+ """Pass-through method to the internal paged control"""
+ return self.pgfMain.insertPage(pos, pgCls, *args, **kwargs)
+
+
def _onAcceptPref(self):
"""This is called by the app when the user clicks the OK
button. Every method in
the callOnAccept list is called, followed by a call to the
user-configurable
@@ -109,8 +120,8 @@
is appended after any existing pages.
"""
if pos is None:
- pos = self.pglCategory.PageCount
- return self.pglCategory.insertPage(pos, caption=category)
+ pos = self.pgfMain.PageCount
+ return self.pgfMain.insertPage(pos, caption=category)
def _addDefaultPages(self):
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]