From: Michael Tremer Date: Sat, 15 Mar 2025 11:55:52 +0000 (+0000) Subject: tui: Add a status callback X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4f093bb48ecfaf160cad6290556baf8ef4aa70d9;p=people%2Fms%2Fbricklayer.git tui: Add a status callback This will be called by Pakfire to tell us what it is doing... Signed-off-by: Michael Tremer --- diff --git a/src/python/tui.py b/src/python/tui.py index e0c2b45..751192d 100644 --- a/src/python/tui.py +++ b/src/python/tui.py @@ -432,12 +432,19 @@ class ProgressWindow(Window): def update(self, value): """ - Updates the current status + Updates the current progress """ if self.scale: self.scale.set(value) self.tui.refresh() + def status(self, text): + """ + Updates the current status + """ + self.textbox.setText(text or "") + self.tui.refresh() + class ProgressWindowCallbacks(object): def __init__(self, window): @@ -453,8 +460,7 @@ class ProgressWindowCallbacks(object): """ Updates the text in the textbox """ - self.window.textbox.setText(text) - self.window.tui.refresh() + self.window.status(text) def status(self, progress, message): if progress: