BackupInProgressDialog

1. Overview

The BackupInProgressDialog module provides active-operation warning dialog for BastionGuard Backup. It presents a modal GTK window when the application lock indicates that another backup or restore operation is already running.

The implementation is written in Vala and uses GLib/GIO together with the application utility namespaces required by the file.


2. Dependencies and Integration

The module imports:

  • Gtk
  • TeeJee.Logging
  • TeeJee.GtkHelper
  • TeeJee.Misc

Key runtime integrations include:

  • GTK – graphical widgets, dialogs, images, event processing, or window lifecycle

3. Declared Types

3.1 BackupInProgressDialog

public class BackupInProgressDialog : Gtk.Window

This class encapsulates the state and operations described by this source file.


4. State, Properties, Constants, and Signals

Internal state

  • private GLib.MainLoop? loop – Runtime state used by the module.

5. Public API and Operational Methods

5.1 BackupInProgressDialog()

public BackupInProgressDialog(string lock_message)

Initializes the object state, allocates required collections or widgets, and applies constructor parameters.

5.2 run_modal()

public void run_modal()

Presents the dialog and runs a local GLib main loop until the user closes the warning.


6. Internal Helpers

6.1 build_ui()

private void build_ui(string heading, string body)

Constructs ui from the current configuration.

6.2 close_dialog()

private void close_dialog()

Stops or closes the active operation and releases related runtime state.


7. Operational Flow

  1. Transform raw values, command output, or metadata into structured or display-ready form.
  2. Finalize the operation and release files, mounts, child processes, widgets, or cached state.

8. Error Handling and Diagnostics

  • Boolean, nullable, or empty-string return values communicate recoverable failures to callers.

9. Runtime and Security Considerations

  • GTK lifecycle: widgets and local main loops require a valid graphical context and careful close/destroy handling.

10. Licensing

The source is distributed under the GNU General Public License version 2 or any later version.

The source header identifies:

Copyright 2025-2026 Calogero Scarnà — BastionGuard Backup