From f67043e178b9b4b2d57d6d190e1fbef13234241c Mon Sep 17 00:00:00 2001 From: wurstsalat Date: Thu, 15 Jun 2023 13:39:16 +0200 Subject: fix: Contacts: Fix supports_{audio,video} property --- gajim/common/modules/contacts.py | 2 ++ gajim/gtk/chat_stack.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gajim/common/modules/contacts.py b/gajim/common/modules/contacts.py index a63578db6..c92b798d4 100644 --- a/gajim/common/modules/contacts.py +++ b/gajim/common/modules/contacts.py @@ -370,12 +370,14 @@ class BareContact(CommonContact): return any(resource.supports(requested_feature) for resource in self.iter_resources()) + @property def supports_audio(self) -> bool: if (self.supports(Namespace.JINGLE_ICE_UDP) and app.is_installed('FARSTREAM')): return self.supports(Namespace.JINGLE_RTP_AUDIO) return False + @property def supports_video(self) -> bool: if (self.supports(Namespace.JINGLE_ICE_UDP) and app.is_installed('FARSTREAM')): diff --git a/gajim/gtk/chat_stack.py b/gajim/gtk/chat_stack.py index 5b4f75875..b2a861643 100644 --- a/gajim/gtk/chat_stack.py +++ b/gajim/gtk/chat_stack.py @@ -511,10 +511,10 @@ class ChatStack(Gtk.Stack, EventHelper): online = app.account_is_connected(account) app.window.get_action('start-voice-call').set_enabled( - online and contact.supports_audio() and + online and contact.supports_audio and sys.platform != 'win32') app.window.get_action('start-video-call').set_enabled( - online and contact.supports_video() and + online and contact.supports_video and sys.platform != 'win32') app.window.get_action('quote').set_enabled(online) -- cgit v1.2.3