diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2009-05-20 01:46:29 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2009-05-20 01:46:29 +0200 |
commit | c3479371ed99a7f510759c2a334d448f1dbfd2f2 (patch) | |
tree | d29228a861bf906644967f1635b58144acec05bd /portato/gui/slots.py | |
parent | cbab860b4b0ec92503184b7cd11f3242a6df6338 (diff) | |
download | portato-c3479371ed99a7f510759c2a334d448f1dbfd2f2.tar.gz portato-c3479371ed99a7f510759c2a334d448f1dbfd2f2.tar.bz2 portato-c3479371ed99a7f510759c2a334d448f1dbfd2f2.zip |
Add NotebookSlot
Diffstat (limited to '')
-rw-r--r-- | portato/gui/slots.py | 17 |
1 files changed, 17 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) |