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:
parent
4ef3a10161
commit
3cb996049d
@ -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))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user