summaryrefslogtreecommitdiff
path: root/portato/gui/slots.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-05-20 01:46:29 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-05-20 01:46:29 +0200
commitc3479371ed99a7f510759c2a334d448f1dbfd2f2 (patch)
treed29228a861bf906644967f1635b58144acec05bd /portato/gui/slots.py
parentcbab860b4b0ec92503184b7cd11f3242a6df6338 (diff)
downloadportato-c3479371ed99a7f510759c2a334d448f1dbfd2f2.tar.gz
portato-c3479371ed99a7f510759c2a334d448f1dbfd2f2.tar.bz2
portato-c3479371ed99a7f510759c2a334d448f1dbfd2f2.zip
Add NotebookSlot
Diffstat (limited to '')
-rw-r--r--portato/gui/slots.py17
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)