Don't make empty menus

make_menu should only pop up a menu if there are menu items to show.
This commit is contained in:
Bryan Schumaker 2010-10-31 17:24:07 -04:00
parent 025a118290
commit 6f2d064480
1 changed files with 2 additions and 0 deletions

View File

@ -21,6 +21,8 @@ def add_plist_menu_item(text, func):
def make_menu(items, button, time):
if len(items) == 0:
return
menu = Menu()
for (text, func) in items:
item = MenuItem(text)