1. Overview
The RestoreSummaryBox module shows the final restore plan before destructive execution.
Its principal responsibilities are:
- Displays target-device mappings
- Displays reboot information
- Displays the restore disclaimer generated by the central controller
2. Class Structure and Dependencies
public class RestoreSummaryBox : 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.Label lbl_devices– label used to display devices informationGtk.Label lbl_reboot– label used to display reboot informationGtk.Label lbl_disclaimer– label used to display disclaimer informationGtk.Window parent_window– parent GTK window used for transient dialogs
4. User Interface Composition
The module primarily configures or hosts widgets created by reusable child components.
5. Initialization
RestoreSummaryBox()
public RestoreSummaryBox(Gtk.Window _parent_window)
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.get_restore_messages
7. Method Reference
refresh()
public void refresh()
Reloads current application state and updates the visible controls. It reads or updates central state through App.get_restore_messages.
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
- 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.
11. Implementation Considerations
- Global coupling: the class depends on the process-wide
Appobject rather than receiving a controller through dependency injection.
12. Licensing
The source header contains the following copyright notices:
Copyright 2012-2018 Tony George <teejeetech@gmail.com>
The file is distributed under the GNU General Public License version 2 or later.
