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

Public Member Functions

 BootOptionsWindow ()

Private Member Functions

bool init_delayed ()
bool on_close_request ()
void save_changes ()
void create_actions ()

Private Attributes

Gtk.Box vbox_main
BootOptionsBox boot_options_box
uint tmr_init

Detailed Description

Definition at line 35 of file BootOptionsWindow.vala.

Constructor & Destructor Documentation

◆ BootOptionsWindow()

BootOptionsWindow.BootOptionsWindow ( )
inline

Definition at line 42 of file BootOptionsWindow.vala.

42 {
43
44 log_debug("BootOptionsWindow: BootOptionsWindow()");
45
46 this.title = _("Bootloader Options");
47 this.modal = true;
48 //this.set_default_size (def_width, def_height);
49 this.set_icon_name("bastionguard-backup");
50
51 this.close_request.connect(() => {
52 return on_close_request();
53 });
54
55 // vbox_main
56 vbox_main = new Gtk.Box(Orientation.VERTICAL, 6);
57 vbox_main.margin_start = 12;
58 vbox_main.margin_end = 12;
59 vbox_main.margin_top = 12;
60 vbox_main.margin_bottom = 12;
61 set_child(vbox_main);
62
64 boot_options_box.margin_start = 0;
65 boot_options_box.margin_end = 0;
66 boot_options_box.margin_top = 0;
67 boot_options_box.margin_bottom = 0;
69
71
72 show();
73
74 tmr_init = Timeout.add(100, init_delayed);
75
76 log_debug("BootOptionsWindow: BootOptionsWindow(): exit");
77 }
#define _(s)
BootOptionsBox(Gtk.Window _parent_window)
BootOptionsBox boot_options_box
void log_debug(string message)

References _, boot_options_box, BootOptionsBox.BootOptionsBox(), create_actions(), init_delayed(), TeeJee.Logging.log_debug(), on_close_request(), tmr_init, and vbox_main.

Referenced by RestoreDeviceBox.add_boot_options().

Member Function Documentation

◆ create_actions()

void BootOptionsWindow.create_actions ( )
inlineprivate

Definition at line 100 of file BootOptionsWindow.vala.

100 {
101
102 var hbox = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6);
103 hbox.margin_start = 0;
104 hbox.margin_end = 0;
105 hbox.margin_top = 0;
106 hbox.margin_bottom = 0;
107 hbox.margin_top = 24;
108 vbox_main.append(hbox);
109
110 var size_group = new Gtk.SizeGroup(SizeGroupMode.HORIZONTAL);
111
112 // close
113 var btn_close = add_button(hbox, _("Close"), "", size_group, null);
114 //hbox.set_child_packing(btn_close, false, true, 6, Gtk.PackType.END);
115
116 btn_close.clicked.connect(()=>{
117 save_changes();
118 this.destroy();
119 });
120 }

References _, save_changes(), and vbox_main.

Referenced by BootOptionsWindow().

◆ init_delayed()

bool BootOptionsWindow.init_delayed ( )
inlineprivate

Definition at line 79 of file BootOptionsWindow.vala.

79 {
80
81 if (tmr_init > 0){
82 Source.remove(tmr_init);
83 tmr_init = 0;
84 }
85
86 return false;
87 }

References tmr_init.

Referenced by BootOptionsWindow().

◆ on_close_request()

bool BootOptionsWindow.on_close_request ( )
inlineprivate

Definition at line 89 of file BootOptionsWindow.vala.

89 {
90
91 //save_changes();
92
93 return false; // close window
94 }

Referenced by BootOptionsWindow().

◆ save_changes()

void BootOptionsWindow.save_changes ( )
inlineprivate

Definition at line 96 of file BootOptionsWindow.vala.

96 {
97 //App.cron_job_update();
98 }

Referenced by create_actions().

Member Data Documentation

◆ boot_options_box

BootOptionsBox BootOptionsWindow.boot_options_box
private

Definition at line 38 of file BootOptionsWindow.vala.

Referenced by BootOptionsWindow().

◆ tmr_init

uint BootOptionsWindow.tmr_init
private

Definition at line 40 of file BootOptionsWindow.vala.

Referenced by BootOptionsWindow(), and init_delayed().

◆ vbox_main

Gtk.Box BootOptionsWindow.vbox_main
private

Definition at line 37 of file BootOptionsWindow.vala.

Referenced by BootOptionsWindow(), and create_actions().


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