diff options
author | fiaxh <git@lightrise.org> | 2024-12-02 20:42:45 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2025-01-12 19:35:06 +0100 |
commit | d78ec0562288fa4ed7d414d2269c00b7b8c2c588 (patch) | |
tree | cb93751ba7ddbf883f41c728e6147b85b4a4acac /main/src/ui/conversation_content_view/file_widget.vala | |
parent | d5c280476902d72627c863177a6adcbef4f94f3e (diff) | |
download | dino-d78ec0562288fa4ed7d414d2269c00b7b8c2c588.tar.gz dino-d78ec0562288fa4ed7d414d2269c00b7b8c2c588.zip |
Show file upload/download progress
Diffstat (limited to 'main/src/ui/conversation_content_view/file_widget.vala')
-rw-r--r-- | main/src/ui/conversation_content_view/file_widget.vala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/src/ui/conversation_content_view/file_widget.vala b/main/src/ui/conversation_content_view/file_widget.vala index 583609d2..1cf84eb4 100644 --- a/main/src/ui/conversation_content_view/file_widget.vala +++ b/main/src/ui/conversation_content_view/file_widget.vala @@ -196,6 +196,7 @@ public class FileDefaultWidgetController : Object { private FileTransfer? file_transfer; public string file_transfer_state { get; set; } public string file_transfer_mime_type { get; set; } + public int64 file_transfer_transferred_bytes { get; set; } private FileTransfer.State state; @@ -206,6 +207,7 @@ public class FileDefaultWidgetController : Object { this.notify["file-transfer-state"].connect(update_file_info); this.notify["file-transfer-mime-type"].connect(update_file_info); + this.notify["file-transfer-transferred-bytes"].connect(update_file_info); } public void set_file_transfer(FileTransfer file_transfer) { @@ -215,13 +217,14 @@ public class FileDefaultWidgetController : Object { file_transfer.bind_property("state", this, "file-transfer-state"); file_transfer.bind_property("mime-type", this, "file-transfer-mime-type"); + file_transfer.bind_property("transferred-bytes", this, "file-transfer-transferred-bytes"); update_file_info(); } private void update_file_info() { state = file_transfer.state; - widget.update_file_info(file_transfer.mime_type, file_transfer.state, file_transfer.size); + widget.update_file_info(file_transfer.mime_type, file_transfer.state, file_transfer.direction, file_transfer.size, file_transfer.transferred_bytes); } private void on_clicked() { |