[gnome-boxes/downloads-hub-ux-improvements: 3/6] downloads-hub: Indicate when a download is complete
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/downloads-hub-ux-improvements: 3/6] downloads-hub: Indicate when a download is complete
- Date: Wed, 4 Dec 2019 11:58:53 +0000 (UTC)
commit 7664d6324f655d6e663de6a4a24dd6aa9998ea19
Author: Felipe Borges <felipeborges gnome org>
Date: Wed Dec 4 12:42:02 2019 +0100
downloads-hub: Indicate when a download is complete
Fixes #306
data/ui/downloads-hub-row.ui | 23 +++++++++++++++++++++--
src/downloads-hub.vala | 5 +++++
2 files changed, 26 insertions(+), 2 deletions(-)
---
diff --git a/data/ui/downloads-hub-row.ui b/data/ui/downloads-hub-row.ui
index daf6a026..ce842a05 100644
--- a/data/ui/downloads-hub-row.ui
+++ b/data/ui/downloads-hub-row.ui
@@ -37,11 +37,30 @@
</child>
<child>
- <object class="GtkProgressBar" id="progress_bar">
+ <object class="GtkStack" id="download_status">
<property name="visible">True</property>
- <property name="hexpand">True</property>
+
+ <child>
+ <object class="GtkProgressBar" id="progress_bar">
+ <property name="visible">True</property>
+ <property name="hexpand">True</property>
+ <property name="valign">center</property>
+ </object>
+ </child>
+
+ <child>
+ <object class="GtkLabel" id="download_complete_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Ready to install</property>
+ <property name="halign">start</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
</object>
<packing>
+ <property name="top-attach">1</property>
<property name="left-attach">1</property>
</packing>
</child>
diff --git a/src/downloads-hub.vala b/src/downloads-hub.vala
index 6d3a6b43..75d69c88 100644
--- a/src/downloads-hub.vala
+++ b/src/downloads-hub.vala
@@ -128,7 +128,11 @@ private bool draw_button_pie (Widget drawing_area, Cairo.Context context) {
[GtkChild]
private Image image;
[GtkChild]
+ private Stack download_status;
+ [GtkChild]
private ProgressBar progress_bar;
+ [GtkChild]
+ private Label download_complete_label;
public ActivityProgress progress = new ActivityProgress ();
private ulong progress_notify_id;
@@ -169,6 +173,7 @@ private async void download (string url, string filename) {
}
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]