pygui removed unimplemented runtime node context options and moved find node to tools menu

This commit is contained in:
Blake Harnden 2020-05-02 23:57:27 -07:00
parent b858e66c49
commit 835675480b
2 changed files with 3 additions and 12 deletions

View file

@ -198,9 +198,6 @@ class CanvasNode:
is_emane = self.core_node.type == NodeType.EMANE
if self.app.core.is_runtime():
self.context.add_command(label="Configure", command=self.show_config)
if NodeUtils.is_container_node(self.core_node.type):
self.context.add_command(label="Services", state=tk.DISABLED)
self.context.add_command(label="Config Services", state=tk.DISABLED)
if is_wlan:
self.context.add_command(
label="WLAN Config", command=self.show_wlan_config
@ -209,13 +206,6 @@ class CanvasNode:
self.context.add_command(
label="Mobility Player", command=self.show_mobility_player
)
self.context.add_command(label="Select Adjacent", state=tk.DISABLED)
if NodeUtils.is_container_node(self.core_node.type):
self.context.add_command(label="Shell Window", state=tk.DISABLED)
self.context.add_command(label="Tcpdump", state=tk.DISABLED)
self.context.add_command(label="Tshark", state=tk.DISABLED)
self.context.add_command(label="Wireshark", state=tk.DISABLED)
self.context.add_command(label="View Log", state=tk.DISABLED)
else:
self.context.add_command(label="Configure", command=self.show_config)
if NodeUtils.is_container_node(self.core_node.type):

View file

@ -115,8 +115,8 @@ class Menubar(tk.Menu):
Create edit menu
"""
menu = tk.Menu(self)
menu.add_command(label="Find", accelerator="Ctrl+F", command=self.click_find)
menu.add_command(label="Preferences", command=self.click_preferences)
menu.add_separator()
menu.add_command(label="Undo", accelerator="Ctrl+Z", state=tk.DISABLED)
menu.add_command(label="Redo", accelerator="Ctrl+Y", state=tk.DISABLED)
menu.add_separator()
@ -127,7 +127,6 @@ class Menubar(tk.Menu):
label="Delete", accelerator="Ctrl+D", command=self.click_delete
)
self.add_cascade(label="Edit", menu=menu)
self.app.master.bind_all("<Control-f>", self.click_find)
self.app.master.bind_all("<Control-x>", self.click_cut)
self.app.master.bind_all("<Control-c>", self.click_copy)
self.app.master.bind_all("<Control-v>", self.click_paste)
@ -190,6 +189,8 @@ class Menubar(tk.Menu):
Create tools menu
"""
menu = tk.Menu(self)
menu.add_command(label="Find", accelerator="Ctrl+F", command=self.click_find)
self.app.master.bind_all("<Control-f>", self.click_find)
menu.add_command(label="Auto Grid", command=self.click_autogrid)
menu.add_command(label="IP Addresses", command=self.click_ip_config)
menu.add_command(label="MAC Addresses", command=self.click_mac_config)