From 6367424ebd93114b64c572558106f3ca94ee4cec Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Wed, 15 Jan 2025 11:11:07 +0000 Subject: [PATCH] Clean up VTE notification-received signal check This prompts a crash with some versions of VTE and Python (see https://gitlab.gnome.org/GNOME/vte/-/issues/2858), and although the crash has been fixed in VTE, VTE's main developer said that creating an instance and connecting to a signal isn't the right way to do this check. Use the test they recommend instead. Fixes: #984 --- terminatorlib/plugins/command_notify.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/terminatorlib/plugins/command_notify.py b/terminatorlib/plugins/command_notify.py index 0001c566..f07f90b2 100644 --- a/terminatorlib/plugins/command_notify.py +++ b/terminatorlib/plugins/command_notify.py @@ -22,12 +22,10 @@ VERSION = '0.1.0' ### Test for proper signal -try: - Vte.Terminal().connect('notification-received',lambda *args: None,None) +if GObject.signal_lookup('notification-received', Vte.Terminal): AVAILABLE = ['CommandNotify'] -except TypeError as e: +else: AVAILABLE = [] - pass class CommandNotify(plugin.Plugin): capabilities = ['command_watch']