Commit fd4bb2e6 authored by Sophie Herold's avatar Sophie Herold
Browse files

Show current file during backup

Closes #12
parent 4fa06d93
......@@ -319,6 +319,7 @@
</child>
<child>
<object class="GtkGrid">
<property name="width-request">500</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-spacing">6</property>
......@@ -378,6 +379,38 @@
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes">Current file</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="current_path">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="label">&lt;path&gt;</property>
<property name="ellipsize">middle</property>
<property name="width-chars">0</property>
<property name="single-line-mode">True</property>
<property name="max-width-chars">25</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
......
......@@ -149,6 +149,10 @@ impl Main {
self.get("browse_archive")
}
pub fn current_path(&self) -> gtk::Label {
self.get("current_path")
}
pub fn deduplicated_size(&self) -> gtk::Label {
self.get("deduplicated_size")
}
......
......@@ -458,6 +458,7 @@ pub fn refresh_status(communication: &borg::Communication) -> Continue {
Progress::Archive {
original_size,
deduplicated_size,
ref path,
..
} => {
stack.set_visible_child_name("archive");
......@@ -479,6 +480,7 @@ pub fn refresh_status(communication: &borg::Communication) -> Continue {
main_ui()
.deduplicated_size()
.set_text(&ui::utils::hsize(deduplicated_size));
main_ui().current_path().set_text(path)
}
Progress::Message {
message: Some(ref message),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment