Pass name of handlers into Callback (more minigalaxy)

This commit is contained in:
Luke Murphy 2020-10-12 14:14:15 +02:00
parent e631c91ad5
commit 4159c161a2
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

View File

@ -24,7 +24,7 @@ class PendingTransferRow(Gtk.ListBoxRow):
self.fileNameLabel.set_text(fileName) self.fileNameLabel.set_text(fileName)
self.transferCodeButton.set_label(transferCode) self.transferCodeButton.set_label(transferCode)
@Gtk.Template.Callback() @Gtk.Template.Callback("copy_transfer_code")
def copy_transfer_code(self, widget): def copy_transfer_code(self, widget):
""" """
what to do when we press the button: what to do when we press the button:
@ -36,7 +36,7 @@ class PendingTransferRow(Gtk.ListBoxRow):
clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD) clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
clipboard.set_text(code, -1) # -1 is auto-size clipboard.set_text(code, -1) # -1 is auto-size
@Gtk.Template.Callback() @Gtk.Template.Callback("cancel_transfer")
def cancel_transfer(self, widget): def cancel_transfer(self, widget):
""" """
cancel the transfer cancel the transfer