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

Public Member Functions

 ExcludeAppsBox (Gtk.Window _parent_window)
void refresh ()
void refresh_treeview ()

Private Member Functions

void init_listbox ()
Gtk.Widget create_row (AppExcludeEntry entry)
void init_exclude_summary_link (Gtk.Box box)

Private Attributes

Gtk.ListBox listbox
Gtk.Window parent_window

Detailed Description

Definition at line 16 of file ExcludeAppsBox.vala.

Constructor & Destructor Documentation

◆ ExcludeAppsBox()

ExcludeAppsBox.ExcludeAppsBox ( Gtk.Window _parent_window)
inline

Definition at line 20 of file ExcludeAppsBox.vala.

20 {
21 log_debug("ExcludeAppsBox: ExcludeAppsBox()");
22 GLib.Object(orientation: Gtk.Orientation.VERTICAL, spacing: 6);
23 parent_window = _parent_window;
24 margin_top = 12;
25 margin_bottom = 12;
26 margin_start = 12;
27 margin_end = 12;
28
29 var header_box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 6);
30 append(header_box);
31 add_label_header(header_box, _("Exclude Application Settings"), true);
32
33 var buffer = add_label(header_box, "");
34 buffer.hexpand = true;
35 init_exclude_summary_link(header_box);
36
39 log_debug("ExcludeAppsBox: ExcludeAppsBox(): exit");
40 }
#define _(s)
void init_exclude_summary_link(Gtk.Box box)
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(), init_exclude_summary_link(), init_listbox(), TeeJee.Logging.log_debug(), parent_window, and refresh_treeview().

Referenced by RestoreWindow.build_pages().

Member Function Documentation

◆ create_row()

Gtk.Widget ExcludeAppsBox.create_row ( AppExcludeEntry entry)
inlineprivate

Definition at line 55 of file ExcludeAppsBox.vala.

55 {
56 var row = new Gtk.ListBoxRow();
57 var box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 12);
58 box.margin_start = 8;
59 box.margin_end = 8;
60 box.margin_top = 6;
61 box.margin_bottom = 6;
62 row.set_child(box);
63
64 var toggle = new Gtk.CheckButton();
65 toggle.active = entry.enabled;
66 toggle.valign = Gtk.Align.CENTER;
67 toggle.toggled.connect(()=>{
68 entry.enabled = toggle.active;
69 });
70 box.append(toggle);
71
72 var name = new Gtk.Label(entry.name);
73 name.xalign = 0.0f;
74 name.hexpand = true;
75 name.wrap = true;
76 name.tooltip_text = entry.tooltip_text();
77 box.append(name);
78
79 return row;
80 }

References AppExcludeEntry.enabled, AppExcludeEntry.name, and AppExcludeEntry.tooltip_text().

Referenced by refresh_treeview().

◆ init_exclude_summary_link()

void ExcludeAppsBox.init_exclude_summary_link ( Gtk.Box box)
inlineprivate

Definition at line 82 of file ExcludeAppsBox.vala.

82 {
83 var size_group = new Gtk.SizeGroup(SizeGroupMode.HORIZONTAL);
84 var button = add_button(box, _("Summary"), "", size_group, null);
85 button.clicked.connect(()=>{
87 });
88 }
ExcludeListSummaryWindow(bool _for_restore)

References _, and ExcludeListSummaryWindow.ExcludeListSummaryWindow().

Referenced by ExcludeAppsBox().

◆ init_listbox()

void ExcludeAppsBox.init_listbox ( )
inlineprivate

Definition at line 42 of file ExcludeAppsBox.vala.

42 {
43 listbox = new Gtk.ListBox();
44 listbox.selection_mode = Gtk.SelectionMode.NONE;
45 listbox.add_css_class("boxed-list");
46
47 var scrolled = new Gtk.ScrolledWindow();
48 scrolled.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
49 scrolled.set_child(listbox);
50 scrolled.hexpand = true;
51 scrolled.vexpand = true;
52 append(scrolled);
53 }
Gtk.ListBox listbox

References listbox.

Referenced by ExcludeAppsBox().

◆ refresh()

void ExcludeAppsBox.refresh ( )
inline

Definition at line 90 of file ExcludeAppsBox.vala.

90 {
92 }

References refresh_treeview().

Referenced by RestoreWindow.initialize_tab().

◆ refresh_treeview()

void ExcludeAppsBox.refresh_treeview ( )
inline

Definition at line 94 of file ExcludeAppsBox.vala.

94 {
95 Gtk.Widget? child = listbox.get_first_child();
96 while (child != null){
97 Gtk.Widget? next = child.get_next_sibling();
98 listbox.remove(child);
99 child = next;
100 }
101
102 foreach(var entry in App.exclude_list_apps){
103 listbox.append(create_row(entry));
104 }
105 }
Main App
Gtk.Widget create_row(AppExcludeEntry entry)
Gee.ArrayList< AppExcludeEntry > exclude_list_apps
Definition Main.vala:66

References App, create_row(), Main.exclude_list_apps, and listbox.

Referenced by ExcludeAppsBox(), and refresh().

Member Data Documentation

◆ listbox

Gtk.ListBox ExcludeAppsBox.listbox
private

Definition at line 17 of file ExcludeAppsBox.vala.

Referenced by init_listbox(), and refresh_treeview().

◆ parent_window

Gtk.Window ExcludeAppsBox.parent_window
private

Definition at line 18 of file ExcludeAppsBox.vala.

Referenced by ExcludeAppsBox().


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