Skip to content
API Documentation
BastionGuard™
FinishBox Class Reference
Inheritance diagram for FinishBox:

Public Member Functions

 FinishBox (Gtk.Window _parent_window, bool _show_notes)
void refresh ()

Private Attributes

Gtk.Label lbl_header
Gtk.Label lbl_message
Gtk.Window parent_window
bool show_notes = true

Detailed Description

Definition at line 35 of file FinishBox.vala.

Constructor & Destructor Documentation

◆ FinishBox()

FinishBox.FinishBox ( Gtk.Window _parent_window,
bool _show_notes )
inline

Definition at line 43 of file FinishBox.vala.

43 {
44
45 log_debug("FinishBox: FinishBox()");
46
47 //base(Gtk.Orientation.VERTICAL, 6); // issue with vala
48 GLib.Object(orientation: Gtk.Orientation.VERTICAL, spacing: 6); // work-around
49 parent_window = _parent_window;
50 margin_top = 12;
51 margin_bottom = 12;
52 margin_start = 12;
53 margin_end = 12;
54 show_notes = _show_notes;
55
56 // header
57 if (show_notes){
58 lbl_header = add_label_header(this, _("Notes"), true);
59 }
60 else{
61 lbl_header = add_label_header(this, _("Setup Complete"), true);
62 }
63
64 lbl_message = add_label_scrolled(this, "", false, true, 0);
65
66 refresh();
67
68 log_debug("FinishBox: FinishBox(): exit");
69 }
#define _(s)
void refresh()
bool show_notes
Gtk.Label lbl_message
Gtk.Window parent_window
Gtk.Label lbl_header
void log_debug(string message)

References _, lbl_header, lbl_message, TeeJee.Logging.log_debug(), parent_window, refresh(), and show_notes.

Referenced by SetupWizardWindow.build_pages().

Member Function Documentation

◆ refresh()

void FinishBox.refresh ( )
inline

Definition at line 71 of file FinishBox.vala.

71 {
72
73 var msg = "";
74 string bullet = "• ";
75
76 if (!show_notes){
77 if (App.scheduled){
78 msg += bullet + _("Scheduled snapshots are enabled. Snapshots will be created automatically for selected levels.") + "\n\n";
79 }
80 else{
81 msg += bullet + _("Scheduled snapshots are disabled. It's recommended to enable it.") + "\n\n";
82 }
83 }
84
85 msg += bullet + _("System can be rolled-back to a previous date by restoring a snapshot.") + "\n\n";
86
87 if (App.btrfs_mode){
88 msg += bullet + _("Restoring a snapshot will replace system subvolumes, and system subvolumes currently in use will be preserved as a new snapshot. If required, this snapshot can be restored later to 'undo' the restore.") + "\n\n";
89 }
90 else{
91 msg += bullet + _("Restoring snapshots only replaces system files and settings. Non-hidden files and directories in user home directories will not be touched. This behaviour can be changed by adding a filter to include these files. Included files will be backed up when snapshot is created, and replaced when snapshot is restored.") + "\n\n";
92 }
93
94 if (App.btrfs_mode){
95 msg += bullet + _("BTRFS snapshots are saved on the same disk from which it is created. If the system disk fails, snapshots will be lost along with the system. Save snapshots to an external non-system disk in RSYNC mode to guard against disk failures.") + "\n\n";
96 }
97 else{
98 msg += bullet + _("Save snapshots to an external disk instead of the system disk to guard against drive failures.") + "\n\n";
99
100 msg += bullet + _("Saving snapshots to a non-system disk allows you to format and re-install the OS on the system disk without losing snapshots stored on it. You can even install another Linux distribution and later roll-back the previous distribution by restoring a snapshot.") + "\n\n";
101 }
102
103 msg += "\n";
104 msg += "<b>" + _("Close window to exit") + "</b>\n\n";
105
106 lbl_message.label = msg;
107 }
Main App
bool btrfs_mode
Definition Main.vala:52
bool scheduled
Definition Main.vala:1050

References _, App, Main.btrfs_mode, Main.scheduled, and show_notes.

Referenced by FinishBox(), and SetupWizardWindow.initialize_tab().

Member Data Documentation

◆ lbl_header

Gtk.Label FinishBox.lbl_header
private

Definition at line 37 of file FinishBox.vala.

Referenced by FinishBox().

◆ lbl_message

Gtk.Label FinishBox.lbl_message
private

Definition at line 38 of file FinishBox.vala.

Referenced by FinishBox().

◆ parent_window

Gtk.Window FinishBox.parent_window
private

Definition at line 40 of file FinishBox.vala.

Referenced by FinishBox().

◆ show_notes

bool FinishBox.show_notes = true
private

Definition at line 41 of file FinishBox.vala.

Referenced by FinishBox(), and refresh().


The documentation for this class was generated from the following file: