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

Public Member Functions

 EstimateBox (Gtk.Window _parent_window)
void estimate_system_size ()

Private Attributes

Gtk.ProgressBar progressbar
Gtk.Window parent_window

Detailed Description

Definition at line 39 of file EstimateBox.vala.

Constructor & Destructor Documentation

◆ EstimateBox()

EstimateBox.EstimateBox ( Gtk.Window _parent_window)
inline

Definition at line 44 of file EstimateBox.vala.

44 {
45
46 log_debug("EstimateBox: EstimateBox()");
47
48 //base(Gtk.Orientation.VERTICAL, 6); // issue with vala
49 GLib.Object(orientation: Gtk.Orientation.VERTICAL, spacing: 6); // work-around
50 parent_window = _parent_window;
51 margin_top = 12;
52 margin_bottom = 12;
53 margin_start = 12;
54 margin_end = 12;
55
56 // header
57 add_label_header(this, _("Estimating System Size..."), true);
58
59 var hbox_status = new Gtk.Box(Orientation.HORIZONTAL, 6);
60 append(hbox_status);
61
62 var spinner = new Gtk.Spinner();
63 spinner.start();
64 hbox_status.append(spinner);
65
66 //lbl_msg
67 var lbl_msg = add_label(hbox_status, _("Please wait..."));
68 lbl_msg.halign = Align.START;
69 lbl_msg.ellipsize = Pango.EllipsizeMode.END;
70 lbl_msg.max_width_chars = 50;
71
72 //progressbar
73 progressbar = new Gtk.ProgressBar();
74 progressbar.pulse_step = 0.01;
75 //progressbar.set_size_request(-1,25);
76 append(progressbar);
77
78 log_debug("EstimateBox: EstimateBox(): exit");
79 }
#define _(s)
Gtk.ProgressBar progressbar
Gtk.Window parent_window
Gtk.Label add_label(Gtk.Box box, string text, bool bold=false, bool italic=false, bool large=false)
void log_debug(string message)

References _, TeeJee.GtkHelper.add_label(), TeeJee.Logging.log_debug(), parent_window, and progressbar.

Referenced by BackupWindow.build_pages(), and SetupWizardWindow.build_pages().

Member Function Documentation

◆ estimate_system_size()

void EstimateBox.estimate_system_size ( )
inline

Definition at line 81 of file EstimateBox.vala.

81 {
82
83 if (Main.first_snapshot_size > 0){
84 log_debug("EstimateBox: size > 0");
85 return;
86 }
87
88 // start the estimation if not already running
89
90 log_debug("EstimateBox: thread started");
91
92 #if XAPP
93 XApp.set_window_progress_pulse(parent_window, true);
94 #endif
95 progressbar.pulse();
96
98
99 #if XAPP
100 XApp.set_window_progress_pulse(parent_window, false);
101 #endif
102 }
Main App
uint64 estimate_system_size(progressCallback? callback=null)
Definition Main.vala:4168

References App, Main.estimate_system_size(), Main.first_snapshot_size, TeeJee.Logging.log_debug(), parent_window, and progressbar.

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

Member Data Documentation

◆ parent_window

Gtk.Window EstimateBox.parent_window
private

Definition at line 42 of file EstimateBox.vala.

Referenced by estimate_system_size(), and EstimateBox().

◆ progressbar

Gtk.ProgressBar EstimateBox.progressbar
private

Definition at line 41 of file EstimateBox.vala.

Referenced by estimate_system_size(), and EstimateBox().


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