diff --git a/gui_helper.py b/gui_helper.py index f9f2b73..c961fa8 100644 --- a/gui_helper.py +++ b/gui_helper.py @@ -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]) -