From 27a9de7c7ba8b838231ba049ff9417658e8882d6 Mon Sep 17 00:00:00 2001 From: rra Date: Wed, 5 Aug 2020 09:55:37 +0200 Subject: [PATCH] add send UI when using filepicker --- dropship.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/dropship.py b/dropship.py index 170650c..0c43e8b 100644 --- a/dropship.py +++ b/dropship.py @@ -100,16 +100,19 @@ class DropShip: fpath = files[0].replace("file://", "") Thread(target=self.wormhole_send, args=(self, fpath,)).start() - # UI response + self.update_send_ui() + + else: + log.info("Multiple file sending coming soon ™") + def update_send_ui (self): + + # UI response after adding files self.drop_label.set_visible(False) self.drop_label.set_vexpand(False) self.drop_spinner.set_vexpand(True) self.drop_spinner.set_visible(True) self.drop_spinner.start() - else: - log.info("Multiple file sending coming soon ™") - def add_files(self, widget, event): """Handler for adding files with system interface""" response = self.file_chooser.run() @@ -118,6 +121,8 @@ class DropShip: fpath = self.file_chooser.get_filenames()[0] Thread(target=self.wormhole_send, args=(self, fpath,)).start() + self.update_send_ui() + self.file_chooser.hide() def read_wormhole_send_code(self, process):