summaryrefslogtreecommitdiff
path: root/portato/gui/windows/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'portato/gui/windows/main.py')
-rw-r--r--portato/gui/windows/main.py24
1 files changed, 18 insertions, 6 deletions
diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py
index 437d305..2ee4447 100644
--- a/portato/gui/windows/main.py
+++ b/portato/gui/windows/main.py
@@ -479,13 +479,25 @@ class MainWindow (Window):
plugin.load_plugins()
menus = [p.menus for p in plugin.get_plugin_queue().get_plugins()]
- # if menus:
- # pluginMenu = self.tree.get_ui("pluginMenu")
+ if menus:
+ uim = self.tree.get_widget("uimanager")
+ ag = self.tree.get_widget("pluginActionGroup")
- # for m in itt.chain(*menus):
- # item = gtk.MenuItem(m.label)
- # item.connect("activate", m.call)
- # pluginMenu.append(item)
+ ctr = 0
+ for m in itt.chain(*menus):
+
+ # create action
+ aname = "plugin%d" % ctr
+ a = gtk.Action(aname, m.label, None, None)
+ a.connect("activate", m.call)
+ ag.add_action(a)
+
+ # add to UI
+ mid = uim.new_merge_id()
+ uim.add_ui(mid, "ui/menubar/pluginMenu", aname, aname, gtk.UI_MANAGER_MENUITEM, False)
+
+ ctr += 1
+
splash(_("Building frontend"))
# set paned position
:00 +0200'>2011-08-10Better vim fontsRené 'Necoro' Neumann1-1/+1 2011-08-09ooffice aliasRené Neumann1-0/+2 2011-08-09Update the needed hg-extensions.René Neumann1-1/+2 2011-06-08gtkrc stuff for Qt-Gtk-StyleRené 'Necoro' Neumann2-0/+8 2011-06-08Updated fonts.conf to work better on lcdsRené 'Necoro' Neumann1-17/+6 ass='logheader'>2012-09-09Zsh EnhancementsRené 'Necoro' Neumann1-5/+9 2012-09-03Allow to create trivial game specs via the cmdlineRené 'Necoro' Neumann1-22/+95 2012-09-03Removed unneeded/trivial game filesRené 'Necoro' Neumann14-66/+20 2012-09-03Fix templatesRené 'Necoro' Neumann3-4/+4 2012-09-03Some more commenting -- and allowing a default PREFIXRené 'Necoro' Neumann1-3/+8