diff options
Diffstat (limited to 'portato')
-rw-r--r-- | portato/gui/slots.py | 17 | ||||
-rw-r--r-- | portato/gui/windows/main.py | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/portato/gui/slots.py b/portato/gui/slots.py index 8f523b8..c7f20e6 100644 --- a/portato/gui/slots.py +++ b/portato/gui/slots.py @@ -40,3 +40,20 @@ class PluginMenuSlot (WidgetSlot): self.uim.add_ui(mid, "ui/menubar/pluginMenu", action.get_name(), action.get_name(), gtk.UI_MANAGER_MENUITEM, False) self.uim.ensure_update() + +class NotebookSlot (WidgetSlot): + + def __init__ (self, notebook, *args, **kwargs): + self.notebook = notebook + + WidgetSlot.__init__(self, *args, **kwargs) + + def add (self, widget): + if isinstance(widget.widget, tuple): + label = gtk.Label(widget.widget[1]) + else: + label = None + + widget = widget.widget[0] + + self.notebook.append_page(widget, label) diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py index fedafdc..c7f419a 100644 --- a/portato/gui/windows/main.py +++ b/portato/gui/windows/main.py @@ -508,6 +508,7 @@ class MainWindow (Window): self.sysNotebook = self.tree.get_widget("systemNotebook") self.pkgNotebook = self.tree.get_widget("packageNotebook") self.set_notebook_tabpos(map(PreferenceWindow.tabpos.get, map(int, (self.cfg.get("packageTabPos", "GUI"), self.cfg.get("systemTabPos", "GUI"))))) + slots.NotebookSlot(self.pkgNotebook, gtk.Widget, "Package Notebook") # the different scrolls ebuildScroll = self.tree.get_widget("ebuildScroll") |