ExcludeListSummaryWindow

1. Overview

The ExcludeListSummaryWindow module displays the complete effective backup or restore exclusion list.

Its principal responsibilities are:

  • Generates the list through the central controller
  • Supports backup and restore views
  • Presents rules in a scrollable read-only window

2. Class Structure and Dependencies

public class ExcludeListSummaryWindow : Gtk.Window

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.Label lbl_list – label used to display list information
  • Gtk.Button btn_close – button used to trigger the corresponding close action
  • bool for_restore – Boolean state for for restore
  • int def_width – numeric state for def width
  • int def_height – numeric state for def height

4. User Interface Composition

The module directly constructs the following GTK widget types:

  • Gtk.Box – layout containers
  • Gtk.SizeGroup – consistent alignment across labels and values

Event-driven behavior is connected through signals such as:

clicked

5. Initialization

ExcludeListSummaryWindow()

public ExcludeListSummaryWindow(bool _for_restore)

Initializes the class instance, creates its GTK controls, and prepares the initial state. It creates Gtk.Box where required.


6. Central Controller Integration

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

  • App.create_exclude_list_for_backup
  • App.create_exclude_list_for_restore

7. Method Reference

create_actions()

private void create_actions()

Creates action buttons and connects their callbacks. It creates Gtk.Box, Gtk.SizeGroup where required. It connects the clicked signal.

refresh()

public void refresh()

Reloads current application state and updates the visible controls. It reads or updates central state through App.create_exclude_list_for_backup, App.create_exclude_list_for_restore.


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. Load the current model state into the interface
  3. React to GTK signals generated by navigation, selections, and action controls
  4. 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 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.