Browse Source

Use hide to avoid file picker explosion

unifiedWindowUI
Luke Murphy 4 years ago
parent
commit
660ecf34cc
No known key found for this signature in database GPG Key ID: 5E2EF5A63E3718CC
  1. 7
      dropship.py

7
dropship.py

@ -108,13 +108,12 @@ class DropShip:
def add_files(self, widget, event): def add_files(self, widget, event):
"""Handler for adding files with system interface""" """Handler for adding files with system interface"""
response = self.file_chooser.run() response = self.file_chooser.run()
if response == gtk.ResponseType.OK: if response == gtk.ResponseType.OK:
fpath = self.file_chooser.get_filenames()[0] fpath = self.file_chooser.get_filenames()[0]
Thread(target=self.wormhole_send, args=(self, fpath,)).start() Thread(target=self.wormhole_send, args=(self, fpath,)).start()
elif response == gtk.ResponseType.CANCEL:
# TODO(roel) something isn't right here.. maybe we need to initialize it every time we run it. self.file_chooser.hide()
print("Cancel clicked")
self.file_chooser.destroy()
def read_wormhole_send_code(self, process): def read_wormhole_send_code(self, process):
"""Read wormhole send code from command-line output.""" """Read wormhole send code from command-line output."""

Loading…
Cancel
Save