[gnome-boxes/obsessive-compulsive-disorder: 5/11] downloads-hub: Don't do anything after a download is cancelled
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/obsessive-compulsive-disorder: 5/11] downloads-hub: Don't do anything after a download is cancelled
- Date: Mon, 30 Mar 2020 09:23:42 +0000 (UTC)
commit 89b507db975093ce825f529662234e5a66d0dfb6
Author: Felipe Borges <felipeborges gnome org>
Date: Thu Mar 26 11:48:13 2020 +0100
downloads-hub: Don't do anything after a download is cancelled
The widget is destroyed, so there's no point on us doing anything
else after cancellation.
src/downloads-hub.vala | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/downloads-hub.vala b/src/downloads-hub.vala
index a51a9c61..fc25f9cb 100644
--- a/src/downloads-hub.vala
+++ b/src/downloads-hub.vala
@@ -182,8 +182,10 @@ private async void download (string url, string filename) {
return;
}
- download_complete (label.label, local_file);
- download_status.set_visible_child (download_complete_label);
+ if (!cancellable.is_cancelled ()) {
+ download_complete (label.label, local_file);
+ download_status.set_visible_child (download_complete_label);
+ }
}
[GtkCallback]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]