Two changes: make notebook tabs scroll if too big; allows config pages to be a callable for more dynamic views

svn: r14328
This commit is contained in:
Doug Blank 2010-02-11 22:48:57 +00:00
parent 4ef3a10161
commit 3cb996049d

View File

@ -165,6 +165,7 @@ class ConfigureDialog(ManagedWindow.ManagedWindow):
buttons=(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE)),
None, dialogtitle, None)
self.panel = gtk.Notebook()
self.panel.set_scrollable(True)
self.window.vbox.add(self.panel)
self.__on_close = on_close
self.window.connect('response', self.done)
@ -178,7 +179,11 @@ class ConfigureDialog(ManagedWindow.ManagedWindow):
"""
This method builds the notebookpages in the panel
"""
for func in configure_page_funcs:
if callable(configure_page_funcs):
pages = configure_page_funcs()
else:
pages = configure_page_funcs
for func in pages:
labeltitle, widget = func(self)
self.panel.append_page(widget, MarkupLabel(labeltitle))