remove unused code

master
BodgeMaster 2022-03-20 09:58:21 +01:00
parent 603acb60f6
commit cb9770f57e
1 changed files with 0 additions and 16 deletions

View File

@ -1,4 +1,3 @@
import tkinter as tk
import util
@ -67,18 +66,3 @@ menu_structure = {
#FIXME: come up with a way to uniquely declare separators so they don't become the same element of a dict
def build_menu(structure_dict, menu):
for entry in structure_dict:
if structure_dict[entry]==None:
if entry==None:
menu.add_separator()
else:
menu.add_command(label=entry)
menu.entryconfig(entry, state="disabled")
if isinstance(structure_dict[entry], dict):
submenu = tk.Menu(menu, tearoff=False)
build_menu(structure_dict[entry], submenu)
menu.add_cascade(label=entry, menu=submenu)
if callable(structure_dict[entry]):
menu.add_command(label=entry, command=structure_dict[entry])