From 264d29b4354d5b9d31779a8a2f83333577ba95ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 4 Sep 2023 11:46:02 +0200 Subject: [PATCH] screen-cast/session: Use add_stream() helper everywhere It was introduced, but using it everywhere appropriate was forgotten. Part-of: --- src/backends/meta-screen-cast-session.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/backends/meta-screen-cast-session.c b/src/backends/meta-screen-cast-session.c index ca0921d68..0f049a935 100644 --- a/src/backends/meta-screen-cast-session.c +++ b/src/backends/meta-screen-cast-session.c @@ -619,9 +619,7 @@ handle_record_window (MetaDBusScreenCastSession *skeleton, stream = META_SCREEN_CAST_STREAM (window_stream); stream_path = meta_screen_cast_stream_get_object_path (stream); - session->streams = g_list_append (session->streams, stream); - - g_signal_connect (stream, "closed", G_CALLBACK (on_stream_closed), session); + add_stream (session, stream); meta_dbus_screen_cast_session_complete_record_window (skeleton, invocation, @@ -713,9 +711,7 @@ handle_record_area (MetaDBusScreenCastSession *skeleton, stream = META_SCREEN_CAST_STREAM (area_stream); stream_path = meta_screen_cast_stream_get_object_path (stream); - session->streams = g_list_append (session->streams, stream); - - g_signal_connect (stream, "closed", G_CALLBACK (on_stream_closed), session); + add_stream (session, stream); meta_dbus_screen_cast_session_complete_record_area (skeleton, invocation, @@ -790,9 +786,7 @@ handle_record_virtual (MetaDBusScreenCastSession *skeleton, stream = META_SCREEN_CAST_STREAM (virtual_stream); stream_path = meta_screen_cast_stream_get_object_path (stream); - session->streams = g_list_append (session->streams, stream); - - g_signal_connect (stream, "closed", G_CALLBACK (on_stream_closed), session); + add_stream (session, stream); meta_dbus_screen_cast_session_complete_record_virtual (skeleton, invocation,