class MainWindowController: def __init__(self, parser, app_controller): self.parser = parser self.app_controller = app_controller self.app_controller.set_window_controller(self) self.window = None def on_quit(self): self.app_controller.on_quit() pass def on_signin(self, host, port, login, passw, tls): print("[MainWindowController::on_signin] calling AppController::on_sign") self.app_controller.on_sign(host, port, login, passw, tls) def on_signup(self, host, port, login, passw, tls): self.app_controller.on_sign(host, port, login, passw, tls, True) def on_refreshlist(self): self.app_controller.on_filelist() def on_fileupload(self, filepath): self.app_controller.on_fileupload(filepath) def on_filedownload(self, filename, savepath): self.app_controller.on_filedownload(filename, savepath) def on_filedelete(self, filename): self.app_controller.on_filedelete(filename) def show_message(self, message, is_error): self.window.show_message(message, is_error) def switch_connected_mode(self): self.window.connected_mode() def register_window(self, window): self.window = window def clear_all_file_on_window(self): self.window.remove_all_from_treeview() def add_file_on_window(self, fileinfo): self.window.add_file_in_treeview(fileinfo)