def tool_btn_toggled(self,button):
tool_dict = {"browser": tool_func.func0,
"alienarena": tool_func.func1,
"live": tool_func.func2,
"cs-network": tool_func.func3
}
if button.get_active():
state = "on"
Gtk.StyleContext.add_class(button.get_style_context(), "toggleasd")
btn_func_exist = button.name in tool_dict
if btn_func_exist:
tool_dict[button.name](button.name)
else:
state = "off"
Gtk.StyleContext.remove_class(button.get_style_context(), "toggleasd")
# print(button.name, "has been turned", state)
评论列表
文章目录