Skip to content

Commit

Permalink
Add ui for user data backup (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbasu committed Jul 5, 2023
1 parent d8fbe51 commit 1fbf3d4
Show file tree
Hide file tree
Showing 2 changed files with 152 additions and 17 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ classifiers =
[options]
package_dir =
= src
packages = find:
packages = find_namespace:
python_requires = >=3.6
include_package_data = True
install_requires =
Expand Down
167 changes: 151 additions & 16 deletions src/LeaptimeManager/ui/user_data.ui
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ Author: Himadri Sekhar Basu <hsb10@iitbbs.ac.in>
<object class="GtkBox" id="backup_main">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="border-width">5</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkTreeView">
<object class="GtkTreeView" id="treeview_all_databackup_list">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="reorderable">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
Expand All @@ -67,60 +67,193 @@ Author: Himadri Sekhar Basu <hsb10@iitbbs.ac.in>
<property name="border-width">5</property>
<property name="orientation">vertical</property>
<child>
<!-- n-columns=2 n-rows=2 -->
<!-- n-columns=2 n-rows=6 -->
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-spacing">5</property>
<property name="column-spacing">5</property>
<child>
<object class="GtkLabel" id="label_data_source">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes">Please select source of the backup:</property>
<property name="label" translatable="yes">Name:</property>
<property name="selectable">True</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_data_dest">
<object class="GtkEntry" id="data_backup_name">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="tooltip-text" translatable="yes">GIve the the backup a name to identify individual backups.</property>
<property name="hexpand">True</property>
<property name="placeholder-text" translatable="yes">Enter the backup name.</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_data_source">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Please select where you want to save the backup:</property>
<property name="tooltip-text" translatable="yes">Please select the source of the backup.</property>
<property name="halign">end</property>
<property name="label" translatable="yes">Source:</property>
<property name="selectable">True</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkFileChooserButton" id="filechooserbutton_backup_dest">
<object class="GtkFileChooserButton" id="filechooserbutton_backup_source">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="action">select-folder</property>
<property name="title" translatable="yes">Please choose destination folder</property>
<property name="show-hidden">True</property>
<property name="title" translatable="yes">Please choose source folder</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkFileChooserButton" id="filechooserbutton_backup_source">
<object class="GtkLabel" id="label_data_dest">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="tooltip-text" translatable="yes">Please select the destination where you want to save the backup.</property>
<property name="halign">end</property>
<property name="label" translatable="yes">Destination:</property>
<property name="selectable">True</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkFileChooserButton" id="filechooserbutton_backup_dest">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="action">select-folder</property>
<property name="show-hidden">True</property>
<property name="title" translatable="yes">Please choose source folder</property>
<property name="title" translatable="yes">Please choose destination folder</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
<property name="top-attach">2</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">Method:</property>
<property name="selectable">True</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="methods_combo">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="active">0</property>
<property name="active-id">0</property>
<items>
<item id="0" translatable="yes">rsync</item>
<item id="1" translatable="yes">tarball</item>
</items>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="tar_format_label">
<property name="can-focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes">Tar Format:</property>
<property name="selectable">True</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="tar_format_combo">
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="active">0</property>
<property name="active-id">0</property>
<items>
<item id="0" translatable="yes">tar</item>
<item id="1" translatable="yes">tar.bz2</item>
<item id="2" translatable="yes">tar.gz</item>
<item id="3" translatable="yes">tar.xz</item>
</items>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</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">Description:</property>
<property name="selectable">True</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="data_backup_comment">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="tooltip-text" translatable="yes">Enter a description of the backup.</property>
<property name="hexpand">True</property>
<property name="placeholder-text" translatable="yes">Enter a description of the backup.</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
</packing>
</child>
</object>
Expand Down Expand Up @@ -167,7 +300,7 @@ Author: Himadri Sekhar Basu <hsb10@iitbbs.ac.in>
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow_excludes1">
<object class="GtkScrolledWindow" id="scrolledwindow_excludes_data">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">out</property>
Expand All @@ -182,7 +315,9 @@ Author: Himadri Sekhar Basu <hsb10@iitbbs.ac.in>
<property name="can-focus">True</property>
<property name="headers-visible">False</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
<object class="GtkTreeSelection" id="treeview_excludes_selection">
<property name="mode">multiple</property>
</object>
</child>
</object>
</child>
Expand Down Expand Up @@ -489,7 +624,7 @@ Author: Himadri Sekhar Basu <hsb10@iitbbs.ac.in>
</child>
</object>
<packing>
<property name="name">databackup_page5</property>
<property name="name">databackup_page4</property>
<property name="position">4</property>
</packing>
</child>
Expand Down

0 comments on commit 1fbf3d4

Please sign in to comment.