1. Overview
The MiscBox module provides miscellaneous date-format settings for backup and restore interfaces.
Its principal responsibilities are:
- Offers predefined date formats
- Supports a custom format entry
- Synchronizes the selected value with the central configuration
2. Class Structure and Dependencies
public class MiscBox : Gtk.Box
The source imports:
GtkGeeTeeJee.LoggingTeeJee.FileSystemTeeJee.JsonHelperTeeJee.ProcessHelperTeeJee.GtkHelperTeeJee.SystemTeeJee.Misc
The GTK inheritance and imported modules allow the component to participate in the application event loop, share the central backup state, and construct native GTK4 controls.
3. Primary Runtime State
The principal fields declared by the module include:
Gtk.Window parent_window– parent GTK window used for transient dialogsbool restore_mode– whether the widget is configuring restore rather than backup
4. User Interface Composition
The module directly constructs the following GTK widget types:
Gtk.Box– layout containersGtk.ComboBoxText– text-based selection controlsGtk.Entry– editable text fields
Event-driven behavior is connected through signals such as:
changed
5. Initialization
MiscBox()
public MiscBox(Gtk.Window _parent_window, bool _restore_mode)
Initializes the class instance, creates its GTK controls, and prepares the initial state.
6. Central Controller Integration
The module reads or modifies the following Main controller members through the global App object:
App.date_format
7. Method Reference
init_date_format_option()
private void init_date_format_option(Gtk.Box box)
Initializes date format option state and controls. It reads or updates central state through App.date_format. It creates Gtk.Box, Gtk.ComboBoxText, Gtk.Entry where required. It connects the changed signal.
refresh()
public void refresh()
Reloads current application state and updates the visible controls.
8. External Resources and Paths
The component does not directly define protected filesystem paths or external command strings.
9. Data and Event Flow
- Construct the component and initialize its child controls
- Load the current model state into the interface
- React to GTK signals generated by navigation, selections, and action controls
- Read or update central backup and restore state through the global controller
10. Runtime and Security Considerations
- Shared controller state: the component reads and modifies the global
Appcontroller used by the surrounding workflow. - Signal-driven behavior: GTK callbacks update the model and interface when controls are activated or changed.
11. Implementation Considerations
- Global coupling: the class depends on the process-wide
Appobject rather than receiving a controller through dependency injection.
12. Licensing
The applicable licensing terms are defined by the source-file header and the containing BastionGuard Backup project.
