[chronojump] Database backup... to session/more 50% done
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Database backup... to session/more 50% done
- Date: Wed, 20 May 2020 11:37:35 +0000 (UTC)
commit db6f9d2ad564bd8b433d80b65d01afd6c481a1d7
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed May 20 13:36:29 2020 +0200
Database backup... to session/more 50% done
chronojump.csproj | 1 +
glade/app1.glade | 390 ++++++++++++++++++++++++++++++++--
src/Makefile.am | 1 +
src/gui/app1/icons.cs | 5 +
src/gui/app1/session/backup.cs | 53 +++++
src/gui/app1/session/loadAndImport.cs | 5 -
src/gui/app1/session/main.cs | 13 +-
7 files changed, 450 insertions(+), 18 deletions(-)
---
diff --git a/chronojump.csproj b/chronojump.csproj
index 73505999..9f625182 100644
--- a/chronojump.csproj
+++ b/chronojump.csproj
@@ -1226,6 +1226,7 @@
<Compile Include="src\gui\app1\session\loadAndImport.cs" />
<Compile Include="src\gui\app1\session\delete.cs" />
<Compile Include="src\gui\app1\session\addEdit.cs" />
+ <Compile Include="src\gui\app1\session\backup.cs" />
<Compile Include="src\json\compujumpEncoder.cs" />
<Compile Include="src\json\compujumpForceSensor.cs" />
<Compile Include="src\json\compujumpOther.cs" />
diff --git a/glade/app1.glade b/glade/app1.glade
index ca136e1e..775b6cb5 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -24340,6 +24340,9 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -27180,18 +27183,6 @@ 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>
@@ -27228,6 +27219,18 @@ 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>
@@ -35097,6 +35100,9 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -36016,6 +36022,7 @@ then click this button.</property>
<property
name="receives_default">False</property>
<property name="tooltip" translatable="yes">Make
a copy of all the data</property>
<property name="use_underline">True</property>
+ <signal name="clicked"
handler="on_button_db_backup_clicked" swapped="no"/>
</widget>
<packing>
<property name="expand">True</property>
@@ -38916,6 +38923,365 @@ then click this button.</property>
<property name="type">tab</property>
</packing>
</child>
+ <child>
+ <widget class="GtkHBox" id="hbox_session_backup">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkVBox" id="vbox218">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkVBox" id="session_backup_box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">25</property>
+ <child>
+ <widget class="GtkFrame" id="frame22">
+ <property name="width_request">500</property>
+ <property name="height_request">400</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">1</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <widget class="GtkViewport" id="viewport18">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">4</property>
+ <child>
+ <widget class="GtkVBox" id="vbox220">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">20</property>
+ <property name="spacing">30</property>
+ <child>
+ <widget class="GtkVBox" id="vbox221">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <widget class="GtkHBox" id="hbox366">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">30</property>
+ <child>
+ <widget class="GtkLabel" id="label531">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Select
destination</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton"
id="app1s_button_backup_select">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <signal name="clicked"
handler="on_app1s_button_backup_select_clicked" swapped="no"/>
+ <child>
+ <widget class="GtkHBox" id="hbox388">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">8</property>
+ <child>
+ <widget class="GtkImage"
id="app1s_image_button_backup_select">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property
name="stock">gtk-missing-image</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="app1s_label_button_backup_select">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Select</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="app1s_label_backup_destination">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="ellipsize">middle</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVButtonBox" id="vbuttonbox4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">20</property>
+ <child>
+ <widget class="GtkButton"
id="app1s_button_backup_start">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <signal name="clicked"
handler="on_app1s_button_backup_start_clicked" swapped="no"/>
+ <child>
+ <widget class="GtkLabel" id="label532">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Start
backup</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox_session_more6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkLabel" id="label533">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Session</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label534">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">/</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label535">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">More</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label536">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">/</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label537">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Backup</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHButtonBox" id="hbuttonbox7">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="layout_style">spread</property>
+ <child>
+ <widget class="GtkVBox" id="vbox222">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkButton"
id="app1s_button_backup_cancel">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property
name="receives_default">False</property>
+ <signal name="clicked"
handler="on_app1s_button_backup_cancel_or_close_clicked" swapped="no"/>
+ <accelerator key="Escape" signal="clicked"/>
+ <child>
+ <widget class="GtkEventBox"
id="app1s_eventbox_button_backup_cancel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkLabel" id="label538">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Cancel</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton"
id="app1s_button_backup_close">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property
name="receives_default">False</property>
+ <signal name="clicked"
handler="on_app1s_button_backup_cancel_or_close_clicked" swapped="no"/>
+ <accelerator key="Escape" signal="clicked"/>
+ <child>
+ <widget class="GtkEventBox"
id="app1s_eventbox_button_backup_close">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkLabel" id="label539">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Close</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">7</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label529">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">database backup</property>
+ </widget>
+ <packing>
+ <property name="position">7</property>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
</widget>
</child>
</widget>
diff --git a/src/Makefile.am b/src/Makefile.am
index 0f4edc6b..02f9d5dc 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -19,6 +19,7 @@ SOURCES = \
gui/app1/forceSensorAnalyze.cs\
gui/app1/session/delete.cs\
gui/app1/session/addEdit.cs\
+ gui/app1/session/backup.cs\
gui/app1/session/loadAndImport.cs\
gui/app1/session/main.cs\
gui/app1/jump.cs\
diff --git a/src/gui/app1/icons.cs b/src/gui/app1/icons.cs
index 4b4bdd3a..71e49b9d 100644
--- a/src/gui/app1/icons.cs
+++ b/src/gui/app1/icons.cs
@@ -392,6 +392,9 @@ public partial class ChronoJumpWindow
image_session_load1.Pixbuf = pixbuf;
image_session_load2.Pixbuf = pixbuf;
image_session_load3_blue.Pixbuf = pixbuf;
+ app1s_image_open_database.Pixbuf = pixbuf;
+ app1s_image_button_backup_select.Pixbuf = pixbuf;
+
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "folder_open_yellow.png");
image_session_load3_yellow.Pixbuf = pixbuf;
@@ -578,6 +581,8 @@ public partial class ChronoJumpWindow
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + Constants.FileNameImport);
image_session_import.Pixbuf = pixbuf;
image_session_import1_blue.Pixbuf = pixbuf;
+ app1s_image_import.Pixbuf = pixbuf;
+ app1s_image_import1.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + Constants.FileNameImportYellow);
image_session_import1_yellow.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + Constants.FileNameExport);
diff --git a/src/gui/app1/session/backup.cs b/src/gui/app1/session/backup.cs
new file mode 100644
index 00000000..2ab64c6d
--- /dev/null
+++ b/src/gui/app1/session/backup.cs
@@ -0,0 +1,53 @@
+/*
+ * This file is part of ChronoJump
+ *
+ * ChronoJump is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * ChronoJump is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Copyright (C) 2020 Xavier de Blas <xaviblas gmail com>
+ */
+
+using System;
+using Gtk;
+//using Glade;
+//using GLib; //for Value
+//using System.Text; //StringBuilder
+//using System.Collections; //ArrayList
+//using Mono.Unix;
+
+public partial class ChronoJumpWindow
+{
+ private void on_button_db_backup_clicked (object o, EventArgs args)
+ {
+ app1s_label_backup_destination.Text = "";
+ app1s_button_backup_start.Sensitive = false;
+ app1s_button_backup_cancel.Visible = true;
+ app1s_button_backup_close.Visible = false;
+
+ app1s_notebook.CurrentPage = app1s_PAGE_BACKUP;
+ }
+
+ private void on_app1s_button_backup_select_clicked (object o, EventArgs args)
+ {
+ }
+
+ private void on_app1s_button_backup_start_clicked (object o, EventArgs args)
+ {
+ }
+
+ private void on_app1s_button_backup_cancel_or_close_clicked (object o, EventArgs args)
+ {
+ app1s_notebook.CurrentPage = app1s_PAGE_MODES;
+ }
+}
diff --git a/src/gui/app1/session/loadAndImport.cs b/src/gui/app1/session/loadAndImport.cs
index 8528b820..254059ed 100644
--- a/src/gui/app1/session/loadAndImport.cs
+++ b/src/gui/app1/session/loadAndImport.cs
@@ -19,7 +19,6 @@
*/
using System;
-using Gdk; //Pixbuf
using Gtk;
using Glade;
using GLib; //for Value
@@ -92,10 +91,6 @@ public partial class ChronoJumpWindow
}
app1s_entry_search_filter.Text = "";
- app1s_image_open_database.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"folder_open.png");
- app1s_image_import.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
Constants.FileNameImport);
- app1s_image_import1.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
Constants.FileNameImport);
-
app1s_createTreeView(app1s_treeview_session_load, false, false, false);
app1s_store = app1s_getStore(false, false, false);
app1s_treeview_session_load.Model = app1s_store;
diff --git a/src/gui/app1/session/main.cs b/src/gui/app1/session/main.cs
index c0804e4e..af22f5d5 100644
--- a/src/gui/app1/session/main.cs
+++ b/src/gui/app1/session/main.cs
@@ -84,6 +84,14 @@ public partial class ChronoJumpWindow
//notebook tab 5
[Widget] Gtk.EventBox app1s_eventbox_button_delete_close;
+ //notebook tab 6 (backup)
+ [Widget] Gtk.Image app1s_image_button_backup_select;
+ [Widget] Gtk.Label app1s_label_backup_destination;
+ [Widget] Gtk.Button app1s_button_backup_start;
+ [Widget] Gtk.Button app1s_button_backup_cancel;
+ [Widget] Gtk.Button app1s_button_backup_close;
+ [Widget] Gtk.EventBox app1s_eventbox_button_backup_cancel;
+ [Widget] Gtk.EventBox app1s_eventbox_button_backup_close;
const int app1s_PAGE_MODES = 0;
const int app1s_PAGE_IMPORT_START = 1;
@@ -91,7 +99,8 @@ public partial class ChronoJumpWindow
public const int app1s_PAGE_IMPORT_CONFIRM = 3;
public const int app1s_PAGE_IMPORT_RESULT = 4;
public const int app1s_PAGE_DELETE_CONFIRM = 5;
- public const int app1s_PAGE_ADD_EDIT = 6;
+ const int app1s_PAGE_ADD_EDIT = 6;
+ const int app1s_PAGE_BACKUP = 7;
private int app1s_notebook_sup_entered_from; //to store from which page we entered (to return at it)
@@ -124,6 +133,8 @@ public partial class ChronoJumpWindow
UtilGtk.EventBoxColorBackgroundActive (app1s_eventbox_button_import_close, UtilGtk.YELLOW,
UtilGtk.YELLOW_LIGHT);
UtilGtk.EventBoxColorBackgroundActive (app1s_eventbox_button_import_again, UtilGtk.YELLOW,
UtilGtk.YELLOW_LIGHT);
UtilGtk.EventBoxColorBackgroundActive (app1s_eventbox_button_delete_close, UtilGtk.YELLOW,
UtilGtk.YELLOW_LIGHT);
+ UtilGtk.EventBoxColorBackgroundActive (app1s_eventbox_button_backup_cancel, UtilGtk.YELLOW,
UtilGtk.YELLOW_LIGHT);
+ UtilGtk.EventBoxColorBackgroundActive (app1s_eventbox_button_backup_close, UtilGtk.YELLOW,
UtilGtk.YELLOW_LIGHT);
}
private void app1s_label_session_set_name()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]