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

Public Member Functions

 ExcludeListSummaryWindow (bool _for_restore)
void refresh ()

Private Member Functions

void create_actions ()

Private Attributes

Gtk.Box vbox_main
Gtk.Label lbl_list
Gtk.Button btn_close
bool for_restore = false
int def_width = 500
int def_height = 450

Detailed Description

Definition at line 35 of file ExcludeListSummaryWindow.vala.

Constructor & Destructor Documentation

◆ ExcludeListSummaryWindow()

ExcludeListSummaryWindow.ExcludeListSummaryWindow ( bool _for_restore)
inline

Definition at line 45 of file ExcludeListSummaryWindow.vala.

45 {
46
47 log_debug("ExcludeListSummaryWindow: ExcludeListSummaryWindow()");
48
49 this.title = _("Exclude List Summary");
50 this.modal = true;
51 this.set_default_size (def_width, def_height);
52 this.set_icon_name("bastionguard-backup");
53
54 for_restore = _for_restore;
55
56 // vbox_main
57 vbox_main = new Gtk.Box(Orientation.VERTICAL, 6);
58 vbox_main.margin_start = 12;
59 vbox_main.margin_end = 12;
60 vbox_main.margin_top = 12;
61 vbox_main.margin_bottom = 12;
62 set_child(vbox_main);
63
64 add_label(vbox_main, _("Files & directories matching the patterns below will be excluded. Patterns starting with a + will include the item instead of excluding."));
65
66 lbl_list = add_label_scrolled(vbox_main, "", true, true);
67
69
70 refresh();
71
72 show();
73
74 log_debug("ExcludeListSummaryWindow: ExcludeListSummaryWindow(): exit");
75 }
#define _(s)
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(), create_actions(), def_height, def_width, for_restore, lbl_list, TeeJee.Logging.log_debug(), refresh(), and vbox_main.

Referenced by ExcludeBox.init_actions(), and ExcludeAppsBox.init_exclude_summary_link().

Member Function Documentation

◆ create_actions()

void ExcludeListSummaryWindow.create_actions ( )
inlineprivate

Definition at line 77 of file ExcludeListSummaryWindow.vala.

77 {
78
79 var hbox = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 6);
80 vbox_main.append(hbox);
81 var size_group = new Gtk.SizeGroup(SizeGroupMode.HORIZONTAL);
82
83 // close
84
85 var img = IconManager.lookup_image("emblem-ok-symbolic", 16);
86 btn_close = add_button(hbox, _("OK"), "", size_group, img);
87
88 btn_close.clicked.connect(()=>{
89 this.destroy();
90 });
91 }

References _, btn_close, IconManager.lookup_image(), and vbox_main.

Referenced by ExcludeListSummaryWindow().

◆ refresh()

void ExcludeListSummaryWindow.refresh ( )
inline

Definition at line 93 of file ExcludeListSummaryWindow.vala.

93 {
94
95 Gee.ArrayList<string> list;
96
97 if (for_restore){
99 }
100 else{
102 }
103
104 var txt = "";
105 foreach(var pattern in list){
106 if (pattern.strip().length > 0){
107 txt += "%s\n".printf(pattern);
108 }
109 }
110
111 lbl_list.label = txt;
112 }
Main App
Gee.ArrayList< string > create_exclude_list_for_backup()
Definition Main.vala:797
Gee.ArrayList< string > create_exclude_list_for_restore()
Definition Main.vala:907

References App, Main.create_exclude_list_for_backup(), Main.create_exclude_list_for_restore(), and for_restore.

Referenced by ExcludeListSummaryWindow().

Member Data Documentation

◆ btn_close

Gtk.Button ExcludeListSummaryWindow.btn_close
private

Definition at line 39 of file ExcludeListSummaryWindow.vala.

Referenced by create_actions().

◆ def_height

int ExcludeListSummaryWindow.def_height = 450
private

Definition at line 43 of file ExcludeListSummaryWindow.vala.

Referenced by ExcludeListSummaryWindow().

◆ def_width

int ExcludeListSummaryWindow.def_width = 500
private

Definition at line 42 of file ExcludeListSummaryWindow.vala.

Referenced by ExcludeListSummaryWindow().

◆ for_restore

bool ExcludeListSummaryWindow.for_restore = false
private

Definition at line 40 of file ExcludeListSummaryWindow.vala.

Referenced by ExcludeListSummaryWindow(), and refresh().

◆ lbl_list

Gtk.Label ExcludeListSummaryWindow.lbl_list
private

Definition at line 38 of file ExcludeListSummaryWindow.vala.

Referenced by ExcludeListSummaryWindow().

◆ vbox_main

Gtk.Box ExcludeListSummaryWindow.vbox_main
private

Definition at line 37 of file ExcludeListSummaryWindow.vala.

Referenced by create_actions(), and ExcludeListSummaryWindow().


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