From 625902a763f63d11032a5510cfaff1a9abf83bdf Mon Sep 17 00:00:00 2001 From: Philip Trauner Date: Tue, 20 Dec 2016 22:41:32 +0100 Subject: [PATCH] Fixed program list Program list always listed the programs of the last avaliable Wallaby. --- Sublime/fl0w/fl0w.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sublime/fl0w/fl0w.py b/Sublime/fl0w/fl0w.py index b4c73c5..228272b 100644 --- a/Sublime/fl0w/fl0w.py +++ b/Sublime/fl0w/fl0w.py @@ -75,7 +75,6 @@ class Fl0wClient(Client): handler.fl0w.controller_menu.clear() for id_ in data: action_menu = Menu() - print(id(action_menu)) action_menu.id_ = id_ action_menu += Entry("Programs", "Lists all executable programs on the controller.", @@ -83,9 +82,9 @@ class Fl0wClient(Client): handler, id_)) action_menu += Entry("Set Name", "Sets the hostname of the selected controller", - action=lambda: Input("New Hostname:", initial_text=data[id_]["name"], - on_done=lambda hostname: handler.pipe({"set" : hostname}, - "hostname", id_)).invoke(handler.fl0w.window)) + action=partial(lambda handler, id_: Input("New Hostname:", initial_text=data[id_]["name"], + on_done=lambda hostname: handler.pipe( + {"set" : hostname}, "hostname", id_)).invoke(handler.fl0w.window), handler, id_)) action_menu += Entry("Processes", "Lists processes currently running on controller.", action=partial(lambda handler: handler.pipe(None, "processes", id_), @@ -96,6 +95,7 @@ class Fl0wClient(Client): kwargs={"selected_action_menu" : action_menu}) + def set_selected_action_menu(self, selected_action_menu): self.selected_action_menu = selected_action_menu