From 3665d7f8a435a8d0c67ed6909824c74328d3cd6e Mon Sep 17 00:00:00 2001 From: "Abhiraj Roy (iconized)" <157954129+iconized@users.noreply.github.com> Date: Wed, 24 Apr 2024 17:39:01 +0530 Subject: [PATCH] add #start_log_timer function --- blackbox/Functions.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/blackbox/Functions.py b/blackbox/Functions.py index 9f471ed..ccebd9c 100644 --- a/blackbox/Functions.py +++ b/blackbox/Functions.py @@ -1284,3 +1284,12 @@ def add_pacmanlog_queue(self): logger.error("Exception in add_pacmanlog_queue() : %s" % e) finally: logger.debug("No new lines found inside the pacman log file") + +def start_log_timer(self, window_pacmanlog): + while True: + if window_pacmanlog.start_logtimer is False: + logger.debug("Stopping Pacman log monitoring timer") + return False + + GLib.idle_add(update_textview_pacmanlog, self, priority=GLib.PRIORITY_DEFAULT) + time.sleep(2) \ No newline at end of file