Browse Source

Call super on own class

Also capitalise.

Following https://gitlab.gnome.org/GNOME/pygobject/-/merge_requests/52.
unifiedWindowUI
Luke Murphy 4 years ago
parent
commit
6be4865e54
No known key found for this signature in database GPG Key ID: 5E2EF5A63E3718CC
  1. 4
      dropship/dropship.py
  2. 4
      dropship/ui_templates.py

4
dropship/dropship.py

@ -12,7 +12,7 @@ require_version("Gdk", "3.0")
from gi.repository import Gdk, GLib, Gtk from gi.repository import Gdk, GLib, Gtk
from dropship.ui_templates import pendingTransferRow from dropship.ui_templates import PendingTransferRow
CWD = Path(__file__).absolute().parent CWD = Path(__file__).absolute().parent
@ -101,7 +101,7 @@ class DropShip:
self.nursery.start_soon(self.wormhole_send, fpath) self.nursery.start_soon(self.wormhole_send, fpath)
# TODO Roel/Luke, move this somewhere logical in its own function? # TODO Roel/Luke, move this somewhere logical in its own function?
status = pendingTransferRow(self, fname, self.transfer_code) status = PendingTransferRow(self, fname, self.transfer_code)
# TODO Roel, find out how to add to a listbox # TODO Roel, find out how to add to a listbox
self.pending_transfers_list.insert( self.pending_transfers_list.insert(

4
dropship/ui_templates.py

@ -10,7 +10,7 @@ CWD = Path(__file__).absolute().parent
@Gtk.Template.from_file(f"{CWD}/ui/pendingTransferRow.ui") @Gtk.Template.from_file(f"{CWD}/ui/pendingTransferRow.ui")
class pendingTransferRow(Gtk.ListBoxRow): class PendingTransferRow(Gtk.ListBoxRow):
__gtype_name__ = "PendingTransferRow" __gtype_name__ = "PendingTransferRow"
fileNameLabel = Gtk.Template.Child() fileNameLabel = Gtk.Template.Child()
@ -19,7 +19,7 @@ class pendingTransferRow(Gtk.ListBoxRow):
cancelTransfer = Gtk.Template.Child() cancelTransfer = Gtk.Template.Child()
def __init__(self, parent, fileName, transferCode): def __init__(self, parent, fileName, transferCode):
super(Gtk.ListBoxRow, self).__init__() super(PendingTransferRow, self).__init__()
self.fileNameLabel.set_text(fileName) self.fileNameLabel.set_text(fileName)
self.transferCodeButton.set_label(transferCode) self.transferCodeButton.set_label(transferCode)

Loading…
Cancel
Save