From c238b5dfc8ac2b5d5bd708c9d7b81a749c147b55 Mon Sep 17 00:00:00 2001 From: Blake Harnden <32446120+bharnden@users.noreply.github.com> Date: Fri, 6 Dec 2019 11:17:05 -0800 Subject: [PATCH] moved node context services option higher for better convenience, added check that context services only shown for container nodes --- coretk/coretk/graph/node.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/coretk/coretk/graph/node.py b/coretk/coretk/graph/node.py index f726739c..70424176 100644 --- a/coretk/coretk/graph/node.py +++ b/coretk/coretk/graph/node.py @@ -195,13 +195,14 @@ class CanvasNode: context = tk.Menu(self.canvas) if self.app.core.is_runtime(): context.add_command(label="Configure", command=self.show_config) + if NodeUtils.is_container_node(self.core_node.type): + context.add_command(label="Services", state=tk.DISABLED) if is_wlan and self.core_node.id in self.app.core.mobility_players: context.add_command( label="Mobility Player", command=self.show_mobility_player ) context.add_command(label="Select Adjacent", state=tk.DISABLED) context.add_command(label="Hide", state=tk.DISABLED) - context.add_command(label="Services", state=tk.DISABLED) if NodeUtils.is_container_node(self.core_node.type): context.add_command(label="Shell Window", state=tk.DISABLED) context.add_command(label="Tcpdump", state=tk.DISABLED) @@ -210,6 +211,8 @@ class CanvasNode: context.add_command(label="View Log", state=tk.DISABLED) else: context.add_command(label="Configure", command=self.show_config) + if NodeUtils.is_container_node(self.core_node.type): + context.add_command(label="Services", state=tk.DISABLED) if is_emane: context.add_command( label="EMANE Config", command=self.show_emane_config @@ -231,7 +234,6 @@ class CanvasNode: context.add_command(label="Paste", state=tk.DISABLED) context.add_command(label="Delete", state=tk.DISABLED) context.add_command(label="Hide", state=tk.DISABLED) - context.add_command(label="Services", state=tk.DISABLED) return context def select_multiple(self, event):