repoman.ui#

Main Window#

Main application window (RepomanWindow).

Hosts the sidebar repo list, detail pane, menu bar, upgrade banner, and all top-level dialogs. Keyboard shortcuts are wired here at the application level so they are active for every window in the process.

class RepomanWindow(*args, **kwargs)[source]#

Bases: ApplicationWindow

Main application window.

Uses Gtk.ApplicationWindow (not Adw.ApplicationWindow) so that the system window manager (Xfwm4, etc.) draws the titlebar with the user’s own theme. All libadwaita widgets inside still work fine.

Parameters:

kwargs (object)

open_upgrade_wizard()[source]#

Open the upgrade assistant wizard, or focus it if already open.

Shows an informational dialog if no repositories need attention. Resets the network-failure flag before each wizard run so the checker starts fresh rather than silently skipping all checks.

Return type:

None

Detail Pane#

class DetailPane(*args, **kwargs)[source]#

Bases: Box

Right-hand editing panel for a selected Repository.

repo_saved = 'repo-saved'#
repo_removed = 'repo-removed'#
show_repo(repo)[source]#
Parameters:

repo (Repository)

Return type:

None

clear()[source]#
Return type:

None

Repository Row#

class RepoRow(*args, **kwargs)[source]#

Bases: ActionRow

One row in the repo sidebar list.

Parameters:

repo (Repository)

repo_toggled = 'repo-toggled'#
property repo: Repository#
refresh(repo)[source]#

Refresh display after the repo model changes.

Parameters:

repo (Repository)

Return type:

None

Window Positioning#

Window positioning helpers for X11 / Xfwm4.

Post-map centering via python-xlib. Known limitation: a brief flicker occurs because the WM places the window at its default position before the move fires. Pre-realize positioning is the correct fix; deferred. All public functions are no-ops on Wayland (GdkX11 / XID not available).

center_on_screen(window)[source]#

Center window on its monitor after it maps. Silently no-ops on Wayland.

Parameters:

window (gi.repository.Gtk.Window)

Return type:

None

center_on_parent(window)[source]#

Center window over its transient parent after it maps. Falls back to center-on-screen if parent position is unobtainable. Silently no-ops on Wayland.

Parameters:

window (gi.repository.Gtk.Window)

Return type:

None

Upgrade Wizard#

Upgrade assistant wizard dialog (RepomanWizardDialog).

Wraps an AdwNavigationView with three pages (select → check → confirm). Uses Gtk.Window so the WM draws the titlebar with the user’s own theme.

class RepomanWizardDialog(*args, **kwargs)[source]#

Bases: Window

Upgrade assistant — modal Gtk.Window wrapping AdwNavigationView.

Uses Gtk.Window so the system window manager (Xfwm4, etc.) draws the titlebar with the user’s own theme, consistent with the main window.

Emits:

repos-updated — after polkit writes succeed; caller must reload repo list

Parameters:
do_close_request()[source]#
Return type:

bool

add_toast(toast)[source]#
Parameters:

toast (gi.repository.Adw.Toast)

Return type:

None

class SelectReposPage(*args, **kwargs)[source]#

Bases: RepomanWizardPage

Step 1 — user selects which repos to re-enable. Pre-ticks everything except confirmed UNAVAILABLE. Unavailable repos stay visible and tickable — user may know better.

Parameters:
can_proceed()[source]#
Return type:

bool

class CheckAvailabilityPage(*args, **kwargs)[source]#

Bases: RepomanWizardPage

Step 2 — background thread runs availability checks; rows update live. Next is locked until all checks resolve. Checks start in _on_shown() so the spinner renders before work begins.

Parameters:
can_proceed()[source]#
Return type:

bool

Wizard step 3: review pending changes and apply them via polkit.

class ConfirmChangesPage(*args, **kwargs)[source]#

Bases: RepomanWizardPage

Step 3 — summary and polkit-guarded apply. UNAVAILABLE repos are excluded from the write payload even if the user ticked them in step 1 — safety net against enabling broken repos.

Parameters:
can_proceed()[source]#
Return type:

bool