Skip to content
API Documentation
BastionGuard™
RestoreSummaryBox.vala
Go to the documentation of this file.
1/*
2 * RestoreSummaryBox.vala
3 *
4 * Copyright 2012-2018 Tony George <teejeetech@gmail.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 * MA 02110-1301, USA.
20 *
21 *
22 */
23
24using Gtk;
25using Gee;
26
27using TeeJee.Logging;
32using TeeJee.System;
33using TeeJee.Misc;
34
35class RestoreSummaryBox : Gtk.Box{
36
37 public Gtk.Label lbl_devices;
38 public Gtk.Label lbl_reboot;
39 public Gtk.Label lbl_disclaimer;
40 private Gtk.Window parent_window;
41
42 public RestoreSummaryBox (Gtk.Window _parent_window) {
43
44 log_debug("RestoreSummaryBox: RestoreSummaryBox()");
45
46 //base(Gtk.Orientation.VERTICAL, 6); // issue with vala
47 GLib.Object(orientation: Gtk.Orientation.VERTICAL, spacing: 6); // work-around
48 parent_window = _parent_window;
49 margin_top = 12;
50 margin_bottom = 12;
51 margin_start = 12;
52 margin_end = 12;
53
54 // devices
55
56 add_label_header(this, _("Warning"), true);
57
58 lbl_devices = add_label(this, "", false, false, false);
59
60 // reboot warning
61
62 lbl_reboot = add_label(this, "", true, false, false);
63 lbl_reboot.margin_bottom = 6;
64
65 // disclaimer
66
67 add_label_header(this, _("Disclaimer"), true);
68
69 lbl_disclaimer = add_label(this, "", false, false, false);
70
71
72 log_debug("RestoreSummaryBox: RestoreSummaryBox(): exit");
73 }
74
75 public void refresh(){
76
77 string msg_devices = "";
78 string msg_reboot = "";
79 string msg_disclaimer = "";
80
82 true, out msg_devices, out msg_reboot,
83 out msg_disclaimer);
84
85 lbl_devices.label = msg_devices;
86 lbl_reboot.label = msg_reboot;
87 lbl_disclaimer.label = msg_disclaimer;
88 }
89}
Main App
#define _(s)
void get_restore_messages(bool formatted, out string msg_devices, out string msg_reboot, out string msg_disclaimer)
Definition Main.vala:2400
RestoreSummaryBox(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)