/* * BastionGuard™ * Copyright (C) 2025–2026 Calogero Scarnà * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * BastionGuard™ is a trademark of Calogero Scarnà. * The BastionGuard™ name and branding are not licensed under the GPL. */ #pragma once #include #include "Backend.hpp" class SambaPage : public Gtk::Box { public: SambaPage(); virtual ~SambaPage() = default; private: struct SambaColumns : public Gtk::TreeModel::ColumnRecord { SambaColumns() { add(col_path); add(col_color); } Gtk::TreeModelColumn col_path; Gtk::TreeModelColumn col_color; }; SambaColumns sambaCols; Glib::RefPtr sambaStore; Gtk::TreeView sambaView; Gtk::Switch switchEnable; Gtk::Button btnAdd, btnRemove, btnScan, btnSave; bool loading_ = false; void loadConfig(); void saveConfig(); void refreshUI(); void onAddDir(); void onRemoveDir(); void onScanNow(); };