[chronojump] Before doing a backup, shown estimated size in MB.
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Before doing a backup, shown estimated size in MB.
- Date: Thu, 19 Aug 2021 09:20:48 +0000 (UTC)
commit 824f73f1a0828c6b0966e3cae8d041a68a9570f1
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Aug 19 11:19:28 2021 +0200
Before doing a backup, shown estimated size in MB.
glade/app1.glade | 45 +++++++++++++++++++++++++++++-------------
src/gui/app1/session/backup.cs | 7 ++++++-
src/gui/app1/session/main.cs | 1 +
3 files changed, 38 insertions(+), 15 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index bbdc0f5b7..4f2f92953 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -25663,6 +25663,9 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -31974,6 +31977,18 @@ Concentric</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
+ <widget class="GtkLabel"
id="label_video_encoder_tests_will_be_filmed">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Tests
will be filmed</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
<widget class="GtkHBox"
id="hbox_video_encoder_capturing">
<property name="can_focus">False</property>
<property name="spacing">4</property>
@@ -32010,18 +32025,6 @@ Concentric</property>
</packing>
</child>
<child>
- <widget class="GtkLabel"
id="label_video_encoder_tests_will_be_filmed">
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Tests
will be filmed</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
<widget class="GtkHBox"
id="hbox_video_encoder_no_capturing">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -41311,6 +41314,9 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -46221,6 +46227,17 @@ then click this button.</property>
<property name="can_focus">False</property>
<property name="spacing">10</property>
<child>
+ <widget class="GtkLabel"
id="app1s_label_backup_estimated_size">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
<widget class="GtkVButtonBox" id="vbuttonbox5">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -46273,7 +46290,7 @@ then click this button.</property>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">0</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
@@ -46286,7 +46303,7 @@ then click this button.</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
</widget>
diff --git a/src/gui/app1/session/backup.cs b/src/gui/app1/session/backup.cs
index ac6cc948f..6c64d6d36 100644
--- a/src/gui/app1/session/backup.cs
+++ b/src/gui/app1/session/backup.cs
@@ -49,8 +49,13 @@ public partial class ChronoJumpWindow
app1s_button_backup_start.Sensitive = false;
app1s_button_backup_cancel_close.Sensitive = true;
app1s_label_backup_cancel_close.Text = Catalog.GetString("Cancel");
-
+
app1s_notebook.CurrentPage = app1s_PAGE_BACKUP;
+
+ int files, sizeInKB;
+ Util.GetBackupsSize (out files, out sizeInKB);
+ app1s_label_backup_estimated_size.Text = string.Format(Catalog.GetString("Estimated size: {0}
MB."),
+ UtilAll.DivideSafe(sizeInKB, 1000));
}
private bool shouldAskBackupScheduled ()
diff --git a/src/gui/app1/session/main.cs b/src/gui/app1/session/main.cs
index 2054b9071..881cf75c7 100644
--- a/src/gui/app1/session/main.cs
+++ b/src/gui/app1/session/main.cs
@@ -154,6 +154,7 @@ public partial class ChronoJumpWindow
//notebook tab 7 (backup)
[Widget] Gtk.Notebook notebook_session_backup;
+ [Widget] Gtk.Label app1s_label_backup_estimated_size;
[Widget] Gtk.Button app1s_button_backup_select;
[Widget] Gtk.Button app1s_button_backup_start;
[Widget] Gtk.Button app1s_button_backup_cancel_close;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]