From 3cb996049dbd932a067b981d5f22dc7c44bbc8a6 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Thu, 11 Feb 2010 22:48:57 +0000 Subject: [PATCH] Two changes: make notebook tabs scroll if too big; allows config pages to be a callable for more dynamic views svn: r14328 --- src/gui/configure.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/configure.py b/src/gui/configure.py index 3bb383dc9..37a9f09ac 100644 --- a/src/gui/configure.py +++ b/src/gui/configure.py @@ -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))