diff --git a/dropship.py b/dropship.py
index 7c867d7..6a49d6b 100644
--- a/dropship.py
+++ b/dropship.py
@@ -16,7 +16,7 @@ from gi.repository import Gdk
from gi.repository import GLib
from gi.repository import Gtk
-from ui_templates import pendingTransmissions
+from ui_templates import pendingTransferRow
logging.basicConfig(level=os.environ.get("LOGLEVEL", "INFO"))
@@ -91,8 +91,8 @@ class DropShip:
self.recv_box = self.builder.get_object("receiveBoxCodeEntry")
self.recv_box.connect("activate", self.on_recv)
- # Pending Transmissions UI
- self.pending_box = self.builder.get_object("pendingBox")
+ # Pending Transfers UI
+ self.pending_transfers_list = self.builder.get_object("pendingTransfersList")
self.transfer_code = ''
@@ -106,8 +106,8 @@ class DropShip:
self.nursery.start_soon(self.wormhole_send, fpath)
# TODO Roel/Luke, move this somewhere logical in its own function?
- status = pendingTransmissions(self, fpath.split('/')[-1], self.transfer_code)
- self.pending_box.add(status)
+ status = pendingTransferRow(self, fpath.split('/')[-1], self.transfer_code)
+ self.pending_transfers_list.add(status)
else:
log.info("Multiple file sending coming soon ™")
diff --git a/pendingTransferRow.ui b/pendingTransferRow.ui
new file mode 100644
index 0000000..2296915
--- /dev/null
+++ b/pendingTransferRow.ui
@@ -0,0 +1,227 @@
+
+
+
+
+
+
+
diff --git a/pendingTransmissions.ui b/pendingTransmissions.ui
deleted file mode 100644
index 6ea4408..0000000
--- a/pendingTransmissions.ui
+++ /dev/null
@@ -1,200 +0,0 @@
-
-
-
-
-
- pendingTransmission
- True
- False
- start
- True
-
-
- True
- False
- True
-
-
- True
- False
- 6
- 12
-
-
- 30
- 30
- True
- False
- network-transmit
- 5
-
-
- page0
- page0
-
-
-
-
- True
- False
- dialog-ok
- 5
-
-
- page1
- page1
- 1
-
-
-
-
-
-
-
- False
- True
- 0
-
-
-
-
- True
- False
- 6
- 6
- True
- vertical
-
-
- True
- False
- 6
-
-
- True
- False
- start
- screenshot_lkashdflasjdjasödjlkasjdlaskdlkashd01-292.jpg
- middle
- 20
- False
-
-
-
-
-
- False
- False
- 0
-
-
-
-
- True
- False
- start
- 336 KB
-
-
- False
- False
- 1
-
-
-
-
- False
- True
- 0
-
-
-
-
- 5-courier-happening
- True
- True
- True
- center
- 6
-
-
-
- False
- False
- 1
-
-
-
-
- False
- True
- 1
-
-
-
-
- True
- False
- 12
- 6
- False
- crossfade
-
-
- True
- True
- True
- center
- center
- 16
- 16
- image1
-
-
-
-
- page0
- page0
-
-
-
-
- button
- True
- True
- True
- center
- center
- 16
- 16
-
-
- page1
- page1
- 1
-
-
-
-
- False
- True
- 2
-
-
-
-
- False
- True
- 1
-
-
-
-
- True
- False
- gtk-no
- 3
-
-
diff --git a/ui_templates.py b/ui_templates.py
index 4302606..24df7e8 100644
--- a/ui_templates.py
+++ b/ui_templates.py
@@ -2,27 +2,24 @@ import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, GLib, Gdk
-@Gtk.Template.from_file('pendingTransmissions.ui')
-class pendingTransmissions(Gtk.Box):
- __gtype_name__ = 'PendingTransmission'
+@Gtk.Template.from_file('pendingTransferRow.ui')
+class pendingTransferRow(Gtk.ListBoxRow):
+ __gtype_name__ = 'PendingTransferRow'
fileNameLabel = Gtk.Template.Child()
fileNameMetadata = Gtk.Template.Child()
- transmissionCodeButton = Gtk.Template.Child()
- cancelTransmission = Gtk.Template.Child()
+ transferCodeButton = Gtk.Template.Child()
+ cancelTransfer = Gtk.Template.Child()
def __init__(self, parent, fileName, transferCode):
- super(Gtk.Box, self).__init__()
- #Gtk.Frame.__init__(self)
- # This must occur *after* you initialize your base
+ super(Gtk.ListBoxRow, self).__init__()
self.init_template()
- #TODO (Roel)
self.fileNameLabel.set_text(fileName)
self.transmissionCodeButton.set_label(transferCode)
@Gtk.Template.Callback()
- def transfer_button_click(self,widget):
+ def copy_transfer_code(self,widget):
'''
what to do when we press the button:
copy the code again to clipboard