ExcludeMessageWindow

1. Overview

The ExcludeMessageWindow module explains mandatory exclusion rules and home-directory behavior.

Its principal responsibilities are:

  • Lists protected system paths
  • Shows default home-directory exclusion guidance
  • Provides a modal acknowledgement action

2. Class Structure and Dependencies

public class ExcludeMessageWindow : Gtk.Dialog

The source imports:

  • Gtk
  • Gee
  • TeeJee.Logging
  • TeeJee.FileSystem
  • TeeJee.JsonHelper
  • TeeJee.ProcessHelper
  • TeeJee.GtkHelper
  • TeeJee.System
  • TeeJee.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.Box vbox_main – primary vertical layout container
  • Gtk.Box hbox_action – Box widget used by the interface
  • Gtk.ListBox exclude_list – ListBox widget used by the interface
  • ScrolledWindow sw_exclude – runtime reference for sw exclude
  • Label lbl_header_exclude – label used to display header exclude information
  • Label lbl_exclude – label used to display exclude information
  • Label lbl_header_home – label used to display header home information
  • Label lbl_home – label used to display home information
  • Button btn_ok – button used to trigger the corresponding ok action

4. User Interface Composition

The module directly constructs the following GTK widget types:

  • Gtk.Box – layout containers
  • Gtk.Label – headings, descriptions, and status text
  • Gtk.ListBox – dynamic selectable rows
  • Gtk.ListBoxRow – custom list rows

Event-driven behavior is connected through signals such as:

clicked

5. Initialization

ExcludeMessageWindow()

public ExcludeMessageWindow()

Initializes the class instance, creates its GTK controls, and prepares the initial state. It reads or updates central state through App.exclude_list_default. It creates Gtk.Label, Gtk.ListBox where required. It connects the clicked signal.


6. Central Controller Integration

The module reads or modifies the following Main controller members through the global App object:

  • App.exclude_list_default

7. Method Reference

exclude_list_add_item()

private void exclude_list_add_item(string path)

Implements the exclude list add item operation. It creates Gtk.Box, Gtk.Label, Gtk.ListBoxRow where required.

btn_ok_clicked()

private void btn_ok_clicked()

Implements the btn ok clicked operation.


8. External Resources and Paths

The component does not directly define protected filesystem paths or external command strings.


9. Data and Event Flow

  1. Construct the component and initialize its child controls
  2. React to GTK signals generated by navigation, selections, and action controls
  3. 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 App controller 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 App object 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.