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:
ApplicationWindowMain 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#
Repository Row#
- class RepoRow(*args, **kwargs)[source]#
Bases:
ActionRowOne 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).
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:
WindowUpgrade 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:
repos (list[Repository])
parent (Gtk.Window)
- class SelectReposPage(*args, **kwargs)[source]#
Bases:
RepomanWizardPageStep 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:
state (WizardState)
nav_view (Adw.NavigationView)
- class CheckAvailabilityPage(*args, **kwargs)[source]#
Bases:
RepomanWizardPageStep 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:
state (WizardState)
nav_view (Adw.NavigationView)
Wizard step 3: review pending changes and apply them via polkit.
- class ConfirmChangesPage(*args, **kwargs)[source]#
Bases:
RepomanWizardPageStep 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:
state (WizardState)
nav_view (Adw.NavigationView)