|
@ -22,16 +22,6 @@ log = logging.getLogger("dropship") |
|
|
AUTO_CLIP_COPY_SIZE = -1 |
|
|
AUTO_CLIP_COPY_SIZE = -1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class PendingTransfer: |
|
|
|
|
|
"""A wormhole send waiting for a wormhole receive.""" |
|
|
|
|
|
|
|
|
|
|
|
def __init__(self, code, fpath, process): |
|
|
|
|
|
"""Object initialisation.""" |
|
|
|
|
|
self.fpath = fpath |
|
|
|
|
|
self.code = code |
|
|
|
|
|
self.process = process |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class DropShip: |
|
|
class DropShip: |
|
|
"""Drag it, drop it, ship it.""" |
|
|
"""Drag it, drop it, ship it.""" |
|
|
|
|
|
|
|
@ -43,8 +33,6 @@ class DropShip: |
|
|
|
|
|
|
|
|
self.clipboard = gtk.Clipboard.get(gdk.SELECTION_CLIPBOARD) |
|
|
self.clipboard = gtk.Clipboard.get(gdk.SELECTION_CLIPBOARD) |
|
|
|
|
|
|
|
|
self._pending = [] |
|
|
|
|
|
|
|
|
|
|
|
self.init_glade() |
|
|
self.init_glade() |
|
|
self.init_css() |
|
|
self.init_css() |
|
|
self.init_ui_elements() |
|
|
self.init_ui_elements() |
|
@ -151,8 +139,6 @@ class DropShip: |
|
|
|
|
|
|
|
|
self.clipboard.set_text(code, AUTO_CLIP_COPY_SIZE) |
|
|
self.clipboard.set_text(code, AUTO_CLIP_COPY_SIZE) |
|
|
|
|
|
|
|
|
self._pending.append(PendingTransfer(code, fpath, process)) |
|
|
|
|
|
|
|
|
|
|
|
def wormhole_recv(self, widget, code): |
|
|
def wormhole_recv(self, widget, code): |
|
|
"""Run `wormhole receive` with a pending transfer code.""" |
|
|
"""Run `wormhole receive` with a pending transfer code.""" |
|
|
command = ["wormhole", "receive", "--accept-file", code] |
|
|
command = ["wormhole", "receive", "--accept-file", code] |
|
|