add send UI when using filepicker
This commit is contained in:
parent
9416906649
commit
27a9de7c7b
13
dropship.py
13
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):
|
||||
|
Loading…
Reference in New Issue
Block a user