From 237a1e4e325ade8800e9066a8082a66f67f4d1f4 Mon Sep 17 00:00:00 2001 From: "Eshan Roy (Eshanized)" Date: Tue, 23 Apr 2024 15:21:47 +0530 Subject: [PATCH] =?UTF-8?q?=E2=8F=B3=20@eshanized=20updated=20the=20reposi?= =?UTF-8?q?tory!!!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- blackbox/Functions.py | 32 +++++++++++++++++++++++++++++++- blackbox/ui/__init__.py | 0 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 blackbox/ui/__init__.py diff --git a/blackbox/Functions.py b/blackbox/Functions.py index f34b2bd..744c5eb 100644 --- a/blackbox/Functions.py +++ b/blackbox/Functions.py @@ -14,6 +14,8 @@ import shutil import Settings from logging.handlers import TimedRotatingFileHandler +from ui.GUI import * + gi.require_version("Gtk" "3.0") # GTK 2.0 is dead! from gi.repository import GLib, Gtk @@ -261,4 +263,32 @@ def start_subprocess( widget ): try: - self.switch_package_version \ No newline at end of file + self.switch_package_version.set_sensitive(False) + self.switch_snigdhaos_keyring.set_sensitive(False) + self.switch_snigdhaos_mirrorlist.set_sensitive(False) + + widget.set_sensitive(False) + + process_stdout_lst = [] + process_stdout_lst.append( + "Command = %s\n\n" % " ".join(cmd) + ) + with subprocess.Popen( + cmd, + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + bufsize=1, + universal_newlines=True, + ) as process: + if progress_dialog is not None: + progress_dialog.pkg_dialog_closed = False + self.in_progress = True + if ( + progress_dialog is not None and progress_dialog.pkg_dialog_closed is False + ): + line = ( + "Pacman Processing: %s Package: %s \n\n Command: %s\n\n" % (action, pkg.name, " ".join(cmd)) + ) + + except Exception as e: + print(e) \ No newline at end of file diff --git a/blackbox/ui/__init__.py b/blackbox/ui/__init__.py new file mode 100644 index 0000000..e69de29