53 GLib.Object(orientation: Gtk.Orientation.VERTICAL, spacing: 6);
60 add_label_header(
this,
_(
"Select Snapshot Levels"),
true);
62 Gtk.CheckButton chk_m, chk_w, chk_d, chk_h, chk_b =
null;
63 Gtk.SpinButton spin_m, spin_w, spin_d, spin_h, spin_b;
70 chk_m.toggled.connect(()=>{
71 App.schedule_monthly = chk_m.active;
79 spin_m.value_changed.connect(()=>{
80 App.count_monthly = (int) spin_m.get_value();
88 chk_w.toggled.connect(()=>{
89 App.schedule_weekly = chk_w.active;
97 spin_w.value_changed.connect(()=>{
98 App.count_weekly = (int) spin_w.get_value();
106 chk_d.toggled.connect(()=>{
107 App.schedule_daily = chk_d.active;
115 spin_d.value_changed.connect(()=>{
116 App.count_daily = (int) spin_d.get_value();
124 chk_h.toggled.connect(()=>{
125 App.schedule_hourly = chk_h.active;
133 spin_h.value_changed.connect(()=>{
134 App.count_hourly = (int) spin_h.get_value();
142 chk_b.toggled.connect(()=>{
143 App.schedule_boot = chk_b.active;
151 spin_b.value_changed.connect(()=>{
152 App.count_boot = (int) spin_b.get_value();
157 chk_cron = add_checkbox(
this,
_(
"Stop cron emails for scheduled tasks"));
159 chk_cron.set_tooltip_text(
_(
"The cron service sends the output of scheduled tasks as an email to the current user. Select this option to suppress the emails for cron tasks created by BastionGuard Backup."));
161 chk_cron.margin_start = 6;
163 chk_cron.margin_end = 6;
165 chk_cron.margin_top = 6;
167 chk_cron.margin_bottom = 6;
168 chk_cron.margin_top = 12;
172 App.stop_cron_emails =
chk_cron.active;
175 var msg =
"<i>• %s\n• %s\n• %s</i>".printf(
176 _(
"Snapshots are not scheduled at fixed times."),
177 _(
"A maintenance task runs once every hour and creates snapshots as needed."),
178 _(
"Boot snapshots are created with a delay of 10 minutes after system startup."));
181 var label =
new Gtk.Label(
"");
182 label.vexpand =
true;
187 var scrolled =
new Gtk.ScrolledWindow();
188 scrolled.hscrollbar_policy = Gtk.PolicyType.NEVER;
189 scrolled.vscrollbar_policy = Gtk.PolicyType.AUTOMATIC;
190 scrolled.set_size_request(-1, 100);
191 scrolled.margin_top = 6;
192 scrolled.margin_bottom = 6;
193 this.append(scrolled);
195 label =
new Gtk.Label(msg);
196 label.set_use_markup(
true);
199 label.wrap_mode = Pango.WrapMode.WORD;
200 label.margin_start = 6;
201 label.margin_end = 6;
202 label.margin_top = 6;
203 label.margin_bottom = 6;
204 scrolled.set_child(label);
208 scrolled =
new Gtk.ScrolledWindow();
209 scrolled.hscrollbar_policy = Gtk.PolicyType.NEVER;
210 scrolled.vscrollbar_policy = Gtk.PolicyType.NEVER;
211 scrolled.set_size_request(-1, 100);
215 var hbox =
new Gtk.Box(Orientation.HORIZONTAL, 6);
216 hbox.margin_start = 6;
219 hbox.margin_bottom = 6;
220 hbox.margin_bottom = 12;
221 scrolled.set_child(hbox);
226 img_shield.margin_bottom = 6;
229 var vbox =
new Gtk.Box(Orientation.VERTICAL, 6);
235 lbl_shield.yalign = 0.5f;
240 lbl_shield_subnote.yalign = 0.5f;
243 lbl_shield_subnote.wrap =
true;
244 lbl_shield_subnote.wrap_mode = Pango.WrapMode.WORD;
248 log_debug(
"ScheduleBox: ScheduleBox(): exit");
276 Gtk.Box box,
string period,
string period_desc,
277 out Gtk.CheckButton chk, out Gtk.SpinButton spin){
279 var hbox =
new Gtk.Box(Gtk.Orientation.HORIZONTAL, 6);
280 hbox.margin_start = 6;
283 hbox.margin_bottom = 6;
285 hbox.margin_bottom = 1;
289 sg_title =
new Gtk.SizeGroup(Gtk.SizeGroupMode.HORIZONTAL);
290 sg_subtitle =
new Gtk.SizeGroup(Gtk.SizeGroupMode.HORIZONTAL);
291 sg_count =
new Gtk.SizeGroup(Gtk.SizeGroupMode.HORIZONTAL);
294 var txt =
"<b>%s</b>".printf(period);
295 chk = add_checkbox(hbox, txt);
298 var tt =
_(
"Number of snapshots to keep.\nOlder snapshots will be removed once this limit is exceeded.");
300 label.set_tooltip_text(tt);
302 var spin2 = add_spin(hbox, 1, 999, 10);
303 spin2.set_tooltip_text(tt);
306 spin2.notify[
"sensitive"].connect(()=>{
307 label.sensitive = spin2.sensitive;