diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-21 11:40:59 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-21 11:40:59 +0200 |
| commit | f8e9991c92618967e89a5ee4bf84de1556b6af5f (patch) | |
| tree | 6cd2048b7ff7949d935c350d48bddc0de12fd810 /sb_builder/mainwindow.py | |
| parent | 766ce6ff1ea584dfe980a5e0b29251768c4c0726 (diff) | |
| download | sb-builder-f8e9991c92618967e89a5ee4bf84de1556b6af5f.tar.gz sb-builder-f8e9991c92618967e89a5ee4bf84de1556b6af5f.zip | |
stats returns the prunable items instead of their count, and a click on
the Built tile shows them in a non-modal box, so they can be read while
another job holds the lock and Prune's preview cannot start.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'sb_builder/mainwindow.py')
| -rw-r--r-- | sb_builder/mainwindow.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sb_builder/mainwindow.py b/sb_builder/mainwindow.py index aab6093..cee984f 100644 --- a/sb_builder/mainwindow.py +++ b/sb_builder/mainwindow.py @@ -115,6 +115,8 @@ class MainWindow(QMainWindow): self.dashboard.tiles["Packages"].link(self.open_packages) self.dashboard.orphans.link(lambda: self.open_packages().filter_to("orphaned")) self.dashboard.jobs.link(self.open_jobs) + self.prunable = [] + self.dashboard.tiles["Built"].link(self.show_prunable) self.dashboard.result_clicked.connect(self.open_results) self.jobs_tab = JobsTab(self.remote) self.jobs_tab.refresh_requested.connect(self.poll_jobs) @@ -222,7 +224,8 @@ class MainWindow(QMainWindow): if err: return self._failed(err) self.dashboard.show_stats(data) - self.packages_tab.set_prunable(data.get("prunable")) + self.prunable = data.get("prunable") or [] + self.packages_tab.set_prunable(len(self.prunable)) def _got_version(self, data, err): if err: @@ -352,6 +355,18 @@ class MainWindow(QMainWindow): else: d.show() + def show_prunable(self): + """The built packages whose SlackBuild is gone, readable while a job runs.""" + if not self.prunable: + return + box = QMessageBox(QMessageBox.Icon.Information, "To prune", + "Built, but their SlackBuild is gone from the tree. " + "Packages, Prune removes them.", parent=self) + box.setDetailedText("\n".join(self.prunable)) + box.setModal(False) + box.setAttribute(Qt.WidgetAttribute.WA_DeleteOnClose) + box.show() + def show_build_result(self, job): """A slackrepo run's per-package results: logs, Retry failed.""" if job["id"] in self.next_steps: |
