Skip to content
API Documentation
BastionGuard™
BackupFinishBox.vala
Go to the documentation of this file.
1/*
2 * BackupFinishBox.vala
3 *
4 * Copyright 2016 Tony George <tony.george.kol@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 BackupFinishBox : Gtk.Box{
36 private Gtk.Label lbl_header;
37 private Gtk.Label lbl_message;
38 private Gtk.Window parent_window;
39
40 public BackupFinishBox (Gtk.Window _parent_window) {
41
42 log_debug("BackupFinishBox: BackupFinishBox()");
43
44 //base(Gtk.Orientation.VERTICAL, 6); // issue with vala
45 GLib.Object(orientation: Gtk.Orientation.VERTICAL, spacing: 6); // work-around
46 parent_window = _parent_window;
47 margin_top = 12;
48 margin_bottom = 12;
49 margin_start = 12;
50 margin_end = 12;
51
52
53 lbl_header = add_label_header(this, _("Completed"), true);
54 lbl_message = add_label_scrolled(this, "", false, true, 0);
55
56 log_debug("BackupFinishBox: BackupFinishBox(): exit");
57 }
58
59 public void update_message(bool success){
60
61 var txt = "";
62
63 txt = _("Snapshot Created");
64
65 if (!success){
66 txt += " " + _("With Errors");
67 }
68
69 lbl_header.label = format_text(txt, true, false, true);
70
71 var msg = "";
72
73 msg += _("Close window to exit") + "\n\n";
74
75 lbl_message.label = msg;
76 }
77
78}
#define _(s)
BackupFinishBox(Gtk.Window _parent_window)
void update_message(bool success)
Gtk.Window parent_window
void log_debug(string message)