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:
parent
025a118290
commit
6f2d064480
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue