From 9d21c611e99b320c991a94590bd9d4b0d6669c47 Mon Sep 17 00:00:00 2001 From: Sander Sweers Date: Sat, 6 Jan 2024 21:15:03 +0100 Subject: [PATCH] Log system info in all applications --- blueman/main/Adapter.py | 2 ++ blueman/main/Applet.py | 2 ++ blueman/main/Manager.py | 2 ++ blueman/main/Sendto.py | 4 +++- blueman/main/Services.py | 3 +++ blueman/main/Tray.py | 3 +++ 6 files changed, 15 insertions(+), 1 deletion(-) diff --git a/blueman/main/Adapter.py b/blueman/main/Adapter.py index 82f23aede..88afd9a35 100644 --- a/blueman/main/Adapter.py +++ b/blueman/main/Adapter.py @@ -37,6 +37,8 @@ def do_quit(_: object) -> bool: self.quit() return False + log_system_info() + s = GLib.unix_signal_source_new(signal.SIGINT) s.set_callback(do_quit) s.attach() diff --git a/blueman/main/Applet.py b/blueman/main/Applet.py index 8322fda9b..523b0a880 100644 --- a/blueman/main/Applet.py +++ b/blueman/main/Applet.py @@ -32,6 +32,8 @@ def do_quit(_: object) -> bool: self.quit() return False + log_system_info() + s = GLib.unix_signal_source_new(signal.SIGINT) s.set_callback(do_quit) s.attach() diff --git a/blueman/main/Manager.py b/blueman/main/Manager.py index bf1bcc2db..5435e42f1 100644 --- a/blueman/main/Manager.py +++ b/blueman/main/Manager.py @@ -35,6 +35,8 @@ def do_quit(_: object) -> bool: self.quit() return False + log_system_info() + s = GLib.unix_signal_source_new(signal.SIGINT) s.set_callback(do_quit) s.attach() diff --git a/blueman/main/Sendto.py b/blueman/main/Sendto.py index f040ac840..e9f732238 100644 --- a/blueman/main/Sendto.py +++ b/blueman/main/Sendto.py @@ -13,7 +13,7 @@ from blueman.bluez.obex.Manager import Manager from blueman.bluez.obex.Client import Client from blueman.bluez.obex.Transfer import Transfer -from blueman.Functions import format_bytes +from blueman.Functions import format_bytes, log_system_info from blueman.main.SpeedCalc import SpeedCalc from blueman.gui.CommonUi import ErrorDialog @@ -39,6 +39,8 @@ def __init__(self, device: Device, adapter_path: ObjectPath, files: Iterable[str type_hint=Gdk.WindowTypeHint.DIALOG ) + log_system_info() + self.b_cancel = self.add_button(_("_Stop"), Gtk.ResponseType.CLOSE) self.b_cancel.props.receives_default = True self.b_cancel.props.use_underline = True diff --git a/blueman/main/Services.py b/blueman/main/Services.py index 71b9fd147..d7c29e0af 100644 --- a/blueman/main/Services.py +++ b/blueman/main/Services.py @@ -5,6 +5,7 @@ from typing import Optional from blueman.main.Builder import Builder +from blueman.Functions import log_system_info import blueman.plugins.services from blueman.plugins.ServicePlugin import ServicePlugin @@ -26,6 +27,8 @@ def do_quit(_: object) -> bool: self.quit() return False + log_system_info() + s = GLib.unix_signal_source_new(signal.SIGINT) s.set_callback(do_quit) s.attach() diff --git a/blueman/main/Tray.py b/blueman/main/Tray.py index 43ba467d7..eb0e9c122 100644 --- a/blueman/main/Tray.py +++ b/blueman/main/Tray.py @@ -3,6 +3,7 @@ import os import signal import sys +from blueman.Functions import log_system_info from blueman.main.DBusProxies import AppletService from gi.repository import Gio, GLib @@ -18,6 +19,8 @@ def do_quit(_: object) -> bool: self.quit() return False + log_system_info() + s = GLib.unix_signal_source_new(signal.SIGINT) s.set_callback(do_quit) s.attach()