pygui removed unimplemented runtime node context options and moved find node to tools menu
This commit is contained in:
parent
b858e66c49
commit
835675480b
2 changed files with 3 additions and 12 deletions
|
@ -198,9 +198,6 @@ class CanvasNode:
|
||||||
is_emane = self.core_node.type == NodeType.EMANE
|
is_emane = self.core_node.type == NodeType.EMANE
|
||||||
if self.app.core.is_runtime():
|
if self.app.core.is_runtime():
|
||||||
self.context.add_command(label="Configure", command=self.show_config)
|
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:
|
if is_wlan:
|
||||||
self.context.add_command(
|
self.context.add_command(
|
||||||
label="WLAN Config", command=self.show_wlan_config
|
label="WLAN Config", command=self.show_wlan_config
|
||||||
|
@ -209,13 +206,6 @@ class CanvasNode:
|
||||||
self.context.add_command(
|
self.context.add_command(
|
||||||
label="Mobility Player", command=self.show_mobility_player
|
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:
|
else:
|
||||||
self.context.add_command(label="Configure", command=self.show_config)
|
self.context.add_command(label="Configure", command=self.show_config)
|
||||||
if NodeUtils.is_container_node(self.core_node.type):
|
if NodeUtils.is_container_node(self.core_node.type):
|
||||||
|
|
|
@ -115,8 +115,8 @@ class Menubar(tk.Menu):
|
||||||
Create edit menu
|
Create edit menu
|
||||||
"""
|
"""
|
||||||
menu = tk.Menu(self)
|
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_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="Undo", accelerator="Ctrl+Z", state=tk.DISABLED)
|
||||||
menu.add_command(label="Redo", accelerator="Ctrl+Y", state=tk.DISABLED)
|
menu.add_command(label="Redo", accelerator="Ctrl+Y", state=tk.DISABLED)
|
||||||
menu.add_separator()
|
menu.add_separator()
|
||||||
|
@ -127,7 +127,6 @@ class Menubar(tk.Menu):
|
||||||
label="Delete", accelerator="Ctrl+D", command=self.click_delete
|
label="Delete", accelerator="Ctrl+D", command=self.click_delete
|
||||||
)
|
)
|
||||||
self.add_cascade(label="Edit", menu=menu)
|
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-x>", self.click_cut)
|
||||||
self.app.master.bind_all("<Control-c>", self.click_copy)
|
self.app.master.bind_all("<Control-c>", self.click_copy)
|
||||||
self.app.master.bind_all("<Control-v>", self.click_paste)
|
self.app.master.bind_all("<Control-v>", self.click_paste)
|
||||||
|
@ -190,6 +189,8 @@ class Menubar(tk.Menu):
|
||||||
Create tools menu
|
Create tools menu
|
||||||
"""
|
"""
|
||||||
menu = tk.Menu(self)
|
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="Auto Grid", command=self.click_autogrid)
|
||||||
menu.add_command(label="IP Addresses", command=self.click_ip_config)
|
menu.add_command(label="IP Addresses", command=self.click_ip_config)
|
||||||
menu.add_command(label="MAC Addresses", command=self.click_mac_config)
|
menu.add_command(label="MAC Addresses", command=self.click_mac_config)
|
||||||
|
|
Loading…
Reference in a new issue