70 : Gtk::Box(Gtk::Orientation::VERTICAL) {
71 set_margin(12);
72
73
75
76
77 auto box_program = Gtk::make_managed<Gtk::Box>(Gtk::Orientation::VERTICAL, 8);
78
79
80 auto picture_icon = Gtk::make_managed<Gtk::Picture>();
81 try {
82 picture_icon->set_file(Gio::File::create_for_path(
resource(
"logo.png")));
83 picture_icon->set_size_request(64, 64);
84 } catch (...) {
85
86 }
87 picture_icon->set_halign(Gtk::Align::CENTER);
88 box_program->append(*picture_icon);
89
90
92
93 auto label_name = Gtk::make_managed<Gtk::Label>();
94 label_name->set_use_markup(true);
95 label_name->set_halign(Gtk::Align::CENTER);
96
97 label_name->set_markup(
98 Glib::ustring::compose(
99 "<b>BastionGuard™ Endpoint</b> "
100 "<span size='medium'><i>%1 · build %2</i></span>",
101 version,
102 build
103 )
104 );
105
106
107 box_program->append(*label_name);
108
109
110 auto label_copy = Gtk::make_managed<Gtk::Label>();
111 label_copy->set_use_markup(true);
112 std::time_t t = std::time(nullptr);
113 std::tm tm{};
114 localtime_r(&t, &tm);
115
116 int year = tm.tm_year + 1900;
117 std::string year_str = std::to_string(year);
118 label_copy->set_markup(
119 Glib::ustring::compose(
120 _(
"© 2025-%1 Calogero Scarnà — BastionGuard™\n"
121 "BastionGuard è stato depositato il 16/12/2025 presso UIBM (Italia) con il numero 302025000196519.\n"
122 "Il motore anti-ransomware e anti-phishing è parte integrante della piattaforma di sicurezza.\n"
123 "Il sistema include la scansione delle periferiche USB,\n"
124 "scansione delle cartelle samba\n"
125 "e le funzionalità di blocco di microfono e webcam.\n"
126 "La protezione comprende la scansione in tempo reale con inotify.\n"
127 "ClamAV® è un marchio registrato da Cisco\n"
128 "%2\n"),
129 year_str,
130 "<a href='https://www.codelinsoft.it' title='Visita CodeLinSoft'>"
131 "Powered by <b>CodeLinSoft</b></a>"
132 )
133 );
134
135
136 label_copy->set_halign(Gtk::Align::CENTER);
137 label_copy->set_justify(Gtk::Justification::CENTER);
138 label_copy->set_wrap(true);
139 box_program->append(*label_copy);
140
141
142 notebook_.append_page(*box_program,
_(
"Programma"));
143
144
145 auto box_thirdparty = Gtk::make_managed<Gtk::Box>(Gtk::Orientation::VERTICAL, 8);
146 Glib::ustring thirdparty_text =
147 _(
"Questa applicazione utilizza:\n"
148 "- ClamAV Antivirus Engine\n"
149 "- GTK4 / gtkmm-4\n"
150 "- Image / libpng\n"
151 "- Rules / yara\n"
152 "- Udev\n"
153 "- Libudev\n"
154 "- Nginx\n"
155 "- php\n"
156 "- Sigc++\n"
157 "- Libsecret\n"
158 "- IDN2\n"
159 "- SQLITE3\n"
160 "- HYPERSCAN\n"
161 "- RE2\n"
162 "- Polkit\n"
163 "- Nlohmann_json\n"
164 "- DNSmasq /blocco pagine\n"
165 "- Antiphishing server/ libsoup\n");
167 thirdparty_text +=
_(
"- Sandbox bancario/ chromium sandbox (CEF)\n");
168 }
169 thirdparty_text +=
_(
"- MISP lista per le banche\n");
170
171 auto label_thirdparty = Gtk::make_managed<Gtk::Label>(thirdparty_text);
172 label_thirdparty->set_wrap(true);
173 box_thirdparty->append(*label_thirdparty);
174 notebook_.append_page(*box_thirdparty,
_(
"Terze Parti"));
175
176
177 auto box_license = Gtk::make_managed<Gtk::Box>(Gtk::Orientation::VERTICAL, 8);
178
179 auto sw = Gtk::make_managed<Gtk::ScrolledWindow>();
180 sw->set_expand(true);
181 sw->set_policy(Gtk::PolicyType::AUTOMATIC, Gtk::PolicyType::AUTOMATIC);
182
183 auto tv = Gtk::make_managed<Gtk::TextView>();
184 tv->set_editable(false);
185 tv->set_wrap_mode(Gtk::WrapMode::WORD);
186
187 auto buf = Gtk::TextBuffer::create();
189 tv->set_buffer(buf);
190
191 sw->set_child(*tv);
192 box_license->append(*sw);
193
194 notebook_.append_page(*box_license,
_(
"Licenza"));
195
196
197 auto box_db = Gtk::make_managed<Gtk::Box>(Gtk::Orientation::VERTICAL, 8);
198
199 auto swdb = Gtk::make_managed<Gtk::ScrolledWindow>();
200 swdb->set_expand(true);
201 swdb->set_policy(Gtk::PolicyType::AUTOMATIC, Gtk::PolicyType::AUTOMATIC);
202
203 auto tvdb = Gtk::make_managed<Gtk::TextView>();
204 tvdb->set_editable(false);
205 tvdb->set_wrap_mode(Gtk::WrapMode::WORD);
206
207 auto bufdb = Gtk::TextBuffer::create();
209 tvdb->set_buffer(bufdb);
210
211 swdb->set_child(*tvdb);
212 box_db->append(*swdb);
213
214 notebook_.append_page(*box_db,
_(
"Database"));
215
216}
std::string load_license_text()
std::pair< std::string, std::string > load_version_build()
std::string load_database_info()
std::string resource(const std::string &rel)