summaryrefslogtreecommitdiff
path: root/portato/gui/windows/main.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-02-18 23:14:37 +0100
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-02-18 23:14:37 +0100
commit4dfc7b063ec7dc476462e843bfecd07fd02cb25e (patch)
tree713c67d43e9b367aa8ee309614f52b956d09c509 /portato/gui/windows/main.py
parent6f740cbb6b651dfa73ed6c0e0e2cf4176310e3c8 (diff)
downloadportato-4dfc7b063ec7dc476462e843bfecd07fd02cb25e.tar.gz
portato-4dfc7b063ec7dc476462e843bfecd07fd02cb25e.tar.bz2
portato-4dfc7b063ec7dc476462e843bfecd07fd02cb25e.zip
Make the plugin menu work again
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
>René Neumann2-2/+2 2012-10-01CGit updateRené Neumann4-32/+60 2012-09-25subtle-contrib ebuildRené 'Necoro' Neumann2-0/+32 2012-09-20Subtle live ebuildRené 'Necoro' Neumann2-0/+82 2012-09-11Fix copyright -- be in line with sunriseRené 'Necoro' Neumann2-2/+2 2012-09-09Bump radicale to version 0.7.1René 'Necoro' Neumann2-3/+9 2012-07-13FixRené Neumann2-3/+3 2012-07-13Better log handling of radicaleRené Neumann3-4/+4 2012-07-13Remove live ebuild of radicaleRené Neumann3-43/+0 2012-07-13Bump radicale to 0.7René Neumann2-5/+11 2012-05-07add epatch_user to cairoRené Neumann2-1/+2 2012-05-07Cairo from portage treeRené Neumann6-309/+63 2012-02-18Removed outdated packagesRené 'Necoro' Neumann19-883/+0 2012-02-17MltonRené Neumann2-0/+62 2012-02-17Removed virtualboxRené Neumann21-993/+0 2012-01-30BumpRené 'Necoro' Neumann1-3/+3 2012-01-30BumpRené 'Necoro' Neumann1-0/+0 2012-01-30Apply changes from bugs.gentoo.orgRené 'Necoro' Neumann2-1/+19 2012-01-11diffarrayRené Neumann3-0/+37 2012-01-10Remove patched dovecot. Changes are upstreamRené 'Necoro' Neumann8-907/+0 2012-01-10Remove emacs variant -- this is now tracked in patchesRené 'Necoro' Neumann3-363/+0 2011-11-06amd64 for fcgi-cgiRené 'Necoro' Neumann2-2/+2 2011-11-06Forgot dovecot init-fileRené 'Necoro' Neumann1-0/+1