If plugins have defined extra menu items, insert a spacer before they start

This commit is contained in:
Chris Jones 2010-01-05 22:28:14 +00:00
parent 0b5cf876ba
commit 7328d9aa4f
1 changed files with 4 additions and 0 deletions

View File

@ -165,6 +165,10 @@ class TerminalPopupMenu(object):
plugins = registry.get_plugins_by_capability('terminal_menu') plugins = registry.get_plugins_by_capability('terminal_menu')
for menuplugin in plugins: for menuplugin in plugins:
menuplugin.callback(menuitems, menu, terminal) menuplugin.callback(menuitems, menu, terminal)
if len(menuitems) > 0:
menu.append(gtk.MenuItem())
for menuitem in menuitems: for menuitem in menuitems:
menu.append(menuitem) menu.append(menuitem)
except Exception, ex: except Exception, ex: