]> git.ipfire.org Git - people/ms/bricklayer.git/commitdiff
tui: Remove unused progress callbacks
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 15 Mar 2025 11:58:21 +0000 (11:58 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 15 Mar 2025 11:58:21 +0000 (11:58 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/python/tui.py

index 751192ddcce401305a2a078b6327e05f1d36fb88..11ac260cb5621a3f1143e3289fea0cb63916f543 100644 (file)
@@ -403,8 +403,7 @@ class ProgressWindow(Window):
                # Show the window
                self.start()
 
-               # Return the callbacks
-               return ProgressWindowCallbacks(self)
+               return self
 
        def __exit__(self, type, value, traceback):
                # Close the window
@@ -446,30 +445,6 @@ class ProgressWindow(Window):
                self.tui.refresh()
 
 
-class ProgressWindowCallbacks(object):
-       def __init__(self, window):
-               self.window = window
-
-       def progress(self, value):
-               """
-                       Updates the progressbar value
-               """
-               self.window.update(value)
-
-       def message(self, text):
-               """
-                       Updates the text in the textbox
-               """
-               self.window.status(text)
-
-       def status(self, progress, message):
-               if progress:
-                       self.progress(progress)
-
-               if message:
-                       self.message(message)
-
-
 class PasswordWindow(ButtonsWindow):
        def __init__(self, *args, **kwargs):
                ButtonsWindow.__init__(self, *args, **kwargs)